[jboss-user] [Management, JMX/JBoss] - Description / Parameter names etc in jmx-console

bdamato do-not-reply at jboss.com
Fri Jun 12 14:42:18 EDT 2009


I'm messing around with jboss-5.1.0 and I have created an annotated ejb3 bean as described here:
http://docs.jboss.org/ejb3/app-server/reference/build/reference/en/html/jboss_extensions.html
It works as advertised (although I had to monkey with it to work with 5.1.0). 
Ideally I'd like to add some friendly operation descriptions to replace the default "Operation exposed for management" that shows up in the jmx-console. 

Is it possible to do this through annotations, or am I stuck having to create service xml files for these?


  | package bob;
  | 
  | public interface ServiceOneManagement {
  | 
  | 	public void doATaskForMe(String input);
  | 	
  | 	public void setTheValue(int theValue);
  | 
  | 	public int getTheValue();
  | 	
  | 	void create() throws Exception;
  | 
  | 	void start() throws Exception;
  | 
  | 	void stop();
  | 
  | 	void destroy();
  | 
  | }
  | 


  | package bob;
  | 
  | import org.jboss.ejb3.annotation.Management;
  | import org.jboss.ejb3.annotation.Service;
  | 
  | @Service(objectName = "bob.mbeans:serviceName=ServiceOne")
  | @Management(ServiceOneManagement.class)
  | public class ServiceOne implements ServiceOneManagement {
  | 	private int theValue;
  | 	
  | 	public int getTheValue() {
  | 		return theValue;
  | 	}
  | 
  | 	public void setTheValue(int theValue) {
  | 		this.theValue = theValue;
  | 	}
  | 
  | 	public void doATaskForMe(String input) {
  | 		System.out.println("Called do a task for me");
  | 	}
  | 
  | 	public void create() throws Exception {
  | 		System.out.println("ServiceOne - Creating");
  | 	}
  | 
  | 	public void start() throws Exception {
  | 		System.out.println("ServiceOne - Starting");
  | 	}
  | 
  | 	public void stop() {
  | 		System.out.println("ServiceOne - Stopping");
  | 	}
  | 
  | 	public void destroy() {
  | 		System.out.println("ServiceOne - Destroying");
  | 	}
  | }
  | 

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

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



More information about the jboss-user mailing list