Package org.apache.catalina.startup
Class Catalina
java.lang.Object
org.apache.catalina.startup.Catalina
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.
- -nonaming - Disable naming support.
- configtest - Try to test the config
- start - Start an instance of Catalina.
- stop - Stop the currently running instance of Catalina.
- Author:
- Craig R. McClanahan, Remy Maucherat
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionprotected classShutdown hook which will perform a clean shutdown of Catalina if needed.static interface
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected booleanUse await.protected StringPathname to the server configuration file.protected booleanGenerate Tomcat embedded code from configuration files.protected FileLocation of generated sources.protected StringValue of the argument.protected StringTop package name for generated source.protected booleanPrevent duplicate loads.protected ClassLoaderThe shared extensions class loader for this server.protected ServerThe server component we are starting or stopping.static final Stringprotected ThreadShutdown hook.protected static final StringManagerThe string manager for this package.protected booleanRethrow exceptions on init failure.protected booleanUse generated code as a replacement for configuration files.protected booleanIs naming enabled ?protected booleanUse shutdown hook flag.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected booleanProcess the specified command line arguments.voidawait()Await and shutdown.protected FileReturn a File object representing our configuration file.protected DigesterCreate and configure the Digester we will be using for startup.protected DigesterCreate and configure the Digester we will be using for shutdown.protected voidgenerateClassFooter(Digester digester) protected voidgenerateClassHeader(Digester digester, boolean start) protected voidbooleanbooleanbooleanbooleanprotected voidprotected voidbooleanisAwait()booleanvoidload()Start a new server instance.voidprotected voidparseServerXml(boolean start) voidsetAwait(boolean b) voidsetConfigFile(String file) voidsetGenerateCode(boolean generateCode) voidsetGeneratedCodeLocation(File generatedCodeLocation) voidsetGeneratedCodePackage(String generatedCodePackage) voidsetParentClassLoader(ClassLoader parentClassLoader) Set the shared extensions class loader.protected voidSet the security package access/protection.voidvoidsetThrowOnInitFailure(boolean throwOnInitFailure) Set the behavior regarding errors that could occur during server init.voidsetUseGeneratedCode(boolean useGeneratedCode) voidsetUseNaming(boolean useNaming) Enables or disables naming support.voidsetUseShutdownHook(boolean useShutdownHook) voidstart()Start a new server instance.voidstop()Stop an existing server instance.voidvoidstopServer(String[] arguments) protected voidusage()Print usage information for this application.
- 
Field Details- 
smThe string manager for this package.
- 
SERVER_XML- See Also:
 
- 
awaitprotected boolean awaitUse await.
- 
configFilePathname to the server configuration file.
- 
parentClassLoaderThe shared extensions class loader for this server.
- 
serverThe server component we are starting or stopping.
- 
useShutdownHookprotected boolean useShutdownHookUse shutdown hook flag.
- 
shutdownHookShutdown hook.
- 
useNamingprotected boolean useNamingIs naming enabled ?
- 
loadedprotected boolean loadedPrevent duplicate loads.
- 
throwOnInitFailureprotected boolean throwOnInitFailureRethrow exceptions on init failure.
- 
generateCodeprotected boolean generateCodeGenerate Tomcat embedded code from configuration files.
- 
generatedCodeLocationLocation of generated sources.
- 
generatedCodeLocationParameterValue of the argument.
- 
generatedCodePackageTop package name for generated source.
- 
useGeneratedCodeprotected boolean useGeneratedCodeUse generated code as a replacement for configuration files.
 
- 
- 
Constructor Details- 
Catalinapublic Catalina()
 
- 
- 
Method Details- 
setConfigFile
- 
getConfigFile
- 
setUseShutdownHookpublic void setUseShutdownHook(boolean useShutdownHook) 
- 
getUseShutdownHookpublic boolean getUseShutdownHook()
- 
getGenerateCodepublic boolean getGenerateCode()
- 
setGenerateCodepublic void setGenerateCode(boolean generateCode) 
- 
getUseGeneratedCodepublic boolean getUseGeneratedCode()
- 
setUseGeneratedCodepublic void setUseGeneratedCode(boolean useGeneratedCode) 
- 
getGeneratedCodeLocation
- 
setGeneratedCodeLocation
- 
getGeneratedCodePackage
- 
setGeneratedCodePackage
- 
getThrowOnInitFailurepublic boolean getThrowOnInitFailure()- Returns:
- trueif an exception should be thrown if an error occurs during server init
 
- 
setThrowOnInitFailurepublic void setThrowOnInitFailure(boolean throwOnInitFailure) Set the behavior regarding errors that could occur during server init.- Parameters:
- throwOnInitFailure- the new flag value
 
- 
setParentClassLoaderSet the shared extensions class loader.- Parameters:
- parentClassLoader- The shared extensions class loader.
 
- 
getParentClassLoader
- 
setServer
- 
getServer
- 
isUseNamingpublic boolean isUseNaming()- Returns:
- trueif naming is enabled.
 
- 
setUseNamingpublic void setUseNaming(boolean useNaming) Enables or disables naming support.- Parameters:
- useNaming- The new use naming value
 
- 
setAwaitpublic void setAwait(boolean b) 
- 
isAwaitpublic boolean isAwait()
- 
argumentsProcess the specified command line arguments.- Parameters:
- args- Command line arguments to process
- Returns:
- trueif we should continue processing
 
- 
configFileReturn a File object representing our configuration file.- Returns:
- the main configuration file
 
- 
createStartDigesterCreate and configure the Digester we will be using for startup.- Returns:
- the main digester to parse server.xml
 
- 
createStopDigesterCreate and configure the Digester we will be using for shutdown.- Returns:
- the digester to process the stop operation
 
- 
parseServerXmlprotected void parseServerXml(boolean start) 
- 
stopServerpublic void stopServer()
- 
stopServer
- 
loadpublic void load()Start a new server instance.
- 
load
- 
startpublic void start()Start a new server instance.
- 
stoppublic void stop()Stop an existing server instance.
- 
awaitpublic void await()Await and shutdown.
- 
usageprotected void usage()Print usage information for this application.
- 
initStreamsprotected void initStreams()
- 
initNamingprotected void initNaming()
- 
setSecurityProtectionprotected void setSecurityProtection()Set the security package access/protection.
- 
generateLoaderprotected void generateLoader()
- 
generateClassHeader
 
-