users@glassfish.java.net

Re: Writing custom mbeans, and log rotation events

From: <glassfish_at_javadesktop.org>
Date: Sun, 02 Mar 2008 23:25:35 PST

Bejamin,

This is an interesting question and we are trying to address this more completely for V3. In V2, however, the custom MBeans are not part of application, per se. They are part of application server. So, you are right, if your MBean depends on the classes that are part of an application, you have no choice.

But that does not mean you can't write an MBean that's part of your application. That's very much possible. This is because an MBean is just another (set of) class(es) and you can get hold of MBeanServer that comes along with J2SE 5.0 JVM and register your MBean.

Now, since your application has always got an access to application server's public classes, you should be able to use this route.

The LogRotation related event classes are not yet part of public interface of GlassFish, so you've got to use it at your own risk :). Sankar, can you help provide a documentation of those classes?

Regards,
Kedar
[Message sent by forum member 'km' (km)]

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