[jboss-user] [Clustering/JBoss] - Re: How to identify partition startup/shutdown

asookazian do-not-reply at jboss.com
Sat Sep 27 11:10:09 EDT 2008

"anellanat" wrote : Are there any callbacks/notifications issued by JBoss when a partition is started/closed i.e. when the 'first' node joins the partition and the 'last' node leaves the partition? How can my application receive/subscribe to them?
  | My application is deployed as a JAR in a cluster of JBoss nodes. It has to to perform some system-wide initialization when a node joins the partition, only if it is the first node of the partition. However, this must not repeat, say when other nodes join the partition or when the 'first' node fails. 
  | Similarly, I must perform some system-wide cleanup only when the last node in the partition shuts down or fails.

check out Ch. 3 API of http://www.jgroups.org/javagroupsnew/docs/manual/pdf/manual.pdf

I haven't actually used this functionality, but it sounds like what you may need is to create a class that implements MembershipListener interface.

anonymous wrote : The MembershipListener interface is similar to the MessageListener interface above: every time a new view, a
  | suspicion message, or a block event is received, the corresponding method of the class implementing Membership-
  | Listener will be called.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4179192#4179192

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4179192

More information about the jboss-user mailing list