JMX client accessible locally only

时光怂恿深爱的人放手 提交于 2019-12-11 02:11:56

问题


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

  • Please advise how can I do that.
  • Also help with a Simple JMX client on same machine that will connect to that JMX agent.
  • If somehow we can get away with specifying an explicit port, that will be helpful.

回答1:


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.



来源:https://stackoverflow.com/questions/6629667/jmx-client-accessible-locally-only

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!