You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Greg Johnson <gr...@yahoo.com> on 2005/04/25 19:37:30 UTC

Automatic custom MBean registration?

Does Tomcat have a mechanism for automatically registering custom MBeans?

Currently I've written code that uses the MBeanServerFactory to locate the MBeanServer,
and then I instantiate my objects, and register them with the MBeanServer. I've successfully used
this technique, and can access my custom MBeans via the JMXProxy that is built into Tomcat.

I've read and compared the Tomcat 5.0 and 5.5 documents at:
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/mbeans-descriptor-howto.html
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/mbeans-descriptor-howto.html

I noticed that in 5.5 there is no longer a discussion of including an entry for
ServerLifecycleListener.

I do not understand the purpose of the mbeans-descriptor.xml. I assumed it was so that using
this file, I could define what my MBean is, and have Tomcat load and register my MBean.
But I couldn't get it to work. I created an mbeans-descriptor.xml file, and placed it in
the package where my class files are located. But....then nothing happens. Am I wrong to
think that based on the inclusion of this XML file that Tomcat will load and register my
MBeans? Or do you have to do it the way I did.....by looking up the MBeanServer and then
registering the beans through my own code?

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org