-
1. Re: jboss monitoring
mlange Jan 14, 2009 2:40 AM (in response to priyapg)Simply collect all mbeans and the corresponding JMX object names and read the JMX docs how get the attributes.
-
2. Re: jboss monitoring
peterj Jan 14, 2009 11:09 AM (in response to priyapg)Use the jmx console (http://localhost:8080/jmx-console) to browse the mbeans, looking for the information you want. Then you can write your own code to access the same info, or even use twiddle to access it (which one you do depends on what you want to do with the data).
-
-
4. Re: jboss monitoring
priyapg Jan 14, 2009 11:03 PM (in response to priyapg)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));
}
} -
5. Re: jboss monitoring
priyapg Jan 14, 2009 11:16 PM (in response to priyapg)Also I tried using RMIAdaptor .The following is the error coming.I am stuck here.
Exception in thread "main" javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:645)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:284)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at JMXBrowser.main(JMXBrowser.java:28) -
6. JBoss Logging
div_gcet Jan 15, 2009 5:00 AM (in response to priyapg)Hi
Can anyone tell which mbean i should i use so that my java file get initialized properly at deployment time, when server configure log4j.xml. -
7. Re: jboss monitoring
peterj Jan 15, 2009 11:02 AM (in response to priyapg)div_gcet1, please to not hijack other's topics.
priyapg, see if this helps: http://www.jboss.com/index.html?module=bb&op=viewtopic&t=134247 -
8. Re: jboss monitoring
priyapg Jan 16, 2009 12:59 AM (in response to priyapg)Thanks a lot....your post regarding jndi helps me .I was struggling with it..