[jboss-user] [Clustering/JBoss] - Re: Best way to get master node (HASingletonDeployer with Ba
dmary
do-not-reply at jboss.com
Wed Jun 18 09:41:07 EDT 2008
| MBeanServer server = MBeanServerLocator.locateJBoss();
| ClusterPartitionMBean cluster = (ClusterPartitionMBean) MBeanProxyExt.create(ClusterPartitionMBean.class, "jboss:service=default_partition", server);
| Vector<String> nodes = cluster.getCurrentView();
| String jnpNodes = new String("");
| for (String node : nodes) {
| jnpNodes+="jnp://"+node+",";
| }
|
| InitialContext ctx = new InitialContext();
| ctx.addToEnvironment(ctx.PROVIDER_URL, jnpNodes);
| MBeanServerConnection conn = (MBeanServerConnection) ctx.lookup("jmx/invoker/RMIAdaptor");
| conn.invoke(.....)
Is it good ??
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4158988#4158988
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4158988
More information about the jboss-user
mailing list