[jboss-user] [JBoss Microcontainer] - Re: How to stop my WAR loading JBoss's provided 3rd party classes?

Ales Justin do-not-reply at jboss.com
Mon Jan 24 07:45:13 EST 2011

Ales Justin [http://community.jboss.org/people/alesj] created the discussion

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

To view the discussion, visit: http://community.jboss.org/message/582756#582756

> 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....
How would it actually got this class' CL if first needs to load the class itself?
Which CL comes from PUInfo? I would expect app's ...

> 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 http://fabdouglas.blogspot.com/2011/01/how-to-run-spring-3-jpa-application-to.html
You can actually force JBossAS to ignore persistence.xml with jboss-ignore.txt,
so not really neccessary to rename the file.

This way of course you delegate the work to ext lib, which then loads local classes first.

But in my test, I later on had issues with EJB, which uses Hibernate for its timers handling.
Afaik, Jaikiran is looking into the issue, as EJBs + timers handling should not overlap with deployment's JPA usage.

btw: nice and useful blog post :-)

Reply to this message by going to Community

Start a new discussion in JBoss Microcontainer at Community

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110124/b233e21a/attachment.html 

More information about the jboss-user mailing list