4
我在Tomcat服務器中使用CXF公開Web服務。 我想在JMX中公開一些像ResponseTimeFeature提出的性能信息。無法激活CXF ResponseTimeFeature
我CXF-beans.xml的文件如下:
<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>
這是非常相似,在CXF JMX page解釋。
問題是,當我在[默認地址(服務:jmx:rmi:/// jndi/rmi:// localhost:9913/jmxrmi)]上使用jconsole進行連接時,我看不到任何性能的MBean。我有MyBus的管理信息和裏面的服務。但是沒有任何關於ResponseTime(即使在SOAP-UI對服務進行負載測試之後)。
我在Web應用程序中記錄以下錯誤啓動:
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]
是否有人對如何解決這個問題的任何想法?
在此先感謝。