>If the deadlock between these two classes can occur, CL1
>must use CL2 to load C2, and CL2 must use CL1 to load C1.
>But that would mean that CL2 is a parent of CL1, and CL1
>is a parent of CL2. I believe that circular class loader
>parentage is impossible in Java.

But that is exactly the central design of the RH-ServiceLibraries! 

In order to make hot-deploy of server parts possible, the code that would 
normally be deployed into a single classloader, is now dsitributed into a 
set of *mutually dependent* classloaders. 

This is reached by delegating the URLClassLoader.loadClass(String, boolean)
to 
ServiceLibraries.loadClass(String,boolean) which then dispatches again to
the 
individual ClassLoader.loadClass(String, boolean).

Since ClassLoader.loadClassInternal(String) and
ClassLoader.loadClass(String,boolean) 
are both synchronized on the instances, we could run into the problem, no
matter whether
ServiceLibraries does or does not lock anything, right?

CGJ

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to