Distributed session management for Tomcat 8.0

Provides, via submodules, a base configuration for JBoss project builds, as well as a derived configuration supporting multi-release JARs

License

License

Categories

Categories

Tomcat Container Application Servers WildFly
GroupId

GroupId

org.wildfly.clustering
ArtifactId

ArtifactId

wildfly-clustering-tomcat-8.0
Last Version

Last Version

11.0.3.Final
Release Date

Release Date

Type

Type

pom
Description

Description

Distributed session management for Tomcat 8.0
Provides, via submodules, a base configuration for JBoss project builds, as well as a derived configuration supporting multi-release JARs
Project Organization

Project Organization

JBoss by Red Hat

Download wildfly-clustering-tomcat-8.0

How to add to project

<!-- https://jarcasting.com/artifacts/org.wildfly.clustering/wildfly-clustering-tomcat-8.0/ -->
<dependency>
    <groupId>org.wildfly.clustering</groupId>
    <artifactId>wildfly-clustering-tomcat-8.0</artifactId>
    <version>11.0.3.Final</version>
    <type>pom</type>
</dependency>
// https://jarcasting.com/artifacts/org.wildfly.clustering/wildfly-clustering-tomcat-8.0/
implementation 'org.wildfly.clustering:wildfly-clustering-tomcat-8.0:11.0.3.Final'
// https://jarcasting.com/artifacts/org.wildfly.clustering/wildfly-clustering-tomcat-8.0/
implementation ("org.wildfly.clustering:wildfly-clustering-tomcat-8.0:11.0.3.Final")
'org.wildfly.clustering:wildfly-clustering-tomcat-8.0:pom:11.0.3.Final'
<dependency org="org.wildfly.clustering" name="wildfly-clustering-tomcat-8.0" rev="11.0.3.Final">
  <artifact name="wildfly-clustering-tomcat-8.0" type="pom" />
</dependency>
@Grapes(
@Grab(group='org.wildfly.clustering', module='wildfly-clustering-tomcat-8.0', version='11.0.3.Final')
)
libraryDependencies += "org.wildfly.clustering" % "wildfly-clustering-tomcat-8.0" % "11.0.3.Final"
[org.wildfly.clustering/wildfly-clustering-tomcat-8.0 "11.0.3.Final"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

  • catalina
  • hotrod

wildfly-clustering-tomcat

A high-availability session manager for Tomcat based on WildFly's distributed session management and Infinispan server.

Building

  1. Clone this repository and build using Java 8 and a standard maven build.

    $ git clone [email protected]:wildfly-clustering/wildfly-clustering-tomcat.git
    $ cd wildfly-clustering-tomcat
    $ mvn clean install
    

Installation

  1. Enter directory of target Tomcat version and session manager implementation:

    $ cd 9.0/hotrod
    
  2. Copy maven artifact to Tomcat's lib directory:

    $ mvn dependency:copy -DoutputDirectory=$CATALINA_HOME/lib
    
  3. Copy runtime dependencies to Tomcat's lib directory:

    $ mvn dependency:copy-dependencies -DincludeScope=runtime -DoutputDirectory=$CATALINA_HOME/lib
    

Configuration

Define the distributed Manager implementation either within the global $CATALINA_HOME/conf/context.xml, or within the /WEB-INF/context.xml of a web application:

<Manager className="org.wildfly.clustering.tomcat.hotrod.HotRodManager"/>

Configuration Properties

Implementation specific properties

Property Description
uri Defines a HotRod URI, which includes a list of infinispan server instances and any authentication details. For details, see: https://infinispan.org/blog/2020/05/26/hotrod-uri/
template Defines the server-side configuration template from which a deployment cache is created on the server. Default is org.infinispan.DIST_SYNC.
granularity Defines how a session is mapped to entries in the cache. "SESSION" will store all attributes of a session in a single cache entry. "ATTRIBUTE" will store each session attribute in a separate cache entry. Default is "SESSION".
maxActiveSessions Defines the maximum number of sessions to retain in the near cache. Default is limitless. A value of 0 will disable the near cache.
marshaller Specifies the marshaller used to serialize and deserialize session attributes. Supported marshallers include: JAVA, JBOSS, PROTOSTREAM. Default marshaller is "JBOSS".

HotRod properties

These are configured without their "infinispan.client.hotrod." prefix:

https://github.com/infinispan/infinispan/blob/11.0.x/client/hotrod-client/src/main/java/org/infinispan/client/hotrod/impl/ConfigurationProperties.java

Common Manager properties

https://tomcat.apache.org/tomcat-9.0-doc/config/cluster-manager.html#Common_Attributes

Example

<Manager className="org.wildfly.clustering.tomcat.hotrod.HotRodManager"
         uri="hotrod://127.0.0.1:11222"
         template="transactional"
         granularity="ATTRIBUTE"
         marshaller="PROTOSTREAM"
         maxActiveSessions="100"
         tcp_keep_alive="true"/>
org.wildfly.clustering

WildFly Clustering

WildFly Clustering related projects

Versions

Version
11.0.3.Final
11.0.2.Final
11.0.1.Final
11.0.0.Final
10.0.0.Final
10.0.0.Beta1
9.1.0.Final
9.0.0.Final
8.0.0.Final
7.0.0.Final
6.0.0.Final
5.0.0.Final
4.0.0.Final
3.0.0.Final
2.0.0.Final
1.0.0.Final
1.0.0.CR1
1.0.0.Beta1
1.0.0.Alpha1