O'Reilly logo

Hands-On High Performance with Spring 5 by Dinesh Radadiya, Prashant Goswami, Pritesh Shah, Subhash Shah, Chintan Mehta

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Connecting JMX to monitor Tomcat

To configure JMX on Tomcat, we need to set the relevant system properties upon JVM startup. We can use the following methods.

We can update the catalina.sh or catalina.bat file in {tomcat-folder}\bin\, adding the following values:

-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port={port to access} -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false

For example, we can add the following values at {tomcat-folder}\bin\catalina.bat:

set JAVA_OPTS="-Dcom.sun.management.jmxremote-Dcom.sun.management.jmxremote.port=8990-Dcom.sun.management.jmxremote.authenticate=false-Dcom.sun.management.jmxremote.ssl=false"

If you want to configure JMX for your Tomcat in Eclipse, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required