users@glassfish.java.net

Custom MBean question/sample

From: <glassfish_at_javadesktop.org>
Date: Tue, 28 Aug 2007 05:51:21 PDT

I have a JCA connector that I wrote that I would like to instrument and manage using a custom MBean. My question is how do I do that? I understand that I need to define an interface and implement the interface as the MBean and I've done that and can see my MBean using JConsole and manage through it.

I'd like to see this under the Custom MBeans in the Glassfish Admin Console as well. I read the documentation on bundling the classes up and where to put them so either they are isolated or available to applcation components.

What I don't understand is this. Right now, I defined the management interface and then implemented it with a class that has intimate knowledge of my resource adapter. Right now I create an instance of this class and register it with the MBeanServer. In the Custom MBean scenario with Glassfish, I need to deploy my MBean. How do I do this and still have it be created or have intimate knowledge of my resource adapter? Or do I just need to deploy my MBean's interface?

Any example of a Custom MBean that does not just stand on its own but rather interacts with another application server component would be real useful.

So any help anyone can give will be appreciated.
[Message sent by forum member 'bbergquist' (bbergquist)]

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