Class Catalina

  • All Implemented Interfaces:
    Lifecycle, Service

    public class Catalina
    extends Embedded
    Startup/Shutdown shell program for Catalina. The following command line options are recognized:
    • -config {pathname} - Set the pathname of the configuration file to be processed. If a relative path is specified, it will be interpreted as relative to the directory pathname specified by the "catalina.base" system property. [conf/server.xml]
    • -help - Display usage information.
    • -stop - Stop the currently running instance of Catalina.
    Should do the same thing as Embedded, but using a server.xml file.
    Version:
    $Revision: 1.5 $ $Date: 2006/11/10 18:12:35 $
    Author:
    Craig R. McClanahan, Remy Maucherat
    • Field Detail

      • configFile

        protected String configFile
        Pathname to the server configuration file.
      • parentClassLoader

        protected ClassLoader parentClassLoader
        The shared extensions class loader for this server.
      • server

        protected Server server
        The server component we are starting or stopping
      • starting

        protected boolean starting
        Are we starting a new server?
      • stopping

        protected boolean stopping
        Are we stopping an existing server?
      • shutdownHook

        protected Thread shutdownHook
        Shutdown hook.
    • Constructor Detail

      • Catalina

        public Catalina()
    • Method Detail

      • setConfig

        public void setConfig​(String file)
      • setConfigFile

        public void setConfigFile​(String file)
      • getConfigFile

        public String getConfigFile()
      • setParentClassLoader

        public void setParentClassLoader​(ClassLoader parentClassLoader)
        Set the shared extensions class loader.
        Parameters:
        parentClassLoader - The shared extensions class loader.
      • main

        public static void main​(String[] args)
        The application main program.
        Parameters:
        args - Command line arguments
      • process

        public void process​(String[] args)
        The instance main program.
        Parameters:
        args - Command line arguments
      • arguments

        protected boolean arguments​(String[] args)
        Process the specified command line arguments, and return true if we should continue processing; otherwise return false.
        Parameters:
        args - Command line arguments to process
      • configFile

        protected File configFile()
        Return a File object representing our configuration file.
      • createStartDigester

        protected Digester createStartDigester()
        Create and configure the Digester we will be using for startup.
      • createStopDigester

        protected Digester createStopDigester()
        Create and configure the Digester we will be using for shutdown.
      • stopServer

        public void stopServer()
      • setCatalinaBase

        public void setCatalinaBase()
        Deprecated.
        Use initDirs()
        Set the catalina.base System property to the current working directory if it has not been set.
      • setCatalinaHome

        public void setCatalinaHome()
        Deprecated.
        Use initDirs()
        Set the catalina.home System property to the current working directory if it has not been set.
      • load

        public void load()
        Start a new server instance.
      • load

        public void load​(String[] args)
      • create

        public void create()
      • start

        public void start()
        Start a new server instance.
        Specified by:
        start in interface Lifecycle
        Overrides:
        start in class Embedded
      • stop

        public void stop()
        Stop an existing server instance.
        Specified by:
        stop in interface Lifecycle
        Overrides:
        stop in class Embedded
      • await

        public void await()
        Await and shutdown.
      • usage

        protected void usage()
        Print usage information for this application.