4 Tomcat Native Session Integration
If you are using Tomcat 10.0.x (Servlet 5.0), Tomcat 10.1.x (Servlet 6.0) or Tomcat 11.0.x (Servlet 6.1) , then you may opt to use Coherence*Web’s native session integration instead of using the installer, simplifying the development and deployment process of Coherence*Web applications.
This chapter includes the following sections:
Tomcat Configuration
Before deploying a Coherence*Web application to Tomcat, first copy the
coherence.jar
and coherence-web.jar
files to
CATALINA_HOME/lib
on *nix or %TOMCAT_HOME%\lib
on
Windows. The JARs must not be included with the web application.
META-INF/context.xml
. The file must
minimally include the
following:<Context> <Manager className="com.tangosol.coherence.web.tomcat.Manager"/> <Valve className="com.tangosol.coherence.web.tomcat.RequestValve"/> </Context>
Those familiar with previous releases of Coherence*Web are familiar with
configuring Coherence*Web using context initialization parameters. When using the Tomcat
native session integration, these context attributes are not needed, and if present,
will be ignored. Instead, Coherence*Web is configured using attributes on the Manager
element from the preceding example. It should be noted that the available configuration
options are a subset of those that are available when using the installer, as the native
session integration’s scope is much narrower. For example, when using the installer,
there are various options to configure how sessions are handled, such as
http-only
cookies, the name of the session cookie, and such. Those
configuration options, in the native integration case, are configured and handled by
Tomcat and not by Coherence*Web.
Manager Configuration Options
In addition to the standard manager options documented by Tomcat, the following configuration options are available when using the native session integration. See Table 4-1.
Table 4-1 Coherence Manager Configuration Options
Attribute Name | Description |
---|---|
applicationName |
|
configurationConsistency |
|
collectionClass |
|
coordinatedReaper |
|
reaperSweepModulo |
|
reaperLocality |
|
reaperCycleSeconds |
|
reaperPriority |
|
readInParallel |
|
reapThreadsMin |
|
reapThreadsMax |
|
reapMechanism |
|
sessionCache |
|
managementCache |
|
sessionLocking |
|
memberLocking |
|
applicationLocking |
|
threadLocking |
|
sessionGetLockTimeout |
|
logThreads |
|
logLevel |
|
scopeControllerClass |
|
overflowCache |
|
overflowThreshold |
|
suspectAttributes |
|
distributionControllerClass |
|
preserveAttributes |
|
localSessionCache |
|
localAttributeCache |
|
configurationPath |
|
federated |
|
logInvalidationExceptions |
|
clusterOwned |
|
shutdownDelaySeconds |