users@glassfish.java.net

Re: Self-registering MBean

From: <glassfish_at_javadesktop.org>
Date: Thu, 07 Feb 2008 10:44:05 PST

Yes, agreed this is appealing.

But while there is defined management for Java EE (JSR 77), and this is supported in the AMX MBean APIs in GlassFish, there is no Java EE specification for designating MBean(s) to be loaded *as part of an EJB Module* (or Web Module, etc). Among other things, the security of having MBeans loaded in the (global) MBeanServer by any/all applications is an issue. But basically the Java EE spec has never addressed the issue.

One solution might be to use a custom MBean. These are supported by AMX:
https://glassfish.dev.java.net/nonav/javaee5/amx/javadoc/com/sun/appserv/management/config/CustomMBeanConfig.html

I'm not sure where the official docs describing custom MBeans are, but the design doc is online, and it goes into some detail:
http://wiki.glassfish.java.net/attach/CustomMBeans/custom-mbeans-design-document.html
[Message sent by forum member 'llc' (llc)]

http://forums.java.net/jive/thread.jspa?messageID=257934