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.
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.ResponseTimeMessageInInterceptororg.apache.cxf.management.interceptor.ResponseTimeMessageOutInterceptorIf you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With