tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John MccLain" <>
Subject Question on cluster recognition
Date Wed, 07 Sep 2005 00:14:10 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.
Is there a way of recognizing that:
1) a node is a member in a cluster
2) whether it is the first node that comes up in the cluster, or whether
other members in the cluster are up and running?

So that we can execute something only in the first node that comes up?

Are tehre any other ideas on how to handle this??

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