code: public void stop()
      {
          Principal user=null;
          try
          {
              // Handle run as
              if (_runAs!=null && _realm!=null)
                  user=_realm.pushRole(null,_runAs);
                  
              if (_servlet!=null)
                  _servlet.destroy();
              _servlet=null;
              
              while (_servlets!=null && _servlets.size()>0)
              {
                  Servlet s = (Servlet)_servlets.pop();
                  s.destroy();
              }
              _config=null;
          }
          finally
          {
              super.stop();
              // pop run-as role
              if (_runAs!=null && _realm!=null && user!=null)
                  _realm.popRole(user);
          }
      }
docs: /* ------------------------------------------------------------