[ https://issues.apache.org/jira/browse/ARIES-1078?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13955259#comment-13955259 ]
ASF GitHub Bot commented on ARIES-1078: --------------------------------------- Github user kwesterfeld closed the pull request at: https://github.com/apache/aries/pull/4 > JPA container stops locating providers for managers (PUs) when one provider > is found > ------------------------------------------------------------------------------------ > > Key: ARIES-1078 > URL: https://issues.apache.org/jira/browse/ARIES-1078 > Project: Aries > Issue Type: Bug > Components: JPA > Affects Versions: 1.0 > Reporter: Kurt Westerfeld > Assignee: David Bosschaert > > In PersistenceBundleManager, there is a bit of code that deals with mating up > managers who are waiting for providers (managersAwaitingProviders). This > code has an error when one provider is found, in that it checks for null > after calling getProviderServiceReference on the wrong return value. > What happens is, you may have two providers in the OSGi registry. When one > is found, all managers who are waiting on a provider get removed from this > list, even though not all may match. > I found this issue because I created a custom provider which allows for > injecting configuration into the process of creating the entity manager, > apart from that which is in persistence.xml. I wanted to mate up > configuration admin configuration, and so I subclassed the provider given by > openjpa, and activated my bundle. > The end result is, my persistence unit is registered with a null provider. > This is a quick one-liner fix; I will create a pull request. -- This message was sent by Atlassian JIRA (v6.2#6252)