File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Tomcat and the fly likes mbeans-descriptor.xml and custom MBean Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "mbeans-descriptor.xml and custom MBean" Watch "mbeans-descriptor.xml and custom MBean" New topic

mbeans-descriptor.xml and custom MBean

Christophe Hvd

Joined: May 31, 2011
Posts: 2
Hi all,
I followed the Tomcat 6 documentation about custom MBean. It says
You may also add MBean descriptions for custom components in a mbeans-descriptor.xml file, located in the same package as the class files it describes.
Problem : I do exactly what is recommended and my custom Mbean descriptions are still not mine. Tomcat generates default values for the description fileds, etc.
then i followed this good tutorial about the Tomcat config for custom MBean :
Not working too..

Is there anybody who has already performed this "miracle"??

Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17280

Welcome to the JavaRanch, Christophe!

I did this, but it was about 5 years ago, so I've pretty much forgotten what I did. I was able to do it using just the documentation set, though and while it was tricky - you have to get everything JUST right - it was doable.

The docs you quoted are based on Tomcat 5.0. Tomcat 5.5 and Tomcat6 both introduced major changes in Tomcat's architecture. Plus, Java's JMX toolset has been improved since Java 5 was the standard.

So I recommend checking the Tomcat 6 docs and see what they say. You may discover that the whole process has been made simpler and more straightforward since Tomcat 5.0, if you're lucky. The bane of the Internet is that old, outdated docs tend to often show up at the top of the search results list. It's a reason why I wish more people would put dates on that kind of thing. The JSF stuff can be really bad that way, since JSF was pretty raw originally.

An IDE is no substitute for an Intelligent Developer.
Christophe Hvd

Joined: May 31, 2011
Posts: 2
Hi Tim,
thank you for your answer.
As i said, I studied both the Tomcat 5 & 6 documentation. Nothing is really explained about mbeans. Just a short sentence which says to put the mbeans-descriptors.xml in the same .jar as the mbean it describes.

But it doesn't work at all. I've tried many configuration and I search in many Tomcat's documentation page but I found nothing.

So my question still stand..
Shantanu Puranik
Ranch Hand

Joined: Jun 10, 2004
Posts: 67
I'm facing the same situation.
If anybody has running example or other resource for tomcat 6.x, please share.

--- Shantanu
Shantanu Puranik
Ranch Hand

Joined: Jun 10, 2004
Posts: 67
Finally, got some resource that works.
I agree. Here's the link:
subject: mbeans-descriptor.xml and custom MBean
It's not a secret anymore!