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 ...
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
[
http://community.jboss.org/message/582756#582756]
Start a new discussion in JBoss Microcontainer at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]