code: public static void onGlobalEnd ()
    {
      s_aGlobalLock.locked ( () -> {
        /**
         * This code removes all attributes set for the global context. This is
         * necessary, since the attributes would survive a Tomcat servlet context
         * reload if we don't kill them manually.<br>
         * Global scope variable may be null if onGlobalBegin() was never called!
         */
        if (s_aGlobalScope != null)
        {
          // Invoke SPI
          ScopeSPIManager.getInstance ().onGlobalScopeEnd (s_aGlobalScope);
  
          // Destroy and invalidate scope
          final String sDestroyedScopeID = s_aGlobalScope.getID ();
          s_aGlobalScope.destroyScope ();
          s_aGlobalScope = null;
  
          // done
          if (ScopeHelper.debugGlobalScopeLifeCycle (LOGGER))
            LOGGER.info ("Global scope '" + sDestroyedScopeID + "' shut down!", ScopeHelper.getDebugStackTrace ());
        }
        else
          LOGGER.warn ("No global scope present that could be shut down!");
      });
    }
docs: To be called when the singleton global context is to be destroyed.