JMX和Tomcat:在Servlet中创建和使用MBean [英] JMX and Tomcat: create and use MBeans in a servlet
问题描述
有人对实现该目标有一些想法吗?甚至是关于如何执行此操作的良好文档?
does anybody have some ideas on how to achieve that? Or even a good documentation on how to do that?
基本上,所有操作都是在测试独立版本中完成的(通过Java客户端或jconsole,我可以调用mbeans方法,并且一切正常,但是我需要将其放入我的Tomcat servlet中....
Basicly everything is done in a test standalone version (by a java client or jconsole I am able to call mbeans methods and everything works fine), but I need to put it in my Tomcat servlet....
感谢每一个建议!
Rob
推荐答案
The Tomcat docs on monitoring describe how to enable JMX for Tomcat process's JVM. The short answer is you have to get the com.sun.management.jmxremote.* system properties set somehow -- either through the CATALINA_OPTS, or the start up script or the Windows service definition.
当然要在已部署的应用程序中包含MBean.
And have MBeans in your deployed app(s), of course.
这篇关于JMX和Tomcat:在Servlet中创建和使用MBean的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!