Example Configuration
Enable JMX integration by adding the following XML to your CXF Spring context:
<bean id="org.apache.cxf.management.InstrumentationManager"
class="org.apache.cxf.management.jmx.InstrumentationManagerImpl">
<property name="bus" ref="cxf"/>
<property name="enabled" value="true"/>
<property name="JMXServiceURL "
value="service:jmx:rmi:///jndi/rmi://localhost:9914/jmxrmi"/>
</bean>
An equivalent configuration of the above instrumentation manager can be directly made
within the bus configuration using the corresponding property names having the "bus.jmx"
prefix, as in:
<cxf:bus bus="cxf">
<cxf:properties>
<entry key="bus.jmx.enabled" value="true"/>
<entry key="bus.jmx.JMXServiceURL"
value="service:jmx:rmi:///jndi/rmi://localhost:9914/jmxrmi"/>
</cxf:properties>
</cxf:bus>
Information noteNote: From CXF 2.5.x onwards, if a MBeanServer is available in the Spring context or as an
OSGi server (when running in OSGi), the InstrumentationManger will be automatically enabled
and will use that MBeanServer and the CXF MBeans will be registered. Therefore, the
instrumentation manager configuration shown above is not needed in such cases.
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: