【问题标题】:Java JMX ServerJava JMX 服务器
【发布时间】:2013-07-12 07:45:04
【问题描述】:

我很好奇 JConsole 和 JMX 如何协同工作。具体来说,我读过这个JConsole Guide,其中提到了

jconsole uses a JMXConnector client to connect to the JMXConnectorServer in
the target application. If the application isn't started with the JMX agent
then there isn't a JMXConnectorServer and jconsole doesn't have anything to
connect too. In that case it uses a HotSpotTM VM specific mechanism to start
the JMX agent in the target VM. Once the agent is started then jconsole connects
as normal.

当我启动 jconsole 时,它​​只需要一个用于 JMX 信息的端口和主机名,所以我想知道是否可以通过任意 tcp 连接(以及任何编程语言)访问 MBean,或者是否有一些特殊的东西那jconsole也在做什么?

我知道如何通过 java 访问 MBean 工厂,但我很好奇我是否可以通过 TCP 或其他直接机制通过任意语言访问这些项目。另见link discussing rest connector.

【问题讨论】:

    标签: java jmx mbeans


    【解决方案1】:

    默认情况下,JMX 服务器通过 RMI 提供连接。这将使通过任意语言访问服务器变得很棘手。

    但是,JMX 服务器不限于 RMI 作为通信协议。该架构是可扩展的,几乎可以使用任何传输协议 - 但它几乎需要从头开始编写。

    看看Jolokia - 他们做了一件非常了不起的事情,让您可以通过一堆协议(REST 就是其中之一)与 MBean 服务器通信。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多