We're in a middle of migration to JBoss7.1.1 Final version from JBoss4.
We created a global module that contains our jars that were defined in class path of JBoss4.
The problem is that some jars in the global module contain hibernate persistence.xml inside the META-INF folder:
When myApp.war is trying to load hibernate configuration, hibernate fails to load the persistence.xml from the jars defined in the global module.
Hibernate tries to do it with the following code.
Thread.currentThread().getContextClassLoader().getResources( "META-INF/persistence.xml" );
I tried to resolve it by defining a filter on the resource that contains the persistence.xml, but it didn't work:
<resource-root path="my.jar" >
<include path="META-INF/**" />
I can resolve it my explicit dependency on my global module and importing the META-INF (just as we do it in Spring):
But it doesn't sound right, since it's a global module and should be visible for all, including it's META-INF.
Any ideas why the filter tag doesn't work and how I can make the META-INF folder of jars in global module visible for all?
Thanks in advance,