-
1. Re: How to anotate params in an mbean method (so jmx console
starksm64 Mar 11, 2004 3:23 PM (in response to btarbox)You need to use a DynamicMBean to supply this information. The JBoss XMBean is the easiest way to to this.
-
2. Re: How to anotate params in an mbean method (so jmx console
duslow Mar 12, 2004 10:07 AM (in response to btarbox)If you use XDoclet (and if you don't, you should), it's pretty simple to create the Model XMBean for JBoss with param annotations.
For example:
/**
* @jmx:mbean name="MyApplication:service=MyJMX"
* @jboss.service servicefile="jboss"
* @jboss.xmbean
*/
public class MyJMX implements MyJMXMBean {
/** @jmx:managed-operation description="Init the MyJMX MBean" */
public void init() {};
/** @jmx:managed-operation description="Start the MyJMX MBean" */
public void start() {};
/** @jmx:managed-operation description="Stop the MyJMX MBean" */
public void stop() {};
/** @jmx:managed-operation description="Destroy the MyJMX MBean" */
public void destroy() {};
/**
* @jmx:managed-operation description="My doSomething method"
* @jmx.managed-parameter name="key" type="java.lang.String" description=“Key of Task”
*/
public void doSomething(Object key) {
// Do something useful with key
}
}
Then add the "jbossxmbean" sub-task tag to your jmxdoclet ant task, and you should be good to go. I'd post the actual Ant task, but this silly JBoss forum tool doesn't handle XML in the message at all. -
3. Re: How to anotate params in an mbean method (so jmx console
duslow Mar 12, 2004 10:27 AM (in response to btarbox)Slight correction:
This line:
* @jmx.managed-parameter name="key" type="java.lang.String" description=“Key of Task”
should read:
* @jmx.managed-parameter name="key" type="java.lang.String" description="Key of Task";