private void addClassLoader(ClassLoader loader,final ObjectName logicalName){
  final ModifiableClassLoaderRepository clr=getInstantiatorCLR();
  if (clr == null) {
    final RuntimeException wrapped=new IllegalArgumentException("Dynamic addition of class loaders" + " is not supported");
    throw new RuntimeOperationsException(wrapped,"Exception occurred trying to register" + " the MBean as a class loader");
  }
  clr.addClassLoader(logicalName,loader);
}

private void addClassLoader ( ClassLoader loader , final ObjectName logicalName ) { final ModifiableClassLoaderRepository clr = getInstantiatorCLR ( ) ; if ( clr == null ) { final RuntimeException wrapped = new IllegalArgumentException ( "Dynamic addition of class loaders" + " is not supported" ) ; throw new RuntimeOperationsException ( wrapped , "Exception occurred trying to register" + " the MBean as a class loader" ) ; } clr . addClassLoader ( logicalName , loader ) ; }
registers a classloader with the clr . this method is called by the resourcecontext from within the repository lock .
