3 Replies Latest reply on Mar 30, 2008 8:33 AM by bdinnerv

    Annotation to se Parameter Description?

    delabu

      I have a managed MBean that I created using the @Service and @Management annotations.

      It works perfectly in the JMX console, only problem being that I have nothing in the ParamDescription column under the parameters of the registered operation.

      Is there a way that I can annotate these descriptions? It doesn't seem that javadoc like methods comments does the trick.

      This may be so simple that I run the risk of getting flamed to a crisp. But, I have Googled and searched high and low and can't find the answer!

        • 1. Re: Annotation to se Parameter Description?
          delabu

          I found this topic: http://www.jboss.com/index.html?module=bb&op=viewtopic&t=46797

          This is quite old, so I hope that there is now a way to do it with Java5 annotations.

          According to the above post I must either make it a DynamicMBean and/or user XDoclet annotations to annotate and set it up.

          Is this still the case, or is there a way to do it using the newer annotations?

          • 2. Re: Annotation to se Parameter Description?
            jonesn

            I'm just posting in reply to this because I'd like to do exactly the same thing. I want to add some parameters and comments to be exposed via the JMX-Console.

            I've seen mention of having to expose the bean as an XMBean using an xml descriptor? Is this the only way to add comments or can annotations be used as well?

            Thanks
            Nick.

            • 3. Re: Annotation to se Parameter Description?
              bdinnerv

              Has anyone got any further info on this one? Like others, I have searched high and low for a solution to this but cant seem to find one, there are references to a @Pname annotation in some articles but i cant find any class to implement the annotation - it would be really helpful to be able to provide some descriptions for fields and methods etc for JMX interfaces.

              Regards,

              Ben