java - JMX 与 Apache CXF 集成

标签 java apache tomcat cxf jmx

我需要使用 JMX 监控 CXF 服务器并遵循 CXF Documentation .我使用 tomcat,以下是位于 /home/kalpa/applications/apache-tomcat-7.0.54/webapps/java_first_jaxws/WEB-INF/classes 的 cxf.xml 文件的内容

<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">

<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>

</beans>

但是我无法使用jconsole 监控数据。没有本地连接条目。

这可能是什么问题?

最佳答案

我不知道你的问题是否仍然是一个持续存在的问题,但这是我的配置:

  <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>

而不是你的:

<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>

我正在使用 CXF 3.0.2 和 JRE 1.6.0_27 中的 jconsole ...

这工作正常:

jconsole connection string

关于java - JMX 与 Apache CXF 集成,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23865896/

相关文章:

java - 正则表达式匹配括号内的数值

java - DB2 和 Jasper 报告中的 COALESCE 问题

python - django ALLOWED_HOSTS 不工作

php - 如何找出 httpd.conf 文件所在的位置?

php - 如何允许 PHP 在不损害服务器安全的情况下写入文件

war 部署时出现 Tomcat 错误 - 上下文路径/示例中的应用程序无法启动

java - 部署项目到tomcat ROOT

java - 在 TextView 中设置文本

eclipse - 在 Eclipse 中运行时不显示 Tomcat 主页

java - MySQL JDBC 连接上的故障转移?