[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 3 18:52:52 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/578485#578485

> The bad thing is that it was behaving the same way no matter if Validator was bundled or not.
This is a Hibernate issue, or who ever tries to get a hold of Validator resources.
> > If the Hibernate was/is part of war' lib/ dir then this makes sense.
> > If not, then it's strange. :-)
>  It was in ear/lib, referenced from war via MANIFEST.MF Class-Path entry.
That's the same thing as if were part of WEB-INF/lib, since it becomes war' classpath entry.
> That gives me an idea - does the JBoss Class Filter still give an access to a particular class (in JBoss libs) when there's a filter match but the class isn't in the app?
> Maybe the problem here is because there's no such class in the app so even though the filter is setup properly it doesn't have any effect here - beceuse it's just a "preference" filter and not really a "blocking" one. 
Sure, exactly -- it's a "preference" filter.
It tells the domain not to look for any "org.hibernate" resources in the parent before it looks into own domain.
(as we know, usual Java lookup mechanism is parent first)

But since they are not found in own domain,
it goes into *after* phase and looks into parent domain.

You can also setup the after lookup to be filtered the way you want it.

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/20110103/0a7460b3/attachment.html 

More information about the jboss-user mailing list