1 Reply Latest reply on Apr 28, 2009 7:07 AM by Tajh Taylor

    Naming parameters in a management bean using annotations

    James Callaghan Newbie

      How can I name the parameters in my Managent bean so that they show up in the MBean view with useful names instead of p1 and p2?

      My MBean interface looks like this:

      import org.jboss.annotation.ejb.Management;
      
      @Management
      public interface MyServiceMBean
      {
       public String showCustomerDetails(String accountNumber);
      
       public String getPathToMessageRequestDefinitionXML();
      
       public String getPathToMessageResponseDefinitionXML();
      }


      My implementing class looks like this:

      @Service(objectName = "myservice:service=MyServiceMBean")
      public class MyServiceMBeanImpl implements MyServiceMBean
      {
      
       public String getPathToMessageRequestDefinitionXML()
       {
       return "some text";
       }
      
       public String getPathToMessageResponseDefinitionXML()
       {
       return "some text";
       }
      
       public String showCustomerDetails(String accountNumber)
       {
       // code removed.
       return "some text";
       }
      }


      I'd imagine that there's a simple annotation I can put on the interface methods to define the parameters but, for the life of me, I cannot find a single reference out there that shows me how.

      Appologies if I'm missing the obvious.