Hey Ian,
Dependent classes are loaded by the loader that loaded the current class (unless manually
declared otherwise using ClassLoader.loadClass(). So if Class X uses Class Y directly (by
referencing its type in the source code), class Y will be loaded from Class X's
class-loader. Now, X's ClassLoader may still delegate to a different classloader, but
ClassLoader X will be the first place that is checked, if I am not mistaken. The second
place that is checked if it is not found there, is the Thread.getContextClassLoader().
I hope this helps,
Lincoln
Posted by forums
Original post:
https://developer.jboss.org/message/913626#913626