Skip to content

Commit

Permalink
Merge pull request wildfly#8492 from golovnin/WFLY-5846
Browse files Browse the repository at this point in the history
WFLY-5846 WaitTimeInterceptor should store the start wait time in the context only if the statistics are enabled.
  • Loading branch information
bstansberry committed May 13, 2016
2 parents ecc3f59 + 1b150e3 commit cb0b436
Showing 1 changed file with 5 additions and 1 deletion.
Expand Up @@ -21,6 +21,7 @@
*/
package org.jboss.as.ejb3.component.invocationmetrics;

import org.jboss.as.ejb3.component.EJBComponent;
import org.jboss.as.ejb3.component.interceptors.AbstractEJBInterceptor;
import org.jboss.invocation.ImmediateInterceptorFactory;
import org.jboss.invocation.InterceptorContext;
Expand All @@ -39,7 +40,10 @@ private WaitTimeInterceptor() {

@Override
public Object processInvocation(final InterceptorContext context) throws Exception {
context.putPrivateData(START_WAIT_TIME, System.currentTimeMillis());
final EJBComponent component = getComponent(context, EJBComponent.class);
if (component.isStatisticsEnabled()) {
context.putPrivateData(START_WAIT_TIME, System.currentTimeMillis());
}
return context.proceed();
}
}

0 comments on commit cb0b436

Please sign in to comment.