User: juhalindfors
  Date: 02/03/17 02:26:14

  Modified:    src/main/org/jboss/mx/loading LoaderRepository.java
  Log:
  always set the class name of the loader repository in system properties
  
  Revision  Changes    Path
  1.3       +11 -5     jmx/src/main/org/jboss/mx/loading/LoaderRepository.java
  
  Index: LoaderRepository.java
  ===================================================================
  RCS file: /cvsroot/jboss/jmx/src/main/org/jboss/mx/loading/LoaderRepository.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- LoaderRepository.java     28 Jan 2002 23:53:36 -0000      1.2
  +++ LoaderRepository.java     17 Mar 2002 10:26:14 -0000      1.3
  @@ -17,7 +17,7 @@
    * @see org.jboss.mx.loading.BasicLoaderRepository
    *
    * @author  <a href="mailto:[EMAIL PROTECTED]";>Juha Lindfors</a>.
  - * @version $Revision: 1.2 $  
  + * @version $Revision: 1.3 $  
    */
   public abstract class LoaderRepository
      implements ServerConstants
  @@ -61,12 +61,14 @@
   
      public synchronized static LoaderRepository getDefaultLoaderRepository()
      {
  -      ClassLoader cl = Thread.currentThread().getContextClassLoader();
  -      String className = System.getProperty(LOADER_REPOSITORY_CLASS_PROPERTY, 
DEFAULT_LOADER_REPOSITORY_CLASS);
  -
  +      
         if (instance != null)
            return instance;
            
  +      ClassLoader cl = Thread.currentThread().getContextClassLoader();
  +      String className = System.getProperty(LOADER_REPOSITORY_CLASS_PROPERTY, 
DEFAULT_LOADER_REPOSITORY_CLASS);
  +      System.setProperty(LOADER_REPOSITORY_CLASS_PROPERTY, className);
  +
         try 
         {
            Class repository = cl.loadClass(className);
  @@ -88,13 +90,17 @@
         }
      }
      
  +   // Public --------------------------------------------------------   
      public Vector getLoaders()
      {
         return loaders;
      }
   
  -   // Public --------------------------------------------------------   
      public abstract Class loadClass(String className) throws ClassNotFoundException;
  +//   {
  +//      return loadClassWithout(null, className);
  +//   }
  +   
      public abstract Class loadClassWithout(ClassLoader loader, String className) 
throws ClassNotFoundException;
      public abstract void addClassLoader(ClassLoader cl);
      public abstract void removeClassLoader(ClassLoader cl);
  
  
  

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

Reply via email to