tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From craig...@locus.apache.org
Subject cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup Catalina.java
Date Mon, 11 Sep 2000 18:46:24 GMT
craigmcc    00/09/11 11:46:22

  Modified:    catalina/src/share/org/apache/catalina/startup Catalina.java
  Log:
  Make the "org.apache.catalina.startup.Catalina" class amenable to subclassing
  by removing the "final" declaration and changing private instance variables and
  methods to protected instead.
  
  Submitted by: Bernd Eilers <bei@stardivision.de>
  
  Revision  Changes    Path
  1.3       +24 -20    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.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Catalina.java	2000/09/08 22:29:36	1.2
  +++ Catalina.java	2000/09/11 18:46:19	1.3
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/Catalina.java,v
1.2 2000/09/08 22:29:36 craigmcc Exp $
  - * $Revision: 1.2 $
  - * $Date: 2000/09/08 22:29:36 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/Catalina.java,v
1.3 2000/09/11 18:46:19 craigmcc Exp $
  + * $Revision: 1.3 $
  + * $Date: 2000/09/11 18:46:19 $
    *
    * ====================================================================
    *
  @@ -94,10 +94,10 @@
    * </u>
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.2 $ $Date: 2000/09/08 22:29:36 $
  + * @version $Revision: 1.3 $ $Date: 2000/09/11 18:46:19 $
    */
   
  -public final class Catalina {
  +public class Catalina {
   
   
       // ----------------------------------------------------- Instance Variables
  @@ -106,31 +106,31 @@
       /**
        * Pathname to the server configuration file.
        */
  -    private String configFile = "conf/server.xml";
  +    protected String configFile = "conf/server.xml";
   
   
       /**
        * Set the debugging detail level on our XmlMapper.
        */
  -    private boolean debug = false;
  +    protected boolean debug = false;
   
   
       /**
        * The server component we are starting or stopping
        */
  -    private Server server = null;
  +    protected Server server = null;
   
   
       /**
        * Are we starting a new server?
        */
  -    private boolean starting = false;
  +    protected boolean starting = false;
   
   
       /**
        * Are we stopping an existing server?
        */
  -    private boolean stopping = false;
  +    protected boolean stopping = false;
   
   
       // ----------------------------------------------------------- Main Program
  @@ -180,7 +180,7 @@
       }
   
   
  -    // -------------------------------------------------------- Private Methods
  +    // ------------------------------------------------------ Protected Methods
   
   
       /**
  @@ -190,7 +190,7 @@
        *
        * @param args Command line arguments to process
        */
  -    private boolean arguments(String args[]) {
  +    protected boolean arguments(String args[]) {
   
   	boolean isConfig = false;
   
  @@ -222,7 +222,7 @@
       /**
        * Return a File object representing our configuration file.
        */
  -    private File configFile() {
  +    protected File configFile() {
   
   	File file = new File(configFile);
   	if (!file.isAbsolute())
  @@ -236,7 +236,7 @@
       /**
        * Create and configure the XmlMapper we will be using for startup.
        */
  -    private XmlMapper createStartMapper() {
  +    protected XmlMapper createStartMapper() {
   
   	// Initialize the mapper
   	XmlMapper mapper = new XmlMapper();
  @@ -473,7 +473,7 @@
       /**
        * Create and configure the XmlMapper we will be using for shutdown.
        */
  -    private XmlMapper createStopMapper() {
  +    protected XmlMapper createStopMapper() {
   
           // Initialize the mapper
           XmlMapper mapper = new XmlMapper();
  @@ -496,7 +496,7 @@
       /**
        * Execute the processing that has been configured from the command line.
        */
  -    private void execute() throws Exception {
  +    protected void execute() throws Exception {
   
           if (starting)
   	    start();
  @@ -509,7 +509,7 @@
       /**
        * Start a new server instance.
        */
  -    private void start() {
  +    protected void start() {
   
           // Create and execute our mapper
           XmlMapper mapper = createStartMapper();
  @@ -532,6 +532,8 @@
   	    } catch (LifecycleException e) {
   	        System.out.println("Catalina.start: " + e);
   		e.printStackTrace(System.out);
  +                System.out.println("----- Root Cause -----");
  +                e.getThrowable().printStackTrace(System.out);
   	    }
   	}
   
  @@ -546,6 +548,8 @@
   	    } catch (LifecycleException e) {
   	        System.out.println("Catalina.stop: " + e);
   	        e.printStackTrace(System.out);
  +                System.out.println("----- Root Cause -----");
  +                e.getThrowable().printStackTrace(System.out);
   	    }
   	}
   
  @@ -555,7 +559,7 @@
       /**
        * Stop an existing server instance.
        */
  -    private void stop() {
  +    protected void stop() {
   
         // Create and execute our mapper
         XmlMapper mapper = createStopMapper();
  @@ -591,7 +595,7 @@
       /**
        * Print usage information for this application.
        */
  -    private void usage() {
  +    protected void usage() {
   
   	System.out.println("usage: java org.apache.catalina.startup.Catalina" +
   			" [ -config {pathname} ] [ -debug ] { start | stop }");
  @@ -602,7 +606,7 @@
   }
   
   
  -// --------------------------------------------------- Private Classes
  +// ------------------------------------------------------------ Private Classes
   
   
   /**
  
  
  

Mime
View raw message