tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup Catalina.java
Date Fri, 27 Feb 2004 22:43:09 GMT
markt       2004/02/27 14:43:09

  Modified:    catalina/src/share/org/apache/catalina/startup Catalina.java
  Log:
  Fix bug 15572. Ensure the catalina.useNaming property is set before executing the digester
so the -nonaming command line option has an effect. Patch provided by Gary Benson.
  
  Revision  Changes    Path
  1.52      +21 -26    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.51
  retrieving revision 1.52
  diff -u -r1.51 -r1.52
  --- Catalina.java	24 Oct 2002 02:42:03 -0000	1.51
  +++ Catalina.java	27 Feb 2004 22:43:09 -0000	1.52
  @@ -69,17 +69,12 @@
   import java.io.FileInputStream;
   import java.io.IOException;
   import java.io.OutputStream;
  -import java.lang.reflect.InvocationTargetException;
  -import java.lang.reflect.Constructor;
   import java.net.Socket;
   import java.security.Security;
  -import java.util.Stack;
   import org.apache.catalina.Container;
   import org.apache.catalina.Lifecycle;
   import org.apache.catalina.LifecycleException;
  -import org.apache.catalina.LifecycleListener;
   import org.apache.catalina.Server;
  -import org.apache.catalina.Loader;
   import org.apache.commons.digester.Digester;
   import org.apache.commons.digester.Rule;
   import org.apache.tomcat.util.log.SystemLogHandler;
  @@ -437,23 +432,6 @@
        */
       protected void start() {
   
  -        // Create and execute our Digester
  -        Digester digester = createStartDigester();
  -        File file = configFile();
  -        try {
  -            InputSource is =
  -                new InputSource("file://" + file.getAbsolutePath());
  -            FileInputStream fis = new FileInputStream(file);
  -            is.setByteStream(fis);
  -            digester.push(this);
  -            digester.parse(is);
  -            fis.close();
  -        } catch (Exception e) {
  -            System.out.println("Catalina.start: " + e);
  -            e.printStackTrace(System.out);
  -            System.exit(1);
  -        }
  -
           // Setting additional variables
           if (!useNaming) {
               System.setProperty("catalina.useNaming", "false");
  @@ -473,6 +451,23 @@
                       (javax.naming.Context.INITIAL_CONTEXT_FACTORY,
                        "org.apache.naming.java.javaURLContextFactory");
               }
  +        }
  +
  +        // Create and execute our Digester
  +        Digester digester = createStartDigester();
  +        File file = configFile();
  +        try {
  +            InputSource is =
  +                new InputSource("file://" + file.getAbsolutePath());
  +            FileInputStream fis = new FileInputStream(file);
  +            is.setByteStream(fis);
  +            digester.push(this);
  +            digester.parse(is);
  +            fis.close();
  +        } catch (Exception e) {
  +            System.out.println("Catalina.start: " + e);
  +            e.printStackTrace(System.out);
  +            System.exit(1);
           }
   
           // If a SecurityManager is being used, set properties for
  
  
  

---------------------------------------------------------------------
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