[jboss-user] [Management, JMX/JBoss] - Re: How can I receive notification when Servlet stats change

francis1970 do-not-reply at jboss.com
Thu Jun 19 03:46:15 EDT 2008

There's an attribute called "stats" tied to that Object. You can retreive it with:

       org.jboss.management.j2ee.statistics.ServletStatsImpl  obj = 
  |           (org.jboss.management.j2ee.statistics.ServletStatsImpl )server.getAttribute( objName,
  |                        "stats");
  |         javax.management.j2ee.statistics.TimeStatistic time = obj.getServiceTime();
  |         System.out.println(time.getCount());               
  |         System.out.println(time.getDescription());               
  |         System.out.println(time.getLastSampleTime());                       
  |         System.out.println(time.getMaxTime());                               
  |         System.out.println(time.getMinTime());                                       
  |         out.println(time.getTotalTime());  

I'd like to receive a notification when this attribute is changed (that is when servlet are invoked)...is it possible ?

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4159178#4159178

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

More information about the jboss-user mailing list