code: public static void addClassLoaderListener(EnvLoaderListener listener,
                                              ClassLoader loader)
    {
      for (; loader != null; loader = loader.getParent()) {
        if (loader instanceof EnvironmentClassLoader) {
          ((EnvironmentClassLoader) loader).addListener(listener);
          return;
        }
      }
      
      /*
      if (_envSystemClassLoader != null) {
        _envSystemClassLoader.addNotificationListener(listener);
        return;
      }
      */
  
      _globalLoaderListeners.add(listener);
    }
docs: Add listener.
  
  @param listener object to listen for environment create/destroy
  @param loader the context class loader