tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John MccLain" <>
Subject cluster listener question
Date Wed, 07 Sep 2005 23:01:36 GMT
When our application starts up, it removes admin information about old user
sessions from our database; We store information such as locks and session
state in our DB. BUT, if we are running in a cluster and Tomcat stars up, we
do NOT want this to occur EXCEPT for on the first server in the cluster that
starts up. For example, we have a cluster with 2 nodes. We start A up and it
removes session log info from the DB, it then potentially gets more sessions
created and logged before node B is up and running (for example in a
failover scenario, where we dynamically bring back up a failed server). When
node B comes up, we do NOT want it to remove sessions that have been logged.
What we want is something
like the following when a tomcat node kicks off

If (I am in a cluster)
	if (!other cluster members running)
		Remove Session from DB
	Remove Sessions from DB

How can I do this?? Would I use MBeans??
Is there a cluster lifecycle listener as aopposed to an application
lifecycle listener?
Is there a way to add a listener to the host instead of an application
context, and have it perform the above logic?

John McClain
Senior Software Engineer
TCS Healthcare
"Skepticism is the first step toward truth"

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message