tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Romain Petit" <>
Subject RE: WAR Deployment before starting the cluster
Date Fri, 01 Oct 2010 14:06:09 GMT


I reply to myself, I hope it can help someone else in the future...


I made a mistake: the tomcat cluster service start before the war is
deployed but the session synchronization is done after the application
is deployed.


My HttpSessionBindingListener was not notified because the session
replicated were deserialized, there were no attributes binding.


So to get notified a session is replicated on a new server you can wrap
the readObject(ObjectInputStream in) or use the other session listener.


Bye bye


From: Romain Petit 
Sent: Monday, September 27, 2010 1:35 PM
To: ''
Subject: WAR Deployment before starting the cluster




We have 2 tomcat servers in cluster with session sharing and


The application deployed uses a HttpSessionBindingListener to be aware
of the number of licenses used by a user on the 2 servers.


This configuration works great when the 2 servers are started at the
same moment.


The problem is: 

if one server restart, all the sessions will be replicated before the
war is deployed so the listener, which is at an application level, will
not be notified.


Is it possible to deploy a war before starting the cluster service?





  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message