[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
Tue Jan 4 06:55:14 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/578638#578638

--------------------------------------------------------------
> 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:
> 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..
Ah, another thing I missed -- EARClassLoaderDeployer. ;-(
Same issue as WebCLDeployer, it also sets some defaults, if no CLMetaData exists.

Let me check what gets used if you don't define any parent-domain in jb-cl-domain.xml.
> Also I noticed that war classloaders don't show up any parent domain (null).
How do you see this?
Didn't we fix this with explicit jb-cl.xml in each of the wars? (until WebCLDeployer is fixed)
> So do you think that NothingClassFilter combined with RecursivePackageFilter (the same way as NegatingClassFilter) would do the desired blocking?
If you use NothingFilter then there is nothing to combine. ;-)
--------------------------------------------------------------

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

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/b50f8ac4/attachment.html 


More information about the jboss-user mailing list