tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Costin Manolache" <>
Subject JConsole and tomcat.
Date Mon, 05 May 2008 03:31:21 GMT
This is a proposal for a very small change in tomcat trunk, to make tomcat
easier to use with JConsole.
Right now if you start tomcat 'out of box' and than try to inspect it with
jconsole, you'll only see the 'platform' mbeans
(memory etc). That's because tomcat doesn't use the platform mbean server.

The fix is simple - in main or anywhere before the first
MBeanServerFactory.findMBeanServer(null) we need
to add a ManagementFactory.getPlatformMBeanServer(). This way modeler and
tomcat will find the platform
mbean server as the first server and use it. A better fix would be to
replace all usages of findMBeanServer with

The options are:
- add a flag/system property to enable this behavior

- make it default, add a flag to disable and use separate server

- just use getPlatformMBeanServer with no flag.

The javadoc is:

  " It is recommended that this platform MBeanServer also be used
    to register other application managed beans  besides the platform
   This will allow all MBeans to be published through the same
    MBeanServer and hence allow for easier network publishing
    and discovery."

I can't think of any good reason to use a separate MBean server - and using
jconsole is quite nice, all
other methods of remote JMX documented on our site are more complex ( but
good for specific cases ).
The extra benefit is that we can see both memory/logging/other platform
mbeans in the same place with
tomcat beans.

Options ? Can I just add the one liner before the first invocation of
MBeanServerFactory ?


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message