/*
 * JBoss, the OpenSource J2EE webOS
 *
 * Distributable under LGPL license.
 * See terms of license at gnu.org.
 */
package javax.management.loading;

import javax.management.JMRuntimeException;

/**
 * Keeps the list of Class Loaders registered in the MBean Server. It provides the necessary methods to load classes using the registered Class Loaders.
 * <p/>
 * This deprecated class is maintained for compatibility. In previous versions of JMX, there was one DefaultLoaderRepository
 * shared by all MBean servers. As of JMX 1.2, that functionality is approximated by using MBeanServerFactory.findMBeanServer(java.lang.String)
 * to find all known MBean servers, and consulting the ClassLoaderRepository of each one. It is strongly recommended that
 * code referencing DefaultLoaderRepository be rewritten.
 *
 * @deprecated Use MBeanServer.getClassLoaderRepository() instead.
 *
 * @author <a href="mailto:juha@jboss.org">Juha Lindfors</a>.
 * @version $Revision: 1.9.6.1 $
 */
public class DefaultLoaderRepository
{
   public static Class loadClass(String className) throws ClassNotFoundException
   {
      throw new JMRuntimeException("Deprecated, use MBeanServer.getClassLoaderRepository() instead");
   }

   public static Class loadClassWithout(ClassLoader loader, String className) throws ClassNotFoundException
   {
      throw new JMRuntimeException("Deprecated, use MBeanServer.getClassLoaderRepository() instead");
   }
}


