public static ServicesAmp getContextManager(ClassLoader loader)
  {
    ServicesAmp manager = _contextManager.getLevel(loader);
    
    if (manager == null) {
      SoftReference<ServicesAmp> managerRef = _contextMap.get(loader);

      if (managerRef != null) {
        return managerRef.get();
      }
      
      /*
      if (log.isLoggable(Level.FINEST)) {
        RuntimeException exn =  new IllegalStateException(String.valueOf(loader));
        //exn.fillInStackTrace();
        log.log(Level.FINEST, exn.toString(), exn);
      }
      */
    }
    
    return manager;
    /*
    if (manager == null) {
      ServiceManagerBuilderAmp managerBuilder = newManagerBuilder();
      
      String name = Environment.getEnvironmentName(loader);

      managerBuilder.classLoader(loader);
      managerBuilder.name(name);

      manager = managerBuilder.build();
      
      _contextManager.setIfAbsent(manager);
      
      manager = _contextManager.get(loader);
    }
    
    return manager;
    */
  }
public static ServicesAmp getContextManager ( ClassLoader loader ) { ServicesAmp manager = _contextManager . getLevel ( loader ) ; if ( manager == null ) { SoftReference < ServicesAmp > managerRef = _contextMap . get ( loader ) ; if ( managerRef != null ) { return managerRef . get ( ) ; } } return manager ; }
/*
public static ServiceManagerAmp newContextManager()
{
ClassLoader loader = Thread.currentThread().getContextClassLoader();

synchronized (_contextManager) {
ServiceManagerAmp manager = _contextManager.getLevel(loader);

if (manager == null) {
manager = newManager();

_contextManager.set(manager);
}

return manager;
}
}