Reputation: 86637
I'm using cxf
to build a client on a soap
webservice.
Is there any cxf interceptor feature that could automatically measures and logs the webservice response time?
I'm already using org.apache.cxf.interceptor.LoggingInInterceptor
and LoggingOutInterceptor
for logging the xml content itself.
Upvotes: 3
Views: 1911
Reputation: 943
CXF has some awesome out of the box features that can help monitor the response times. For this the JMX will need to be enabled.
Refer: http://cxf.apache.org/docs/jmx-management.html
The management api is part of the cxf-rt-management.jar.The features can be enabled against the target endpoint that needs to be monitored using:
org.apache.cxf.management.interceptor.ResponseTimeFeature
This will make use of the following interceptors:
org.apache.cxf.management.interceptor.ResponseTimeMessageInInterceptor
org.apache.cxf.management.interceptor.ResponseTimeMessageOutInterceptor
Upvotes: 1