[jboss-user] [Management, JMX/JBoss] - Naming parameters in a management bean using annotations

jimmycallaghan do-not-reply at jboss.com
Fri Nov 7 04:52:02 EST 2008


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.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4187633#4187633

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4187633



More information about the jboss-user mailing list