tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gl...@apache.org
Subject cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup Catalina.java
Date Wed, 26 Dec 2001 11:00:55 GMT
glenn       01/12/26 03:00:55

  Modified:    catalina/src/share/org/apache/catalina/startup Catalina.java
  Log:
  Something changed recently causes the catalina java
  process to hang at this point on shutdown unless there is an
  explicit System.exit().  Could this have something to do with
  the STM changes?
  
  Moved the removeShutdownHook() call after server.stop() to ensure
  that server.stop() doesn't get called a second time by the
  CatalinaShutdownHook.
  
  Revision  Changes    Path
  1.44      +12 -7     jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/Catalina.java
  
  Index: Catalina.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/Catalina.java,v
  retrieving revision 1.43
  retrieving revision 1.44
  diff -u -r1.43 -r1.44
  --- Catalina.java	2001/12/26 01:22:10	1.43
  +++ Catalina.java	2001/12/26 11:00:55	1.44
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/Catalina.java,v
1.43 2001/12/26 01:22:10 glenn Exp $
  - * $Revision: 1.43 $
  - * $Date: 2001/12/26 01:22:10 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/Catalina.java,v
1.44 2001/12/26 11:00:55 glenn Exp $
  + * $Revision: 1.44 $
  + * $Date: 2001/12/26 11:00:55 $
    *
    * ====================================================================
    *
  @@ -97,7 +97,7 @@
    * </u>
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.43 $ $Date: 2001/12/26 01:22:10 $
  + * @version $Revision: 1.44 $ $Date: 2001/12/26 11:00:55 $
    */
   
   public class Catalina {
  @@ -160,7 +160,6 @@
       public static void main(String args[]) {
   
           (new Catalina()).process(args);
  -
       }
   
   
  @@ -179,7 +178,11 @@
           } catch (Exception e) {
               e.printStackTrace(System.out);
           }
  -
  +        // FIX ME ???, something changed recently causes the catalina java
  +        // process to hang at this point on shutdown unless there is an
  +        // explicit System.exit().  Could this have something to do with
  +        // the STM changes?
  +        System.exit(1);
       }
   
   
  @@ -514,8 +517,10 @@
           // Shut down the server
           if (server instanceof Lifecycle) {
               try {
  -                ((Lifecycle) server).stop();
  +                // Remove the ShutdownHook first so that server.stop() doesn't
  +                // get invoked twice
                   Runtime.getRuntime().removeShutdownHook(shutdownHook);
  +                ((Lifecycle) server).stop();
               } catch (LifecycleException e) {
                   System.out.println("Catalina.stop: " + e);
                   e.printStackTrace(System.out);
  
  
  

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


Mime
View raw message