This content has been marked as final. Show 1 reply
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.
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.