[jboss-cvs] JBossAS SVN: r99682 - branches/JBPAPP_4_2_0_GA_CP/ejb3/src/main/org/jboss/ejb3/mdb/inflow.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Jan 20 17:23:52 EST 2010
Author: ALRubinger
Date: 2010-01-20 17:23:51 -0500 (Wed, 20 Jan 2010)
New Revision: 99682
Modified:
branches/JBPAPP_4_2_0_GA_CP/ejb3/src/main/org/jboss/ejb3/mdb/inflow/MessageInflowLocalProxy.java
Log:
[JBPAPP-3479] Register MDB inflow w/ invocation statistics
Modified: branches/JBPAPP_4_2_0_GA_CP/ejb3/src/main/org/jboss/ejb3/mdb/inflow/MessageInflowLocalProxy.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/ejb3/src/main/org/jboss/ejb3/mdb/inflow/MessageInflowLocalProxy.java 2010-01-20 22:23:07 UTC (rev 99681)
+++ branches/JBPAPP_4_2_0_GA_CP/ejb3/src/main/org/jboss/ejb3/mdb/inflow/MessageInflowLocalProxy.java 2010-01-20 22:23:51 UTC (rev 99682)
@@ -35,6 +35,7 @@
import org.jboss.aop.joinpoint.Invocation;
import org.jboss.aop.joinpoint.MethodInvocation;
import org.jboss.ejb3.mdb.MessagingContainer;
+import org.jboss.ejb3.statistics.InvocationStatistics;
import org.jboss.ejb3.tx.TxUtil;
import org.jboss.logging.Logger;
@@ -157,7 +158,31 @@
return null;
}
else
- return delivery(proxy, container, method, args);
+ // Real inflow invocation (ie. from MessageListener.onMessage())
+ {
+ // Tell invoke stats we're starting
+ final InvocationStatistics invokeStats = container.getInvokeStats();
+ invokeStats.callIn();
+ Object returnValue = null;
+ try
+ {
+ final long start = System.currentTimeMillis();
+ returnValue = delivery(proxy, container, method, args);
+ final long elapsed = System.currentTimeMillis() - start;
+ invokeStats.updateStats(method, elapsed);
+ if (log.isTraceEnabled())
+ {
+ log.trace("Invocation took " + elapsed + "ms: " + method);
+ }
+ }
+ finally
+ {
+ // Tell invoke stats we're done
+ invokeStats.callOut();
+
+ }
+ return returnValue;
+ }
}
public String toString()
More information about the jboss-cvs-commits
mailing list