Results 1 to 3 of 3

Thread: ManagedOperationParameter(s)

Hybrid View

  1. #1
    Join Date
    Oct 2005
    Location
    Reading UK
    Posts
    2

    Default ManagedOperationParameter(s)

    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

  2. #2
    Join Date
    Oct 2004
    Location
    Fareham, England
    Posts
    313

    Default

    Hi Guillaume

    Try this.

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

    Ciao
    Rick

  3. #3
    Join Date
    Oct 2005
    Location
    Reading UK
    Posts
    2

    Default

    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",descr iption="blahblah")
    * @@org.springframework.jmx.export.metadata.ManagedO perationParameter(index=1,name="aParam2",descripti on="blahblah")
    *
    */
    public String resetSource(String aSourceName,String aParam2)


    This work like a charm

    Cheers Guillaume

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •