JMX and Tomcat: create and use MBeans in a servlet
Does anyone have any ideas on how to achieve this? Or even good documentation on how to do this?
Basically everything is done in a test standalone version (using java client or jconsole, I can call mbeans methods and everything works fine), but I need to put it in my Tomcat servlet ....
Thanks for every suggestion!
Rob
+1
a source to share
2 answers
The Tomcat monitoring docs describe how to enable JMX for the JVM of the Tomcat process. Short answer: you should get com.sun.management.jmxremote properties. * Installed somehow - either via CATALINA_OPTS, or via a startup script or Windows service definition.
And you have MBeans in your deployed applications, of course.
+2
a source to share