>From: Jason Dillon <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: <[EMAIL PROTECTED]>
>Subject: Re: [JBoss-dev] How to get MBeans to describe it's fields like a 
>DynamicMBean does
>Date: Thu, 16 Aug 2001 09:29:01 -0700 (PDT)
>
>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.
>

NO they are harder to implement.  A dynamic MBean has to explicitly export 
all of it's managment interface.  There is no *MBean interface class 
required.  But this means you have to code in all that info that would have 
gone into the *MBean 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?
>

Because writing the MBean interface file is easier than implementing a 
DynamicMBean.  This aproach though alows me to allso add description info to 
my MBean interface (only available with DynamicMBeans).

Regards,
Hiram

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to