Here is my code to extract info from mbean ,but the set size returns zero.So
not getting info on mbeans.Can u plz help me on this?
JMXServiceURL url = new
JMXServiceURL("service:jmx:rmi:///jndi/rmi://10.200.9.148:9900/jmxrmi");
JMXConnector jmxc = JMXConnectorFactory.connect(url,
null);
MBeanServerConnection mbsc =
jmxc.getMBeanServerConnection();
ObjectName pattern=new ObjectName("jboss.jmx:*");
Set res = mbsc.queryNames(pattern,null);
System.out.println("set size="+res.size());
for (Iterator i = res.iterator(); i.hasNext(); ) {
ObjectName o = (ObjectName)i.next();
System.out.println("MBean: " + o);
MBeanAttributeInfo[] info =
mbsc.getMBeanInfo(o).getAttributes();
for (int j=0 ; j< info.length; j++) {
MBeanAttributeInfo beanInfo = info[j];
final String attrname = beanInfo.getName();
System.out.println("\t"+attrname+"="+mbsc.getAttribute(o,attrname));
}
}
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4202001#4202001
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4202001
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user