[
https://issues.jboss.org/browse/WFLY-9516?page=com.atlassian.jira.plugin....
]
Scott Marlow commented on WFLY-9516:
------------------------------------
To summarize, we have a few different options, none of them allow all functionality, to
work for all deployments.
# Introduce an additional JPA persistence unit hint to (one phase) start before the
INSTALL phase. List of things that should work: { JPA entity class rewriting/enhancing,
lazy interaction with CDI beanmanager}. List of things that won't work: {
@DataSourceDefinition use in persistence unit}. There could be other problems with
starting a one phase persistence unit earlier than INSTALL phase.
# As mentioned in previous comment, introduce persistence unit hint that component
dependencies should only be added for persistence units in the top level deployment and
the respective sub deployment level. Such, that components in sub deployment EJB1
couldn't depend on the EJB2 persistence unit and EJB2 couldn't depend on the EJB1
persistence unit. List of things that should work: {two phase JPA bootstrap, CDI
injection of (sub) PUs within respective sub deployment, CDI injection of (top level) PUs
from any component, @DatasourceDefinition use, JPA entity class rewriting/enhancing, lazy
interaction with CDI beanmanager}. List of things that won't work: {sub deployment
EJB1 components cannot inject persistence unit definied in sub deployment EJB2}
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)