简体   繁体   中英

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?

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....

Thanks for every suggestions!

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.

And have MBeans in your deployed app(s), of course.

只需将jconsole附加到Tomcat进程,您就可以看到Servlet定义的任何MBean。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM