tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core StandardContext.java
Date Thu, 22 May 2003 18:20:03 GMT
remm        2003/05/22 11:20:03

  Modified:    catalina/src/share/org/apache/catalina/core
                        StandardContext.java
  Log:
  - Experiment: Reload = stop + start. This would obviously
    simplify processing. The performance impact is not too big overall (IMO).
    Comments ?
  - Fix a bug where the context is not registered again in JMX after a stop/start,
    which would break mapping.
  
  Revision  Changes    Path
  1.57      +22 -4     jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardContext.java
  
  Index: StandardContext.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardContext.java,v
  retrieving revision 1.56
  retrieving revision 1.57
  diff -u -r1.56 -r1.57
  --- StandardContext.java	21 May 2003 17:49:03 -0000	1.56
  +++ StandardContext.java	22 May 2003 18:20:03 -0000	1.57
  @@ -2766,6 +2766,23 @@
           // Stop accepting requests temporarily
           setPaused(true);
   
  +        try {
  +            stop();
  +        } catch (LifecycleException e) {
  +            log.error(sm.getString("standardContext.stoppingContext"), e);
  +        }
  +
  +        try {
  +            start();
  +        } catch (LifecycleException e) {
  +            log.error(sm.getString("standardContext.startingContext"), e);
  +        }
  +
  +        setPaused(false);
  +
  +        if (true)
  +            return;
  +
           // Binding thread
           ClassLoader oldCCL = bindThread();
   
  @@ -4323,10 +4340,10 @@
           
           // Notify our interested LifecycleListeners
           lifecycle.fireLifecycleEvent(AFTER_STOP_EVENT, null);
  -        
  -        
  +
           if (log.isDebugEnabled())
               log.debug("Stopping complete");
  +
       }
   
       /** Destroy needs to clean up the context completely.
  @@ -4351,7 +4368,8 @@
           children=new HashMap();
           log.debug("resetContext " + oname + " " + mserver);
           if( oname != null ) { 
  -            Registry.getRegistry().unregisterComponent(oname); 
  +            Registry.getRegistry().unregisterComponent(oname);
  +            oname = null;
           }
           
       }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message