yes, check the HAPartition (see doc) in org.jboss.ha.framework.server.ClusterPartition and its associated MBean (visible through the jmx-console)
I could not find it through the jmx-console. Could you point out to me which entry it is?
I have started a 2 node cluster and the startup output says "Number of cluster members: 2" so I am pretty sure the cluster is started. I can't find the mbean entry from the jmx-console to actually check that I have two nodes.
There is no attribute CurrentView under jboss:service=DefaultPartition.
I see the following attributes in this mbean
Maybe I need a newer version of JBoss? I currently have jboss-3.2.0_tomcat-4.1.24.
I am interested in the exact same problem. I want to programatically determine the number of active nodes in the cluster, as well as the IP address of the nodes.
I checked v3.2 and v3.06, and could not find the CurrentView property.
Also, Is it possible to write an interceptor such that a class I define gets notified each time the group membership changes?
Sorry, I should have read the entire conversation before making the post.
I only need to implement HAMembershipListener and register it.
Just to complete the note: what I had to do was get the attribute HAPartition from MBean "jboss:service=defaultPartition". From the HAPartition object, you can call getCurrentView() and also subscribe HAMembershipChangeListener.
I hope this helps somebody else who is trying to achieve the same thing.
I would like to know how to register to HAParatition through HAMembershipListener? could you please give an example?