You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Daniel Guggi <da...@gmail.com> on 2011/04/01 19:42:55 UTC

How to configure custom MBeans

Hi,

I'm trying to configure custom MBeans by creating an
MBeanInterface+Impl and putting the jar into tomcat's lib-dir.

I manged to create the mbean using jmx-direclty like the following
(exected from within a LifecycleListener):

MBeanServer server = getServer();
        ObjectName name = null;
        try {
            name = new ObjectName("test:Name=test");
            server.registerMBean(this, name);
        } catch (Exception e) {
            e.printStackTrace();
        }

however I'd like to use the "modeler-way" (mbeans-descriptor.xml),
because I want to see mbean-descriptions (for operations, paramters
etc.) when using jconsole.
I can't get this to work - the documentation doesn't help a lot here...

BTW. I'm using tomcat6.

tia,
dani

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