ControlTier > controltier-elements
 

TomcatContext

Tomcat web application service (extended to support a custom context and an "external" property file)

Overview

TomcatContext: Tomcat web application service (extended to support a custom context and an "external" property file)

Use TomcatContext objects if your Tomcat instance requires more than one war file. Model the TomcatContext objects and the TomcatServer object with the same basedir. Attach all TomcatContext objects and the single TomcatServer object as child dependencies of TomcatSite. Then manage the service through the TomcatSite, deployed locally with the TomcatServer and TomcatContext objects. TomcatSites can be grouped into Sites in the same way as standalone TomcatServers.

Design

Super Type
Service
Role Concrete. (Objects can be created.)
Instance Names Unique
Notification false
Template Directory
Data View Children, proximity: 1
Logger Name TomcatContext

Constraints

Allowed Child Dependencies

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

Allowed Parent Dependencies

  • Mediator
  • Node

Attributes

Exported Attributes

Name Property
catalinaBase deployment-basedir
catalinaHome deployment-install-root

Defaults for Imported Attributes

Name Default
contextFileName ROOT.xml
defaultDeploymentType Deployment
defaultPackageName ^$
defaultPackageType war
dispatchChangeDependencies false
tomcatImplicitContext false
tomcatRestartStrategy none

Commands

View the available commands in the User Reference.

Related Types

The following types are defined for use with TomcatContext.

TomcatContextFile

Overview

TomcatContextFile: Tomcat application context path file name

The file under conf/Catalina/localhost/ into which to write the context file. Default: ROOT.xml

Design

Super Type
TomcatSetting
Role Concrete. (Objects can be created.)
Instance Names Unique

Constraints

Allowed Parent Dependencies

Attributes

Exported Attributes
Name Property
contextFileName settingValue

TomcatImplicitContext

Overview

TomcatImplicitContext: Tomcat Implicit Context (boolean)

Default is false and a context file will be generated in conf/Catalina/localhost. If true, the context is an implicit context; i.e. the server already knows where it is and how to deploy it, and no context file is necessary. Usually this means that the application will be deployed in CATALINA_BASE/webapps. N.B. If you use an implicit context, the package type *must* be PackedWar or a subtype in order to avoid a race condition with the auto-unpacking functionality of Tomcat.

Design

Super Type
TomcatSetting
Role Concrete. (Objects can be created.)
Instance Names Unique

Constraints

Allowed Parent Dependencies

Attributes

Exported Attributes
Name Property
tomcatImplicitContext settingValue

TomcatRestartStrategy

Overview

TomcatRestartStrategy: Tomcat restart execution strategy

Allowed values are none, context, and container. Default is none. Use container if you would like the server to be restarted when the TomcatContext is Deployed. For this case, attach the TomcatServer as a child object of TomcatContext.

Design

Super Type
TomcatSetting
Role Concrete. (Objects can be created.)
Instance Names Unique

Constraints

Allowed Parent Dependencies

Attributes

Exported Attributes
Name Property
tomcatRestartStrategy settingValue

TomcatSetting

Overview

TomcatSetting: Tomcat configuration setting

Design

Super Type
Setting
Role Abstract. (Objects cannot be created.)
Instance Names Unique