JMX客户端只能在本地访问 [英] JMX client accessible locally only

查看:80
本文介绍了JMX客户端只能在本地访问的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建一个JMX代理,该代理只能从本地主机访问.

I want to create a JMX agent that has to be accessible from local host only.

  • 请告知我该怎么做.
  • 还在与将要连接到该JMX代理的同一台机器上的Simple JMX客户端提供帮助.
  • 如果我们能够以某种方式摆脱指定显式端口的局面,那将会很有帮助.

推荐答案

您可能会找到附加API 连接到正在运行的Java进程,并使其启动仅本地的JMX代理.您将像往常一样设置要公开的任何MBean.我觉得该代码类似于JConsole用于连接到本地JVM进程的代码.您可能还想研究 Jmxterm 的源,该源利用JConsole连接到本地JVM进程.

You might find this helpful. It uses the attach API for Oracle's JVM to connect to a running Java process and have it start a local only JMX agent. You would setup whatever MBeans you want to expose as usual. I get the impression that this code is similar to what JConsole does for connecting to local JVM processes. You might also want to investigate the source for Jmxterm which leverages JConsole for connecting to local JVM processes.

这篇关于JMX客户端只能在本地访问的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆