[jboss-cvs] JBossAS SVN: r111905 - branches/JBPAPP_5_1/server/src/main/org/jboss/invocation.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Aug 2 17:24:43 EDT 2011
Author: loleary
Date: 2011-08-02 17:24:43 -0400 (Tue, 02 Aug 2011)
New Revision: 111905
Modified:
branches/JBPAPP_5_1/server/src/main/org/jboss/invocation/InvocationStatistics.java
Log:
JBPAPP-6203: Incorrect statistcs returned by the EJB MBean after resetStats() method is invoked
When resetStats() is invoked, the methodStats map is now cleared.
Modified: branches/JBPAPP_5_1/server/src/main/org/jboss/invocation/InvocationStatistics.java
===================================================================
--- branches/JBPAPP_5_1/server/src/main/org/jboss/invocation/InvocationStatistics.java 2011-08-02 17:19:10 UTC (rev 111904)
+++ branches/JBPAPP_5_1/server/src/main/org/jboss/invocation/InvocationStatistics.java 2011-08-02 21:24:43 UTC (rev 111905)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * Copyright 2011, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
@@ -106,19 +106,16 @@
concurrentCalls--;
}
- /** Resets all current TimeStatistics.
- *
+ /**
+ * Resets all methodStats by clearing the methodStats map. This will leave
+ * methodStats in the same state as it was before any methods statistics
+ * were captured.
*/
public void resetStats()
{
synchronized (methodStats)
{
- Iterator iter = methodStats.values().iterator();
- while (iter.hasNext())
- {
- TimeStatistic stat = (TimeStatistic) iter.next();
- stat.reset();
- }
+ methodStats.clear();
}
maxConcurrentCalls = 0;
lastResetTime = System.currentTimeMillis();
More information about the jboss-cvs-commits
mailing list