Author: jim.ma
Date: 2014-06-18 02:07:36 -0400 (Wed, 18 Jun 2014)
New Revision: 18743
Modified:
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/RequestHandlerImpl.java
Log:
[JBWS-3733]:Check ServerConfig.isStatisticsEnabled() before gather data with
EndpointMetrics
Modified:
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/RequestHandlerImpl.java
===================================================================
---
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/RequestHandlerImpl.java 2014-06-17
17:23:50 UTC (rev 18742)
+++
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/RequestHandlerImpl.java 2014-06-18
06:07:36 UTC (rev 18743)
@@ -93,8 +93,8 @@
out.close();
return;
}
-
- Long beginTime = initRequestMetrics(ep);
+ final boolean statisticsEnabled = getServerConfig().isStatisticsEnabled();
+ Long beginTime = statisticsEnabled == true ? initRequestMetrics(ep) : 0;
Bus bus = ep.getService().getDeployment().getAttachment(BusHolder.class).getBus();
AbstractHTTPDestination dest = findDestination(req, bus);
HttpServletResponseWrapper response = new HttpServletResponseWrapper(res);
@@ -113,11 +113,11 @@
{
throw new ServletException(e);
}
- if (response.getStatus() < 500)
+ if (response.getStatus() < 500 && statisticsEnabled)
{
processResponseMetrics(ep, beginTime);
}
- else
+ if (response.getStatus() >= 500 && statisticsEnabled)
{
processFaultMetrics(ep, beginTime);
}
Show replies by thread