-
1. Re: Way to identify graceful startup/shutdown in cluster gro
brian.stansberry May 27, 2008 9:50 AM (in response to tosaravananm)Who is looking for this information? The server that's leaving or other members of the group?
-
2. Re: Way to identify graceful startup/shutdown in cluster gro
tosaravananm May 28, 2008 2:29 AM (in response to tosaravananm)The other members in the group want to identify.
-
3. Re: Way to identify graceful startup/shutdown in cluster gro
brian.stansberry May 28, 2008 4:04 PM (in response to tosaravananm)Hmm, this would take some work.
If you were asking about the server that's leaving you could listen for a JMX notification from the jboss.system:type=Server mbean of type "org.jboss.system.server.stopped". That notification is sent out at the beginning of a clean shutdown.
JGroups itself, when it issues a new view doesn't include information about what caused the change. When a node is suspected (i.e. is being excluded from the group due to suspected failure) it issues a notification before it issues a new view. But the intervening layers in JBoss don't expose any hooks for user code to get that "suspect" notification.
The org.jboss.ha.jmx.HAServiceMBeanSupport utility class has the ability to send JMX notifications around the cluster. Perhaps you could write a service that subclasses HAServiceMBeanSupport and listens for the local "org.jboss.system.server.stopped" notification from jboss.system:type=Server. It would then rebroadcast it around the cluster, including the node id of the node. -
4. Re: Way to identify graceful startup/shutdown in cluster gro
tosaravananm May 29, 2008 12:41 AM (in response to tosaravananm)Thanks Brian Stansberry.