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

Petr H do-not-reply at jboss.com
Tue Jan 4 06:30:09 EST 2011


Petr H [http://community.jboss.org/people/hostalp] 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/578626#578626

--------------------------------------------------------------
I've found out that if I specify an ear file name as domain name in jboss-classloading-domain.xml then I see two classloaders in JMX view:
one is
 domain: "jboss.j2ee:extension=LoaderRepository,service=EARDeployment,url='myapp.ear'" - the default one created by ear deployer, with parent policy: "AFTER_BUT_JAVA_BEFORE" and parent domain "DefaultDomain"
 domain: "myapp.ear" - created from jboss-classloading-domain.xml, with parent policy: "(before=EXCLUDE [org.hibernate.validator] after=)" and no parent domain (null).

So it looks like I'll have to either add jboss-classloading.xml to change the domain name to the same valuse which is in jboss-classloading-domain.xml or modify jboss-classloading-domain.xml to use the default one.
I quickly tried both but it broke the app - it couldn't load javax.servlet.http.HttpServlet (using negated recursive package filter for org.hibernate.validator as before-filter). With some other filter it couldn't start for other reasons so I'll try figure out a bit more about what actually happens..

Also I noticed that war classloaders don't show up any parent domain (null).

So do you think that NothingClassFilter combined with RecursivePackageFilter (the same way as NegatingClassFilter) would do the desired blocking?
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/578626#578626]

Start a new discussion in JBoss Microcontainer at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2114]

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


More information about the jboss-user mailing list