views:

499

answers:

1

Hi,

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 viewed 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.

+1  A: 

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

Davanum Srinivas - dims
Yes I did. Unfortunately I did it in a place where it got skipped over. Switched the position so it works now. I feel a little embarrassed to say the least.Thanks for the help though.
Brian