[jboss-user] [Clustering/JBoss] - Re: Classloading failure in a new thread started from the cl

chtimi2 do-not-reply at jboss.com
Tue Feb 10 07:01:38 EST 2009

What is the correct way to get a handle to the application ClassLoader (ear ClassLoader)? I couldn't find the info anywhere. I also tried to use 

  | UnifiedClassLoader ucl = (UnifiedClassLoader) Thread.currentThread().getContextClassLoader();			
  | String earPath = "file:/opt/jboss-4.2.3.GA/server/all/deploy/[MyApplication].ear";
  | URL earURL = new URL ( earPath );
  | ucl.addURL ( earURL );
but to no avail (the UCl's URL property was still null no matter what).

Also is there an intrinsic problem with not using the <loader-repository> parameter? Outside of the fact you can't specify isolation of course but if you don't is it a bad practice? 

Maybe it doesn't do what i think it does?
>From the wiki this specifies Isolation with Overriding Server Classes so it seems to me to mean that the Seam application overrides server classes, that is classes that are in the ear are always loaded from there even if they exist in "upper" classloaders. But why does it do anything to the classloading of classes not in the Seam application?

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4208506#4208506

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4208506

More information about the jboss-user mailing list