Kees de Kooter
04-02-2009, 11:24
When tomcat is started with the batch file it is recognized by both JConsole and VisualVM as a local proces. No problem there.
However if tomcat is started as a windows service this is not the case. After a lot of tinkering I came to the following solution. In the registry (cough) under key HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Procrun 2.0\node1\Parameters\Java I added the following lines to the Options attribute:
-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=1092
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false
Now JConsole can connect as a "Remote process". In VisualVM you add a Local / JMX Connection.
However if tomcat is started as a windows service this is not the case. After a lot of tinkering I came to the following solution. In the registry (cough) under key HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Procrun 2.0\node1\Parameters\Java I added the following lines to the Options attribute:
-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=1092
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false
Now JConsole can connect as a "Remote process". In VisualVM you add a Local / JMX Connection.