Roberto
Roberto

Reputation: 1450

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

Upvotes: 1

Views: 2384

Answers (2)

dsimms
dsimms

Reputation: 264

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.

Upvotes: 2

Gandalf
Gandalf

Reputation: 9855

Just attach the jconsole to your Tomcat process and you should be able to see any MBeans defined by your Servlet.

Upvotes: -1

Related Questions