I discovered that in AS 4.2 with a JEE5 application.xml file all normal jars in 
the Lib process are added to the classpath but the file containing the 
persistence.xml needs to be added to the application.xml as a java module.

I also found a workaround for my Global persistence unit. By using some life 
cycle interceptor and a custom annotation I inject the persistence context from 
the JNDI into the persistence manager field. The injector finds the JNDI path 
of the persistence context via a configuration file that I put on the classpath 
in lib aEJB3Lib.jar. This way i can reuse my DAOEJB3Lib.jar and on runtime tell 
it which persistence unit to use.

But I still think that it is a bug that persistence units become global. What 
do you think?

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4079871#4079871

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4079871
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to