[jboss-jira] [JBoss JIRA] (WFLY-5042) Two persistence.xml in two EJB projects within one EAR don't work
Scott Marlow (JIRA)
issues at jboss.org
Mon Nov 16 16:53:00 EST 2015
[ https://issues.jboss.org/browse/WFLY-5042?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13129459#comment-13129459 ]
Scott Marlow commented on WFLY-5042:
------------------------------------
Martin,
I tried to recreate with the latest nightly build and could not. Prior to running, I updated the standalone.xml ExampleDS, to zujcvsdb refer to the test datasource:
{quote}
<subsystem xmlns="urn:jboss:domain:datasources:4.0">
<datasources>
<datasource jndi-name="java:jboss/jdbc/com/daimler/vs3/zujcvsdb" pool-name="ExampleDS" enabled="true" use-java-context="true">
<connection-url>jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE</connection-url>
<driver>h2</driver>
<security>
<user-name>sa</user-name>
<password>sa</password>
</security>
</datasource>
<drivers>
<driver name="h2" module="com.h2database.h2">
<xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
</driver>
</drivers>
</datasources>
</subsystem>
.
.
.
<subsystem xmlns="urn:jboss:domain:ee:4.0">
<spec-descriptor-property-replacement>false</spec-descriptor-property-replacement>
<concurrent>
<context-services>
<context-service name="default" jndi-name="java:jboss/ee/concurrency/context/default" use-transaction-setup-provider="true"/>
</context-services>
<managed-thread-factories>
<managed-thread-factory name="default" jndi-name="java:jboss/ee/concurrency/factory/default" context-service="default"/>
</managed-thread-factories>
<managed-executor-services>
<managed-executor-service name="default" jndi-name="java:jboss/ee/concurrency/executor/default" context-service="default" hung-task-threshold="60000" keepalive-time="5000"/>
</managed-executor-services>
<managed-scheduled-executor-services>
<managed-scheduled-executor-service name="default" jndi-name="java:jboss/ee/concurrency/scheduler/default" context-service="default" hung-task-threshold="60000" keepalive-time="3000"/>
</managed-scheduled-executor-services>
</concurrent>
<default-bindings context-service="java:jboss/ee/concurrency/context/default" datasource="java:jboss/jdbc/com/daimler/vs3/zujcvsdb" managed-executor-service="java:jboss/ee/concurrency/executor/default" managed-scheduled-executor-service="java:jboss/ee/concurrency/scheduler/default" managed-thread-factory="java:jboss/ee/concurrency/factory/default"/>
</subsystem>
{quote}
I believe that you made the same configuration changes as mentioned in [https://github.com/Hades32/wildfly-issues].
> Two persistence.xml in two EJB projects within one EAR don't work
> ------------------------------------------------------------------
>
> Key: WFLY-5042
> URL: https://issues.jboss.org/browse/WFLY-5042
> Project: WildFly
> Issue Type: Bug
> Components: JPA / Hibernate
> Affects Versions: 9.0.0.Final
> Reporter: Martin Rauscher
> Assignee: Scott Marlow
>
> We have an EAR containing a JAR in /lib and two EJBs and one WAR each referencing the JAR. The rest of the dependencies is: WAR->EJB1->EJB2.
> If each of the EJB JARs has its own persistence.xml the EAR cannot be deployed anymore to WildFly. (It worked on WebSphere)
> This works fine as long as no persistence.xml exists. As soon as each EJB gets its own persistence.xml (in our full project they point to different DSs) we're not able to deploy anymore.
> Wildfly doesn't seem to be able to resolve dependencies between modules as soon as there are two persistence.xml's. Despite the (repro) project doesn't even use it (yet). If you remove the persistence.xml's the project works fine. From the error (see below) it looks like the services defined in EJB1 try to use the persistence unit defined in EJB2 despite there not being any kind of reference.
> Repro on [GitHub|https://github.com/Hades32/wildfly-issues].
> Forum discussion [here|https://developer.jboss.org/thread/261445], including logs.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
More information about the jboss-jira
mailing list