This content has been marked as final.
Show 2 replies
-
1. Re: How can I receive notification when Servlet stats change
jaikiran Jun 18, 2008 12:37 PM (in response to francis1970)What exactly does stats change mean? JBoss emits the following notifications http://wiki.jboss.org/wiki/NotificationsEmittedByJBossMBeans
-
2. Re: How can I receive notification when Servlet stats change
francis1970 Jun 19, 2008 3:46 AM (in response to francis1970)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 ?
thanks
Francesco