connect to tomcat with JMX
Answering my own question; turned out to be easier than i thought.
Following needs to be done, for enabling JMX access for Tomcat installed as a Windows service, that has a name "ApacheTomcatWindowsServer" for example:
- Install Tomcat as Windows service, either using the command (first cd into \bin\ )
service.bat install
or your custom scripts.
- Enable Apache Service Manager for the installed service using the following command:
tomcat7w.exe //MS//ApacheTomcatWindowsServer
This should start Apache Service Monitor program on your system tray. Click on its icon. select 'Configure', click on the 'Java' tab and append the following on the 'Java Options' text box, one option per line:
-Dcom.sun.management.jmxremote.port=8080
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false
Save and exit and restart the service.
- To connect to the JMX console, fire
jconsole
from your JDK installation, click 'New Connection', specify 'Remote Process' and enterhostname:8090
.
https://visualvm.java.net/jmx_connections.html
http://tomcat.apache.org/tomcat-7.0-doc/monitoring.html