Hi
----- Original Message -----
From: "Jason Dillon" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, August 16, 2001 9:29 AM
Subject: Re: [JBoss-dev] How to get MBeans to describe it's fields like a
DynamicMBean does
> On Tue, 14 Aug 2001, Hiram Chirino wrote:
> > I was looking for a way to fill in those description fields that
> > DynamicMBeans can fill out. But I did not want to have to replace all
the
> > JBossMQ MBeans with DynamicMBeans. So this is what I did:
>
> Why not? Aren't DynamicMBeans easier to work with? I am actually a
little
> confused about the different types, short of the basic MBean that
> implements a mgmt interface.
DynamicMBean declares the management interface whereas Standard MBean
defines it by its XXXMBean interface. Dynamic MBeans implements the
DynamicMBean
interface.
> > I created a new class called WrapperMBean and it extends
> > NotificationBroadcasterSupport and implements DynamicMBean.
> > I changed ServiceMBeanSupport so that it extends this new WrapperMBean.
> >
> > The WrapperMBean uses reflection to build the basic MBeanInfo object
using
> > the MBean interface classes. But it arguments it will the description
> > information it finds a xxxxMBeanInfo.properties resource file.
>
> Cool.
>
> > I was aming at not having to change how service classes defined thier
MBean
> > interface (But if you optionaly includes a the xxxxMBeanInfo.properties
file
> > it would be used). Well.. it almost worked out that way.. but because
JMX
> > gets a little confused trying to determin if a bean is MBean or a
> > DynamicMBean, the reality is that I had to rename my service's xxxxMBean
> > interface to xxxxEMBean and also had to add a 'implements DynamicMBean'
to
> > my service class. This was a real bummer (not so clean)
>
> Why do you need the interface for dynamic?
For standard MBeans JMX looks for an interface using the convention
XXXMBean.
Therefore it can get confused when a DynamicMBean does the same. I would
guess
that it first look that it implements DynamicMBean and then check for
standard MBean
but seems that some people at Sun are not as bright as you expect.
Andy
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development