How to enable the CXF instrumentationManager
CXF Endpoints can be managed with JMX. You simply have add the following configuration to your cxf.xml which will enable the CXF management module to work.
To avoid any unnecessary runtime overhead, the performance counters measuring response time are disabled by default. Further configuration is required to enable this instrumentation.
To test the configuration start up your service and connect to it by using jconsole from the jdk.
Then you can browse to your endpoint:
How to get the request response handling time ?
CXF management module also provides a feature which can get the ongoing message's response time (the Time that CXF get the response - the Time that CXF get the request), since we can't store each of the message handling time, we just store the longest response time in the counter repository which you can use jconsole to look up.
Here is the configuration snippet of the that your should add into the cxf.xml