Jason Greene [
http://community.jboss.org/people/jason.greene] created the discussion
"Re: Classloader parent delegation on Jboss AS7"
To view the discussion, visit:
http://community.jboss.org/message/614806#614806
--------------------------------------------------------------
Sorry for my delay in replying. I had the Final release to get out the door.
So the issue here is that by having hibernate in ear/lib it's always added to all
deployments in the ear. What I would recommend you doing is moving it and xpto.jar to the
war WEB-INF/lib since you mention that it is only used there. Due to the fact that we auto
add hibernate with the presence of JPA annotations to all subdeployments (something I want
to limit in a future release), you also need to add an exclusion for your war to not
import the server's version of hibernate.
You do that by putting a jboss-deployment-structure.xml file in your ear's META-INF
directory. There you list a <sub-deployment name="web.war"> and in that
you add an <exclusions> with a module name of "org.hibernate".
Take a look at for more info and an example
https://docs.jboss.org/author/display/AS7/Class+Loading+in+AS7
https://docs.jboss.org/author/display/AS7/Class+Loading+in+AS7
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/614806#614806]
Start a new discussion in JBoss AS7 Development at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]