org.apache.catalina.startup

Class Catalina

Implemented Interfaces:
Lifecycle, MBeanRegistration, Service

public class Catalina
extends Embedded

Startup/Shutdown shell program for Catalina. The following command line options are recognized:

Version:
$Revision: 1.28.2.1 $ $Date: 2004/09/15 18:26:53 $

Authors:
Craig R. McClanahan
Remy Maucherat

Nested Class Summary

protected class
Catalina.CatalinaShutdownHook
Shutdown hook which will perform a clean shutdown of Catalina if needed.

Field Summary

protected String
configFile
Pathname to the server configuration file.
protected ClassLoader
parentClassLoader
The shared extensions class loader for this server.
protected Server
server
The server component we are starting or stopping
protected Thread
shutdownHook
Shutdown hook.
protected boolean
starting
Are we starting a new server?
protected boolean
stopping
Are we stopping an existing server?
protected boolean
useShutdownHook
Use shutdown hook flag.

Fields inherited from class org.apache.catalina.startup.Embedded

await, engines, info, lifecycle, logger, realm, sm, socketFactory, started, useNaming

Fields inherited from class org.apache.catalina.core.StandardService

connectors, container, controller, debug, domain, initialized, mserver, oname, suffix, support, type

Fields inherited from interface org.apache.catalina.Lifecycle

AFTER_START_EVENT, AFTER_STOP_EVENT, BEFORE_START_EVENT, BEFORE_STOP_EVENT, START_EVENT, STOP_EVENT

Method Summary

protected boolean
arguments(args[] )
Process the specified command line arguments, and return true if we should continue processing; otherwise return false.
void
await()
Await and shutdown.
protected File
configFile()
Return a File object representing our configuration file.
void
create()
protected Digester
createStartDigester()
Create and configure the Digester we will be using for startup.
protected Digester
createStopDigester()
Create and configure the Digester we will be using for shutdown.
void
destroy()
String
getConfigFile()
boolean
getUseShutdownHook()
void
load()
Start a new server instance.
void
load(args[] )
static void
main(args[] )
The application main program.
void
process(args[] )
The instance main program.
void
setCatalinaBase()
Deprecated. Use initDirs()
void
setCatalinaHome()
Deprecated. Use initDirs()
void
setConfig(String file)
void
setConfigFile(String file)
void
setParentClassLoader(ClassLoader parentClassLoader)
Set the shared extensions class loader.
void
setServer(Server server)
Set the server instance we are configuring.
void
setUseShutdownHook(boolean useShutdownHook)
void
start()
Start a new server instance.
void
stop()
Stop an existing server instance.
void
stopServer()
void
stopServer(String[] arguments)
protected void
usage()
Print usage information for this application.

Methods inherited from class org.apache.catalina.startup.Embedded

addConnector, addEngine, addLifecycleListener, createConnector, createConnector, createConnector, createConnector, createContext, createEngine, createHost, createLoader, findLifecycleListeners, getCatalinaBase, getCatalinaHome, getInfo, getLogger, getRealm, getSocketFactory, initDirs, initNaming, isAwait, isUseNaming, removeContext, removeEngine, removeHost, removeLifecycleListener, setAwait, setCatalinaBase, setCatalinaHome, setLogger, setRealm, setSecurityProtection, setSocketFactory, setUseNaming, start, stop

Methods inherited from class org.apache.catalina.core.StandardService

addConnector, addLifecycleListener, addPropertyChangeListener, destroy, findConnectors, findLifecycleListeners, getConnectorNames, getContainer, getContainerName, getDebug, getDomain, getInfo, getName, getObjectName, getServer, init, initialize, postDeregister, postRegister, preDeregister, preRegister, removeConnector, removeLifecycleListener, removePropertyChangeListener, setContainer, setDebug, setName, setServer, start, stop, toString

Field Details

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


shutdownHook

protected Thread shutdownHook
Shutdown hook.


starting

protected boolean starting
Are we starting a new server?


stopping

protected boolean stopping
Are we stopping an existing server?


useShutdownHook

protected boolean useShutdownHook
Use shutdown hook flag.

Method Details

arguments

protected boolean arguments(args[] )
Process the specified command line arguments, and return true if we should continue processing; otherwise return false.

Parameters:


await

public void await()
Await and shutdown.


configFile

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


create

public void create()


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.


destroy

public void destroy()
Overrides:
destroy in interface StandardService


getConfigFile

public String getConfigFile()


getUseShutdownHook

public boolean getUseShutdownHook()


load

public void load()
Start a new server instance.


load

public void load(args[] )


main

public static void main(args[] )
The application main program.

Parameters:


process

public void process(args[] )
The instance main program.

Parameters:


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.


setConfig

public void setConfig(String file)


setConfigFile

public void setConfigFile(String file)


setParentClassLoader

public void setParentClassLoader(ClassLoader parentClassLoader)
Set the shared extensions class loader.

Parameters:
parentClassLoader - The shared extensions class loader.


setServer

public void setServer(Server server)
Set the server instance we are configuring.
Specified by:
setServer in interface Service
Overrides:
setServer in interface StandardService

Parameters:
server - The new server


setUseShutdownHook

public void setUseShutdownHook(boolean useShutdownHook)


start

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


stop

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


stopServer

public void stopServer()


stopServer

public void stopServer(String[] arguments)


usage

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


Copyright B) 2000-2003 Apache Software Foundation. All Rights Reserved.