[seam-issues] [JBoss JIRA] Closed: (SEAMPERSIST-17) ManagedPersistenceContextProxyHandler.java not correctly handling "getProvider" method.

Stuart Douglas (JIRA) jira-events at lists.jboss.org
Sat Jan 8 16:59:49 EST 2011


     [ https://issues.jboss.org/browse/SEAMPERSIST-17?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stuart Douglas closed SEAMPERSIST-17.
-------------------------------------

      Assignee: Stuart Douglas
    Resolution: Done


Thanks for the excellent description of the problem

> ManagedPersistenceContextProxyHandler.java not correctly handling "getProvider" method.
> ---------------------------------------------------------------------------------------
>
>                 Key: SEAMPERSIST-17
>                 URL: https://issues.jboss.org/browse/SEAMPERSIST-17
>             Project: Seam Persistence
>          Issue Type: Bug
>    Affects Versions: 3.0.0.Beta2
>            Reporter: Derrick Ampy
>            Assignee: Stuart Douglas
>
> 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. 

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the seam-issues mailing list