geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Jencks <>
Subject Re: Service MBeans getting attributes initialized twice
Date Thu, 04 Dec 2003 18:18:05 GMT

On Thursday, December 4, 2003, at 05:05 AM, Alan D. Cabrera wrote:

>> -----Original Message-----
>> From: David Jencks []
>> So, being a little too lazy today to investigate for myself...., are
>> the values on the first set call from the service.xml or  the initial
>> values in the descriptor?
> From the service.xml file.
> I have a wish list item for Service MBeans.  I would like to declare 
> the
> MBean interface in the service.xml file so that I don't have to create 
> a
> static getGeronimoMBeanInfo because I am very lazy.

You can use a separate xml descriptor, it needs to be in the same 
package and with the same name as the class.


I think Gianni wrote an xdoclet plugin to generate these...

In the service.xml file you use the class name as a descriptor, just as 
if you wrote a getGeronimoMBeanInfo static method.


--In JBoss I added the ability to include the "XMBean descriptor" 
inline in the service.xml file.  It was sort of usable if the 
service.xml file was generated by code, but IMNSHO totally human 
unreadable.  After a month or two I found myself looking at one of 
these service.xml files and wondering what on earth was going on.

-- After dealing with lots of xdoclet xml descriptor generation for 
mbeans (again in JBoss), I'm not sure it's such a great idea.  At the 
moment, I find looking at a getGeronimoMBeanInfo easier to decipher 
what is in the mbean interface than looking at a descriptor xml file or 
looking at javadoc comments spread through the file.  I also find it 
easier to write than the javadoc comments, and Intellij and the 
compiler find the syntax problems for me.

I think in the long run we may be happier if we add more conveniences 
to the GeronimoMBeanInfo setup like the 
addAllOperationsDefinedIn(?name) that Hiram added that lets you expose 
an interface in one step.


david jencks
> Regards,
> Alan

View raw message