Skip to main content

Configuring JMX Integration

To enable JMX integration, register an InstrumentationManager extension with the CXF bus. Using Spring XML on Tomcat, the following minimal XML snippet will enable JMX integration.
<import resource="classpath:META-INF/cxf/cxf.xml"/>
  ...
<bean id="org.apache.cxf.management.InstrumentationManager"
   class="org.apache.cxf.management.jmx.InstrumentationManagerImpl">
   <property name="enabled" value="true" />
   <property name="bus" ref="cxf" />
   <property name="usePlatformMBeanServer" value="true" />
</bean>

The default InstrumentationManager accepts the following configuration options:

Name

Value

Default

enabled If the JMX integration should be enabled or not false
bus The CXF bus instance to register the JMX extension with None
server An optional reference to an MBeanServer instance to register MBeans with. If not supplied, an MBeanServer is resolved using the "usePlatformMBeanServer" and/or "serverName" options. None
usePlatformMBeanServer If true and no reference to an MBeanServer is supplied, the JMX extension registers MBeans with the platform MBean server. false
serverName If supplied, usePlatformMBeanServer is false, and no reference to an MBeanServer is supplied, the JMX extension registers MBeans with the MBean server carrying this name. None
createMBServer-ConnectorFactory If true, a connector is created on the MBeanServer. true
threaded Determines if the creation of the MBean connector is performed in this thread or in a separate thread. Only relevant if createMBServerConnectorFactory is true. false
daemon Determines if the MBean connector creation thread is marked as a daemon thread or not. Only relevant if createMBServerConnectorFactory is true. false
JMXServiceURL The URL of the connector to create on the MBeanServer. Only relevant if createMBServerConnectorFactory is true. service:jmx:rmi:///jndi/rmi://localhost:9913/jmxrmi

The MBean instrumentation provided by the above configuration will provide generic information about the WSDL supported by the web service as well as web service administration commands. To see performance metrics of the SOAP call processing, further configuration (see http://cxf.apache.org/docs/jmx-management.html) is required - these are disabled by default to avoid unnecessary runtime overhead.

If you're using Maven, make sure you have the following dependency added to the pom.xml for the web service provider:
<dependency>
   <groupId>org.apache.cxf</groupId>
   <artifactId>cxf-rt-management</artifactId>
   <version>${cxf.version}</version>
</dependency>

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!