[jboss-user] [Management, JMX/JBoss] - Unable to Obtain JMX MBean for Servlet Info

Martinator do-not-reply at jboss.com
Thu Jul 27 19:34:16 EDT 2006


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#3961451

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



More information about the jboss-user mailing list