1 Reply Latest reply on Sep 10, 2007 8:52 AM by Rafael Codina Tormo

    Hi plz help to configure to the server for client side JMX M


      hi all,
      i am new to jboss.
      i am trying to create an jmx mbean to find the response time for a login servet.

      i created Mbean interface as
      public interface ResponseTimeCalculatorMBean
      /*ResponseTime in milliseconds */
      public long getResponseTime();
      public long getMin();
      public long getMax();
      public long getTotalHits();
      public long getAvg();
      i implements this interface as below
      public class ResponseTimeCalculator implements ResponseTimeCalculatorMBean


      Myservice is as follows
      mport javax.management.*;
      import java.lang.management.ManagementFactory;
      import javax.servlet.*;
      import javax.servlet.http.*;

      public class ResponseTimeServlet implements ServletContextListener
      ResponseTimeCalculator response;
      MBeanServer mbs;
      ObjectName name;

      public void getValues(ResponseTimeCalculator response)


      public void contextInitialized(ServletContextEvent event)

      response =new ResponseTimeCalculator();
      mbs= ManagementFactory.getPlatformMBeanServer();
      name= new ObjectName("jmx:type=ResponseTimeCalculatorMBean");
      mbs.registerMBean(response, name);
      catch(Exception e)
      new ResponseTimeService().getValues(response);

      public void contextDestroyed(ServletContextEvent event)


      i deploy this app in jboss as..
      but i am not able see this mbean using Jconsole utility.
      am i doing any wrong plz tel me

      Before to this i created as java application,at that its working fine.i am able to view the responsetimembean in jconsole utility

      How can i configure jmx mbean in jboss server ?
      plz help to fix this issue.