Details
-
Type:
Bug
-
Status: Closed (View Workflow)
-
Priority:
Major
-
Resolution: Done
-
Affects Version/s: 3.0.0.Beta2
-
Fix Version/s: None
-
Labels:None
Description
While trying to leverage Seam Managed Persistence Contexts as described in the associated seam-persistence reference documentation, I ran into an issue where the ManagedPersistenceContext::getProvider method is invoked in the PersistenceContextImpl class (line 131). The problem is that this method call when proxied with a ManagedPersistenceContextProxyHandler will currently result in an attempt to call the "getProvider" method on the delegated object (which in my case is an EntityManager instance). Obviously, the EntityManager interface does not define a method called "getProvider" and so I get an error.
Looking into the problem, I believe the root issue is that the ManagedPersistenceContextProxyHandler::invoke method is expecting the supplied method name to be "getPersistenceProvider" rather than "getProvider" (see line 100). Moreover, the ManagedPersistenceContext class defines a "getProvider" method rather than a "getPersistenceProvider" method (suggesting that perhaps the name was refactored at some point in the past and ManagedPersistenceContextProxyHandler::invoke wasn't updated).
If I modify the code on line 100 to use "getProvider" rather than "getPersistenceProvider", I'm able to load my SMPC properly in my application.
Gliffy Diagrams
Activity
- All
- Comments
- Work Log
- History
- Activity
- Links Hierarchy
Thanks for the excellent description of the problem