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
[EMAIL PROTECTED]
(530)886-1700x235
"Skepticism is the first step toward truth"


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to