[英]How to manage a JMX web application
I've gone through the process on this page to expose the JMX interface of a web application. 我已经完成了此页面上的过程,以暴露Web应用程序的JMX界面。
I've managed to view the exposed interface on the Tomcat JMX proxy but when I load JConsole and look for the exposed mbean interface I can't find anything related to the attributes and operations exposed. 我设法查看了Tomcat JMX代理上的公开接口,但是当我加载JConsole并查找公开的mbean接口时,我找不到与公开的属性和操作相关的任何内容。
Thre is no specific entry on jconsole for the web app so I figured it might be under the TOMCAT jmx entry. 在Web应用程序的jconsole上没有特定的条目,因此我认为它可能在TOMCAT jmx条目下。 It's not. 不是。 (bare in mind, I did manage to see it on the tomcat jmx proxy page). (请记住,我确实在tomcat jmx代理页面上看到了它)。
How can I manage my web application locally? 如何在本地管理我的Web应用程序? Why is JConsole not showing it? JConsole为什么不显示它?
I've managed to fix this by doing a few basic steps - 我已经通过执行一些基本步骤来解决此问题-
In the singleton I registered with the mbean server with this command: 在单例中,我使用以下命令在mbean服务器上注册:
ManagementFactory.getPlatformMBeanServer().registerMBean(this, name); ManagementFactory.getPlatformMBeanServer()。registerMBean(this,name);
Thats it. 而已。 (In a nut shell) (简而言之)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.