PDA

View Full Version : ManagedOperationParameter(s)



gaubert
Oct 6th, 2005, 10:24 AM
Hi,

I am using apache commons attribute to declare my Beans as MBean. Everything is working like a charm expect ManagedOperationParameter(s).

How can I use this annotation to describe parameters of my exposed methods ?

Below is how I annotate a method I want to expose. What do I have to do to also describe aSourceName ?

/**
* @@org.springframework.jmx.export.metadata.ManagedO peration
* (description="reset a synchronization Source (both synchro dates are reset to 1970-01-01")
*
*/
public String resetSource(String aSourceName)



Thanks a lot,

Cheers Guillaume

Rick Evans
Oct 12th, 2005, 01:33 PM
Hi Guillaume

Try this (http://www.springframework.org/docs/api/org/springframework/jmx/export/metadata/ManagedOperationParameter.html).

I daresay that you've already found this by now... better late than never though :)

Ciao
Rick

gaubert
Oct 13th, 2005, 02:36 AM
Thanks Rick,

but I've already found the right syntax. I was missing the index attribute for methods with multiple parameters:

/**
* @@org.springframework.jmx.export.metadata.ManagedO peration(description="reset a synchronization Source (both synchro dates are reset to 1970-01-01")
* @@org.springframework.jmx.export.metadata.ManagedO perationParameter(index=0,name="aSourceName",description="blahblah")
* @@org.springframework.jmx.export.metadata.ManagedO perationParameter(index=1,name="aParam2",description="blahblah")
*
*/
public String resetSource(String aSourceName,String aParam2)


This work like a charm

Cheers Guillaume