[jboss-user] [Clustering/JBoss] - get partition(cluster)

oruchovets do-not-reply at jboss.com
Tue Mar 13 12:24:03 EDT 2007


Hi , I try to get partition(cluster) name using external applicatin using JMX.
   
String jmxQuery = "jboss:service=DistributedReplicantManager,*";
		// getting the server MBean

			
Set set = connection.queryNames(new ObjectName(jmxQuery), null);

	if (set != null && set.size() > 0) { // this is a cluster
		for (Iterator i = set.iterator(); i.hasNext();) {
		     ObjectName on = (ObjectName) i.next();
		     System.out.println("--"+on);
	     String ClusterName   =   on.getKeyProperty("partitionName");
		}
}

 Is it correct way to get a cluster name using DistributedReplicantManager.
and may be you have a reference how to  discover a full topology of jboss (all partitions , clusters and servers in it).
Thanks in Advance Oleg


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

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



More information about the jboss-user mailing list