ControlTier > elements
 

TomcatServer

Apache Tomcat server deployment

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

1: These types have a Singleton constraint. Only one instance may be added as a resource.

Allowed Parent Dependencies

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

View the available commands in the User Reference.

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

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

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

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

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

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

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

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

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

Constraints

Allowed Parent Dependencies

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.

E.g:

 <setting type="TomcatPropertyFile" name="dev" 
     description="Property file to generate, and a template file to use" 
     settingValue="myapp-config.properties" 
     settingType="myapp-config.properties.template"/>
     

The template file should be located in the WEB-INF/classes directory of the war file, and the property file will be generated into the same location.

The syntax of the template/output does not have to match a java Properties file, but the Ant property expansion syntax will be used: ${some.property}.

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

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

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

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

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

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

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