Combination View Flat View Tree View
Threads [ Previous | Next ]
Ray Augé
Tomcat Session Replication with Portlets
May 19, 2011 8:38 AM
Answer

Ray Augé

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1171

Join Date: February 7, 2005

Recent Posts

Jorge Ferrer:
I've been talking to Peter Roßbach, the developer of this feature in Tomcat 5. He's been doing tests and has confirmed that it's broken in Tomcat 6. He's been working on a patch and I've been helping him test it with Liferay. We finally have something that seems to work perfectly. It has been committed to Tomcat's SVN as of revision 834790 and will most probably be included in Tomcat 6.0.21, but I've also included the patch and instructions to this post just in case you need it earlier.

Instructions to set up Cross Context Session Replication in Tomcat 6.0.18:

Patch: Copy the attached file catalina-ha.jar to the directory $TOMCAT_HOME/lib overwriting the existing file with the same name.
Configure: Follow the instructions described in http://www.ja-sig.org/wiki/display/PLT/Clustering+JSR-168+Portlet+Applications+in+Tomcat. In particular make sure to use the DeltaManager instead of the BackupManager. Also check that you have <context ... crossContext="true"> in your context.xml file
Test: Use the attached ClusterTest.war to set a value for a session attribute and make sure such value is propagated through the cluster.
Attachments: ClusterTest.war (426.6k), catalina-ha.jar (120.4k)