TomcatServer
Apache Tomcat server deployment
- Overview
- Design
- Constraints
- Attributes
- Commands
-
Related Types
- FilePath
- JavaHomePath
- TomcatSetting
- TomcatKeepAdminServer
- TomcatMgmtStrategy
- GenerateDefaultTomcatContext
- GenerateApplicationTomcatContext
- TomcatNewEnvironment
- TomcatPath
- TomcatPort
- TomcatServerPort
- TomcatSecureServerPort
- TomcatShutdownPort
- TomcatAjpPort
- TomcatRelease
- TomcatJavaOptions
- TomcatTimeout
- TomcatPropertyFile
- TomcatProperty
Overview
TomcatServer: Apache Tomcat server deployment
This type can be used standalone, in which case a single "war" type package object can be assigned as a child of a TomcatServer object; or you may also assign multiple TomcatContext objects as children of TomcatSite, in which case each TomcatContext object may have one package and service management can be managed through a TomcatSite object which has both the TomcatServer and the TomcatContexts as children. The TomcatSite will be deployed alongside TomcatServer and TomcatContext on the client node. TomcatSite objects can then be grouped into Sites that are deployed to the server instance, allowing Jobcenter usage.
Attach a TomcatZip as a dependency so that ControlTier will install Tomcat when the TomcatServer object is deployed. Optionally attach a JavaBin object. (If one is not provided, Tomcat will use the same JAVA_HOME as ControlTier.)
Attach a PlatformJar object if you wish to install other platform-specific packages; e.g. JDBC drivers.
Attach a tgz or a ConfigZip dependency to install packaged configuration files.
Attach an Rdb or subtype to use data source generation.
This object can also be a child dependency of ApacheSystemService, in which case the ApacheSystemService instance will route certain requests to Tomcat via AJP13.
The "basedir" property is the CATALINA_BASE directory, and the "installroot" is used as the CATALINA_HOME directory.
Design
- Super Type
- Service
Role | Concrete. (Objects can be created.) |
Instance Names | Unique |
Notification | false |
Template Directory | |
Data View | Children, proximity: 1 |
Logger Name | TomcatServer |
Constraints
Allowed Child Dependencies
- ConfigZip
- GenerateApplicationTomcatContext 1
- GenerateDefaultTomcatContext 1
- JavaBin 1
- JavaHomePath 1
- PlatformJar
- Rdb
- tgz
- TomcatKeepAdminServer 1
- TomcatMgmtStrategy 1
- TomcatPath 1
- TomcatSetting
- TomcatZip 1
- war1
1: These types have a Singleton constraint. Only one instance may be added as a resource.
Allowed Parent Dependencies
- ApacheSystemService
- Mediator
- Node
- TomcatContext
Attributes
Exported Attributes
Name | Property | Description |
---|---|---|
catalinaBase | deployment-basedir | This value is the CATALINA_BASE directory path. |
catalinaHome | deployment-install-root | This value is the CATALINA_BASE directory path. |
Defaults for Imported Attributes
Name | Default |
---|---|
ajpPort | 8009 |
contextFileName | ROOT.xml |
generateApplicationTomcatContext | false |
generateDefaultTomcatContext | false |
httpsPort | 8443 |
javaHome | ${env.JAVA_HOME} |
javaOptions | |
keepAdminServer | false |
port | 8080 |
release | 5.x |
shutdownPort | 8005 |
timeout | 10 |
tomcatMgmtStrategy | default |
tomcatNewEnvironment | true |
tomcatPath | /bin:/usr/bin |
Commands
Docs-Generate
Generate associated Documents, and Tomcat configuration files based on templates for the specific Tomcat release.
The templates located in the templates/RELEASE directory are copied to the installRoot location, and properties are expanded.
- Usage
- Docs-Generate [-archivedir <${entity.instance.dir}/var>] [-basedir <>] [-install_root <>] [-java_home <>] [-javaoptions <>] [-keepAdminServer <false>]
Options
Option | Description |
---|---|
archivedir | dir to store current output docs |
basedir | tomcat instance dir |
install_root | tomcat installation root |
java_home | tomcat java_home |
javaoptions | tomcat java options |
keepAdminServer | keep admin server |
assertServiceIsDown
checks if the service is down
- Usage
- assertServiceIsDown [-basedir <>] [-port <>]
Options
Option | Description |
---|---|
basedir | tomcat base directory |
port | listening port |
assertServiceIsUp
checks if the service is running
- Usage
- assertServiceIsUp [-basedir <>] [-port <>]
Options
Option | Description |
---|---|
basedir | tomcat base directory |
port | listening port |
startService
starts the service
- Usage
- startService [-basedir <>] [-install_root <>] [-java_home <>] [-javaoptions <>] [-newenvironment <>] [-path <>] [-timeout <>]
Options
Option | Description |
---|---|
basedir | catalina base |
install_root | catalina home |
java_home | jre install dir |
javaoptions | Java options |
newenvironment | Whether or not to start Tomcat with a new environment |
path | PATH to use with Tomcat |
timeout | timeout in seconds |
stopService
starts the service
- Usage
- stopService [-basedir <>] [-install_root <>] [-java_home <>] [-port <>] [-timeout <>]
Options
Option | Description |
---|---|
basedir | catalina base |
install_root | catalina home |
java_home | jre install dir |
port | listening port |
timeout | timeout in seconds |
Related Types
The following types are defined for use with TomcatServer.
FilePath
Overview
FilePath: A file path/directory
Design
- Super Type
- Setting
Role | Abstract. (Objects cannot be created.) |
Instance Names | Unique |
JavaHomePath
Overview
JavaHomePath: The Java install root
This setting is unnecessary if you attach a JavaBin child dependency as that object sets this attribute. Alternatively, you can also omit it if you intend to use the JAVA_HOME specified in the environment.
Design
- Super Type
- FilePath
Role | Concrete. (Objects can be created.) |
Instance Names | Unique |
Constraints
Allowed Parent Dependencies
- Service
Attributes
Exported Attributes
Name | Property |
---|---|
javaHome | settingValue |
TomcatSetting
Overview
TomcatSetting: Tomcat configuration setting
Supertype for setting types related to TomcatServer and TomcatContext
Design
- Super Type
- Setting
Role | Abstract. (Objects cannot be created.) |
Instance Names | Unique |
TomcatKeepAdminServer
Overview
TomcatKeepAdminServer: configuration to keep or not keep the /admin server
Default is false for security
Design
- Super Type
- TomcatSetting
Role | Concrete. (Objects can be created.) |
Instance Names | Unique |
Attributes
Exported Attributes
Name | Property |
---|---|
keepAdminServer | settingValue |
TomcatMgmtStrategy
Overview
TomcatMgmtStrategy: Specifies the method to use for service management
Options are default and smf. default manages Tomcat with traditional Start and Stop scripts. smf uses the Solaris Service Management Framework. Default is default.
Design
- Super Type
- TomcatSetting
Role | Concrete. (Objects can be created.) |
Instance Names | Unique |
Constraints
Allowed Parent Dependencies
Attributes
Exported Attributes
Name | Property |
---|---|
tomcatMgmtStrategy | settingValue |
GenerateDefaultTomcatContext
Overview
GenerateDefaultTomcatContext: determines if a default database context should be generated
If set to true, generates a context.xml.default file. Requires an Rdb dependency. Default is false. (6.x release only)
Design
- Super Type
- TomcatSetting
Role | Concrete. (Objects can be created.) |
Instance Names | Unique |
Constraints
Allowed Parent Dependencies
Attributes
Exported Attributes
Name | Property |
---|---|
generateDefaultTomcatContext | settingValue |
GenerateApplicationTomcatContext
Overview
GenerateApplicationTomcatContext: determines if an application context should be generated
If set to true, generates a context file in the location specified by the contextFileName attribute (by default conf/Catalina/localhost/ROOT.xml, but can be changed via the TomcatContextFile setting, under the TomcatContext type). Requires a child package object of the war type or one of its subtypes. Default is false.
If you need multiple contexts, do not attach a child dependency of war to TomcatServer; instead, attach TomcatServer and two or more TomcatContext objects to TomcatSite and attach one package to each TomcatContext.
Design
- Super Type
- TomcatSetting
Role | Concrete. (Objects can be created.) |
Instance Names | Unique |
Constraints
Allowed Parent Dependencies
Attributes
Exported Attributes
Name | Property |
---|---|
generateApplicationTomcatContext | settingValue |
TomcatNewEnvironment
Overview
TomcatNewEnvironment: Whether or not to start Tomcat with a new environment
Sets the newenvironment attribute for the exec tag that starts the Tomcat service. Default is true.
Design
- Super Type
- TomcatSetting
Role | Concrete. (Objects can be created.) |
Instance Names | Unique |
Constraints
Allowed Parent Dependencies
Attributes
Exported Attributes
Name | Property |
---|---|
tomcatNewEnvironment | settingValue |
TomcatPath
Overview
TomcatPath: PATH used by Tomcat
Used in the environment when the Tomcat service is started
Design
- Super Type
- TomcatSetting
Role | Concrete. (Objects can be created.) |
Instance Names | Unique |
Constraints
Allowed Parent Dependencies
Attributes
Exported Attributes
Name | Property |
---|---|
tomcatPath | settingValue |
TomcatPort
Overview
TomcatPort: Port used by Tomcat
Supertype for following port types
Design
- Super Type
- TomcatSetting
Role | Concrete. (Objects can be created.) |
Instance Names | Unique |
Constraints
Allowed Parent Dependencies
TomcatServerPort
Overview
TomcatServerPort: Tomcat server port
HTTP port. Written into a configuration by Docs-Generate. Default: 8080
Design
- Super Type
- TomcatPort
Role | Concrete. (Objects can be created.) |
Instance Names | Unique |
Constraints
Allowed Parent Dependencies
Attributes
Exported Attributes
Name | Property |
---|---|
port | settingValue |
TomcatSecureServerPort
Overview
TomcatSecureServerPort: Tomcat secure server port
HTTPS port. Written into a configuration by Docs-Generate. Default: 8443
Design
- Super Type
- TomcatPort
Role | Concrete. (Objects can be created.) |
Instance Names | Unique |
Constraints
Allowed Parent Dependencies
Attributes
Exported Attributes
Name | Property |
---|---|
httpsPort | settingValue |
TomcatShutdownPort
Overview
TomcatShutdownPort: Tomcat shutdown port
Shutdown port. Local connections to this port can advise the server to shut down cleanly by sending the shutdown password, by default "SHUTDOWN". Written into a configuration by Docs-Generate. Default: 8005
Design
- Super Type
- TomcatPort
Role | Concrete. (Objects can be created.) |
Instance Names | Unique |
Constraints
Allowed Parent Dependencies
Attributes
Exported Attributes
Name | Property |
---|---|
shutdownPort | settingValue |
TomcatAjpPort
Overview
TomcatAjpPort: Tomcat Apache Jakarta Protocol port
AJP13 port. Written into a configuration by Docs-Generate.
Additionally, this setting can be attached to the ApacheSystemService object to be used in the mod_proxy_ajp configuration. Default: 8009
Design
- Super Type
- TomcatPort
Role | Concrete. (Objects can be created.) |
Instance Names | Unique |
Constraints
Allowed Parent Dependencies
Attributes
Exported Attributes
Name | Property |
---|---|
ajpPort | settingValue |
TomcatRelease
Overview
TomcatRelease: Tomcat major release (e.g. 4.1, 5.x or 6.x)
Docs-Generate will use the set of templates for this version number under the templates directory. Currently supported are 4.1, 5.x and 6.x. Default is 5.x.
Design
- Super Type
- TomcatSetting
Role | Concrete. (Objects can be created.) |
Instance Names | Unique |
Constraints
Allowed Parent Dependencies
Attributes
Exported Attributes
Name | Property |
---|---|
release | settingValue |
TomcatJavaOptions
Overview
TomcatJavaOptions: Java runtime options (JAVA_OPTS) used when the Tomcat "start", "stop", or "run" command is executed
Default: empty string (no options)
Design
- Super Type
- TomcatSetting
Role | Concrete. (Objects can be created.) |
Instance Names | Unique |
Constraints
Allowed Parent Dependencies
Attributes
Exported Attributes
Name | Property |
---|---|
javaOptions | settingValue |
TomcatTimeout
Overview
TomcatTimeout: Start/shutdown timeout period in seconds
How many seconds to wait for process to start or stop before failing. Used by service management commands. Default: 10
Design
- Super Type
- TomcatSetting
Role | Concrete. (Objects can be created.) |
Instance Names | Unique |
Constraints
Allowed Parent Dependencies
Attributes
Exported Attributes
Name | Property |
---|---|
timeout | settingValue |
TomcatPropertyFile
Overview
TomcatPropertyFile: Tomcat application configuration property file name
This functionality models the creation of a properties file under WEB-INF/classes using a template, also found in that directory. The property file is set as this type's settingValue, while the template is the settingType.
To use this functionality, add a number of TomcatProperty objects and they will be made available as settingType=settingValue pairs and processed in Docs-Generate.
Design
- Super Type
- TomcatSetting
Role | Concrete. (Objects can be created.) |
Instance Names | Unique |
Constraints
Allowed Parent Dependencies
Attributes
Exported Attributes
Name | Property |
---|---|
propertyFileName | settingValue |
propertyFileTemplate | settingType |
TomcatProperty
Overview
TomcatProperty: Tomcat configuration property setting
Add any number of these settings and they will be made available to the template specified in the TomcatPropertyFile setting.
Design
- Super Type
- TomcatSetting
Role | Concrete. (Objects can be created.) |
Instance Names | Unique |