Save This Page
Home » jboss-5.0.0.CR1-src » org.jboss.mx » loading » [javadoc | source]
org.jboss.mx.loading
public class: LoadMgr3 [javadoc | source]
java.lang.Object
   org.jboss.mx.loading.LoadMgr3
A utility class used by the UnifiedClassLoader3 to manage the thread based class loading tasks.
Nested Class Summary:
public static class  LoadMgr3.PkgClassLoader  A UCL and its relative ordering with respect to the class loading. The UCL with the lowest order to load a class is the UCL that will populate the repository cache and be assigned as the UCL.loadClass return value. 
Method from org.jboss.mx.loading.LoadMgr3 Summary:
beginLoadTask,   endLoadTask,   nextTask,   registerLoaderThread
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.jboss.mx.loading.LoadMgr3 Detail:
 public static boolean beginLoadTask(ClassLoadingTask task,
    UnifiedLoaderRepository3 repository) throws ClassNotFoundException 
    Initiate the class loading task. This is called by UCL3.loadClass to initiate the process of loading the requested class. This first attempts to load the class from the repository cache, and then the class loaders in the repsository. If the package of the class is found in the repository then one or more ThreadTask are created to complete the ClassLoadingTask. The ThreadTask are assigned to the threads that own the associated UCL3 monitor. If no class loader serves the class package, then the requesting class loader is asked if it can load the class.
 public static  void endLoadTask(ClassLoadingTask task) 
    Complete a ClassLoadingTask. This is called by UCL3.loadClass to indicate that the thread is existing the loadClass method.
 public static  void nextTask(Thread t,
    ClassLoadingTask task,
    UnifiedLoaderRepository3 repository) throws InterruptedException 
    Called by threads owning a UCL3.loadLock from within UCL3.loadClass to process ThreadTasks assigned to them. This is the mechanism by which we avoid deadlock due to a given loadClass request requiring multiple UCLs to be involved. Any thread active in loadClass with the monitor held processes class loading tasks that must be handled by its UCL3. The active set of threads loading classes form a pool of cooperating threads.
 public static  void registerLoaderThread(RepositoryClassLoader ucl,
    Thread t) 
    Register that a thread owns the UCL3.loadClass monitor. This is called from within UCL3.loadClass(String,boolean) and this method creates entries in the loadClassThreads and loadTasksByThread maps.