[jboss-osgi-issues] [JBoss JIRA] (JBOSGI-748) EntityManagerFactory doesn't get registered for Persistence Bundles

Umberto Cappellini (JIRA) jira-events at lists.jboss.org
Wed Oct 9 06:36:03 EDT 2013


Umberto Cappellini created JBOSGI-748:
-----------------------------------------

             Summary: EntityManagerFactory doesn't get registered for Persistence Bundles
                 Key: JBOSGI-748
                 URL: https://issues.jboss.org/browse/JBOSGI-748
             Project: JBoss OSGi
          Issue Type: Bug
      Security Level: Public (Everyone can see)
          Components: jpa
    Affects Versions: JBossOSGi 2.1.0
         Environment: linux version 3.8.0-31
java version "1.7.0_25" OpenJDK
wildfly-8.0.0.Alpha4
jboss-osgi-2.1.0
            Reporter: Umberto Cappellini
            Assignee: Thomas Diesler


If I deploy a persistence bundle (i.e. a bundle having a META-INF/persistence.xml, and relative <Meta-Persistence> tag in the manifest), the framework correctly exposes EntityManagerFactory OSGi service.

Two Problems:

A) At startup, the em service is not anymore exposed. I found this happens because the persistence bundle starts up before the PersistenceUnitProcessor is registered as BundleListener, and therefore it doesn't receive the event START. 
If I set "org.jboss.osgi" log level to TRACE, the time lost to trace logs is enough for the framework to  start up properly and register the listener. In this case the event is received and the em service registered.
This is reproducible all the times: put the log level to INFO or DEBUG and no em service, put it to TRACE, and you have the service.

B) If I install the persistence bundle in the "bundle" folder of Wildfly and reference it as capability in the OSGi subsystem, the method PersistenceUnitProcessor.deploy is never invoked, and therefore the em service never exposed. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jboss-osgi-issues mailing list