code: @Override
    public void stop()
    {
      if (! getLifecycle().toStop()) {
        return;
      }
      
      ArrayList<EnvLoaderListener> listeners = getEnvironmentListeners();
  
      Thread thread = Thread.currentThread();
      ClassLoader oldLoader = thread.getContextClassLoader();
      thread.setContextClassLoader(this);
  
      try {
        // closing down in reverse
        if (listeners != null) {
          for (int i = listeners.size() - 1; i >= 0; i--) {
            EnvLoaderListener listener = listeners.get(i);
  
            try {
              listener.environmentStop(this);
            } catch (Throwable e) {
              log().log(Level.WARNING, e.toString(), e);
            }
          }
        }
        
        super.stop();
      } finally {
        thread.setContextClassLoader(oldLoader);
  
        // drain the thread pool for GC
        // XXX: ExecutorThreadPoolBaratine.getThreadPool().stopEnvironment(this);
      }
    }
docs: Stops the environment, closing down any resources.
  
  The resources are closed in the reverse order that they're started