如何使用 JMXWS WS 连接器 (JSR-262) 启动 VisualVM?
我有一个在 JBoss 中运行的 Java 应用程序,其中启用了 JMX远程监控。这使我能够连接 jconsole 和 VisualVM 等工具来监控内存使用情况、CPU 利用率、mbean 等。不过,运行我的应用程序的服务器具有限制性端口访问,这就是我使用 的原因JSR-262 JMX WS 连接器。
JSR-262 实现有一个示例,说明如何为 jconsole 启用 jmx:ws 协议。但我想对 VisualVM 尝试同样的操作。
我相信我必须做的是,在启动 VisualVM 时:
- 将一些额外的 JSR-262 jar 添加到类路径
- 将 java.endorsed.dirs 设置为未捆绑的 JAXWS 库所在的路径
有人能指出我正确的方向吗?是否有一种机制可以为 VisualVM 提供额外的参数?它会起作用吗?还有更简单的方法吗?
I have an Java application running in JBoss in which I have enabled JMX remote monitoring. This allows me to connect with tools such as jconsole and visualvm to monitor memory usage, cpu utilization, mbeans, and more. The server on which my application is running has restrictive port access though, which is why I am using the JSR-262 JMX WS Connector.
The JSR-262 implementation has an example of how you enable jmx:ws protocol for jconsole. But I would like to try the same for visualvm.
What I believe I have to do is, when launching visualvm:
- Add a number of additional JSR-262 jars to the classpath
- Set the java.endorsed.dirs to a path where the unbundled JAXWS libraries reside
Can someone point me in the right direction? Is there a mechanism to provide additional arguments to visualvm? Will it work at all? Is there even an easier way?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我找到了答案。在运行 Linux 版本的 VisualVM 时,我发现有许多可用的命令行参数:
这导致我尝试以下命令:
它的作用就像一个魅力。
I found the answer. Upon running the linux version of visualvm, I found that there are are number of commandline arguments available:
This led me to trying the following command:
which works like a charm.