JBoss Community

Re: How to stop my WAR loading JBoss's provided 3rd party classes?

created by Fabrice Daugan in JBoss Microcontainer - View the full discussion

In fact all issues come from the fact JBoss load the persistence.xml too early. I've tested to update the <provider> tag with a little patch by using "org.hibernate.ejb.HibernatePersistenceMyImpl" (this class has to start with "org.hibernate.ejb.HibernatePersistence" to be considered by Hibernate configuration, but hibernate dos not use the CL of this provided class, but the one of "PersistenceUnitInfo"  (see Ejb3Configuration#configure(PersistenceUnitInfo, Map). One solution could consist to wrap the "PersistenceUnitInfo" with a custom proxy class to force the CL....

Anyway, to be fully compliant with JBoss (and some other JEE servers) I've switch to this solution : http://fabdouglas.blogspot.com/2011/01/how-to-run-spring-3-jpa-application-to.html

Reply to this message by going to Community

Start a new discussion in JBoss Microcontainer at Community