Things have changed in 7.4 since the previous post was written. While all the explanation regarding Redis is still valid, classloader configuration is a bit different in Liferay 7.4. Anyway we'll perform a similar introduction. This way if someone directly lands in his blog he/she can find everything self-contained.
Redis and Redisson
Redis is an in-memory store that can be used to provide a central and external place to save the application session information. It can be very useful in cloud environments or to handle node crashes without losing session information.
Redisson appears as an alternative in order to provide integration between Redis and Tomcat:
- Provides a Tomcat Session manager that Stores session of Apache Tomcat in Redis and allows to distribute requests across a cluster of Tomcat servers.
- Implements non-sticky session management backed by Redis.
It has some advantages like writing only the modified attribute instead of serializing the whole session each time. You have more information in Redisson Tomcat.
Default Installation
The following steps are needed for a basic installation:
- Add RedissonSessionManager: It can be added both
on $TOMCAT_BASE/conf/context.xml or, per context,
in $TOMCAT_BASE/conf/server.xml. You have more information
in Redisson
Tomcat.
<Manager className="org.redisson.tomcat.RedissonSessionManager" configPath="${catalina.base}/redisson.conf" readMode="REDIS" updateMode="DEFAULT" broadcastSessionEvents="false"/> - Create, in ${catalina.base}, a redisson.conf


