patrickl    01/12/02 11:22:23

  Modified:    catalina/src/share/org/apache/catalina/startup Catalina.java
  Log:
  Reversed previous revision and moved server.await() into the same try/catch block as 
server.start(). This change, which forces Tomcat to immediately shutdown if an 
exception is thrown by server.initialize() or server.start(), was recommended by Remy 
Maucherat. Immediate shutdown of Tomcat is preferred because this behavior is 
consistent no matter what types of Connectors are configured for Tomcat whereas, in 
the previous revision, the behavior was dependent on the order of the Connectors 
within server.xml.
  
  Revision  Changes    Path
  1.41      +2 -13     
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.40
  retrieving revision 1.41
  diff -u -r1.40 -r1.41
  --- Catalina.java     2001/11/29 17:18:09     1.40
  +++ Catalina.java     2001/12/02 19:22:23     1.41
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/Catalina.java,v
 1.40 2001/11/29 17:18:09 patrickl Exp $
  - * $Revision: 1.40 $
  - * $Date: 2001/11/29 17:18:09 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/Catalina.java,v
 1.41 2001/12/02 19:22:23 patrickl Exp $
  + * $Revision: 1.41 $
  + * $Date: 2001/12/02 19:22:23 $
    *
    * ====================================================================
    *
  @@ -97,7 +97,7 @@
    * </u>
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.40 $ $Date: 2001/11/29 17:18:09 $
  + * @version $Revision: 1.41 $ $Date: 2001/12/02 19:22:23 $
    */
   
   public class Catalina {
  @@ -494,16 +494,9 @@
           if (server instanceof Lifecycle) {
               try {
                   server.initialize();
  -            } catch (LifecycleException e) {
  -                System.out.println("Catalina.start: " + e);
  -                e.printStackTrace(System.out);
  -                if (e.getThrowable() != null) {
  -                    System.out.println("----- Root Cause -----");
  -                    e.getThrowable().printStackTrace(System.out);
  -                }
  -            }
  -            try {
                   ((Lifecycle) server).start();
  +                // Wait for the server to be told to shut down
  +                server.await();
               } catch (LifecycleException e) {
                   System.out.println("Catalina.start: " + e);
                   e.printStackTrace(System.out);
  @@ -513,10 +506,6 @@
                   }
               }
           }
  -
  -
  -        // Wait for the server to be told to shut down
  -        server.await();
   
           // Shut down the server
           if (server instanceof Lifecycle) {
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to