I host a web service using CXF inside a Tomcat server. I would like to show some performance data in JMX, similar to the one suggested by ResponseTimeFeature.
My cxf- beans.xml file looks like this:
<cxf:bus bus="cxf" id="MyBus"> <cxf:properties> <entry key="bus.jmx.enabled" value="true" /> </cxf:properties> </cxf:bus> <bean id="CounterRepository" class="org.apache.cxf.management.counters.CounterRepository"> <property name="bus" ref="cxf" /> </bean> <jaxws:endpoint id="analyserEndpoint" implementor="#analyserImpl" address="/analyser"> <jaxws:features> <bean class="org.apache.cxf.management.interceptor.ResponseTimeFeature" /> </jaxws:features> </jaxws:endpoint>
This is very similar to what is described in the CXF JMX page .
The problem is that when I connect using jconsole to [the default address (service: jmx: rmi: /// jndi / rmi: // localhost: 9913 / jmxrmi)], I do not see any MBean performance. I have MyBus management information and a service inside. But nothing about ResponseTime (even after loading the SOAP-UI test through the service).
I have the following error registered when starting a web application:
2012-09-10 15:13:19,692 ERROR org.apache.cxf.management.jmx.InstrumentationManagerImpl - Could not start JMX connector server : java.io.IOException: Cannot bind to URL [rmi://localhost:9913/jmxrmi]: javax.naming.NameAlreadyBoundException: jmxrmi [Root exception is java.rmi.AlreadyBoundException: jmxrmi]
Does anyone have any ideas on how to solve this problem?
Thanks in advance.
source share