Hi, I'm trying to pull servlet statistics from JMX. The process works great for
ServerInfo as follows:
MBeanServer lBeanServer = org.jboss.mx.util.MBeanServerLocator.locateJBoss();
| ObjectName lBeanName = new ObjectName("jboss.system:type=ServerInfo");
| Object lAttribute = lBeanServer.getAttribute(lBeanName, "FreeMemory");
It will not work for getting servlet statistics:
MBeanServer lBeanServer = org.jboss.mx.util.MBeanServerLocator.locateJBoss();
| ObjectName lBeanName = new
ObjectName("jboss.web:J2EEApplication=none,J2EEServer=none,WebModule=//localhost/xxxxxx,j2eeType=Servlet,name=default");
| Object lAttribute = lBeanServer.getAttribute(lBeanName, "requestCount");
I reproduced the string exactly as it appears in the JBoss Console. When I run it it tells
me that "default is not registered."
I'm running JBoss 3.2.4 and Java 1.4.2_03.
Can anyone help?
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3961451#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...