My web application (which is deployed under JBoss) is throwing a lot of 
exceptions and they appear to all be instances where calls to 
java.lang.Class.forName() is failing.

After some googling I have found the following info:

If you use Class.forName() this is 
MyClass?.class.getClassLoader().loadClass(...) which will start from the 
classloader where your class is deployed.

You should use Thread.currentThread().getContextClassLoader().loadClass(...) to 
load from the current application's classloader. 

Is this accurate?  I *really* would prefer *not* to modify the entire code-base 
to access the ClassLoader differently.

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4110689
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to