In a .ear file, my EJBs are copied in several jar and war for some technical constraints. And only one of these jar contains the persistence.xml file where I have configured several persistence units.
myear.ear
|---- myjar1.jar
|-------- META-INF/persistence.xml
|---- myjar2.jar
|---- mywar.war
The problem is Jboss cannot find the persistence configuration for the classes within the jar "myjar2" and the war :
Could not get class configuration for ....EjbA.class due to the following errors: Can't find a deployment unit named xxxxx at subdeployment "jar2.jar" of deployment "myear.ear"
To resolve that, I tried to create a new jar containing only the persistence.xml file but it doesn't work.
Any idea of how I could share my persistence.xml file to every jar without reorganising all my ear archive?