Viewing Tomcat 6.0's MBeans in Jconsole
I'm trying to write a small agent to control tomcat, and right now it looks like JMX is the best option for me. Using the manager http service I can see that there are all sorts of neat mbeans registered that give me all the info I need. Only problem is that when I connect to the tomcat instance using jconsole I don't see any of these mbeans, just the standard JVM ones.
Is there some kind of voodoo I need to do before tomcat will allow its mbeans to be vie开发者_如何学Pythonwed in jconsole, or am I misunderstanding what jconsole does? I don't want to start trying to write any code until I understand what's going on.
BTW, I'm running tomcat 6.0.20 with java 1.6.0_16 on win 7.
Cheers, Brian.
Did you set CATALINA_OPTS as shown in the tomcat docs?
http://tomcat.apache.org/tomcat-6.0-doc/monitoring.html
You will need at least "-Dcom.sun.management.jmxremote" to use a jconsole on the same machine as the JVM
精彩评论