nacho       01/02/25 09:47:17

  Modified:    src/share/org/apache/tomcat/core ContextManager.java
  Log:
  Decoupling stop from shutdown..
  Now a embedded tomcat can be stopped and the restarted .
  
  Shutdown implicitly  stops first
  
  Revision  Changes    Path
  1.170     +2 -4      
jakarta-tomcat/src/share/org/apache/tomcat/core/ContextManager.java
  
  Index: ContextManager.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/ContextManager.java,v
  retrieving revision 1.169
  retrieving revision 1.170
  diff -u -r1.169 -r1.170
  --- ContextManager.java       2001/02/20 03:17:56     1.169
  +++ ContextManager.java       2001/02/25 17:47:16     1.170
  @@ -542,7 +542,7 @@
        if( state==STATE_NEW ) {
            init();
        }
  -
  +        if( state==STATE_START ) return;
        BaseInterceptor cI[]=defaultContainer.getInterceptors();
        for( int i=0; i< cI.length; i++ ) {
            cI[i].engineStart( this );
  @@ -561,9 +561,6 @@
        for( int i=0; i< cI.length; i++ ) {
            cI[i].engineStop( this );
        }
  -
  -     // XXX we shouldn't call shutdown in stop !
  -     shutdown();
       }
   
       /** Remove all contexts.
  @@ -571,6 +568,7 @@
        *  - call Interceptor.engineShutdown() hooks.
        */
       public final void shutdown() throws TomcatException {
  +        if( state==STATE_START ) stop();
        while (!contextsV.isEmpty()) {
            removeContext((Context)contextsV.firstElement());
        }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to