[jboss-jira] [JBoss JIRA] (WFLY-9516) JPA deployer adding cross sub deployment dependencies when multiple persistence units deployed
Scott Marlow (JIRA)
issues at jboss.org
Wed Aug 22 10:32:00 EDT 2018
[ https://issues.jboss.org/browse/WFLY-9516?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13622693#comment-13622693 ]
Scott Marlow commented on WFLY-9516:
------------------------------------
Note correction made to comment [https://issues.jboss.org/browse/WFLY-9516?focusedCommentId=13490536&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13490536]
I started a POC branch [https://github.com/scottmarlow/wildfly/tree/WFLY-9516_lazyEMF] to try the lazy deployment of the EntityManagerFactory and EntityManager. This is work in progress, as the test case associated with this jira, still fails. I'm thinking of a few other internal changes to go with the lazy initialization.
* Eliminate the extra persistence unit service that is used for 2 phase bootstrap.
* See if we can get the needed datasource before actually starting the persistence unit service, which helps 2 phase bootstrap without extra pu service (need to deal with race condition of datasource service stopping in between us getting it and actually starting pu service that depends on datasource service.
* Explore alternative way to register [ClassTransformer |https://docs.oracle.com/javaee/7/api/javax/persistence/spi/ClassTransformer.html] before calling Persistence.createContainerEntityManagerFactory() or its 2 phase Hibernate ORM extension.
This is all proof of concept type stuff, no promise of when or if this extension will work.
> JPA deployer adding cross sub deployment dependencies when multiple persistence units deployed
> ----------------------------------------------------------------------------------------------
>
> Key: WFLY-9516
> URL: https://issues.jboss.org/browse/WFLY-9516
> Project: WildFly
> Issue Type: Bug
> Components: JPA / Hibernate
> Affects Versions: 11.0.0.Final
> Reporter: Brad Maxwell
> Assignee: Scott Marlow
>
> If an ear contains two EJB sub deployments which each contain a Persistence Unit and a Stateless EJB which injects the PU that is in its jar using @PersistenceContext. There is a dependency being added where in the Stateless EJB from one deployment depends on the PU from the other jar. It appears this is happening after this bug fix WFLY-1531
> {code}
> app.ear
> - ejb-with-pu1.jar
> - ejb-with-pu2.jar
> {code}
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
More information about the jboss-jira
mailing list