Hello,
I'm within the migration process of our application from JBoss v5.1 to JBoss v7.1.1.
After what I updated our MBeans codes to MXBeans I have a problem with adding descriptions (metadata) to our MXBean interfaces via standard java annotations.
Same code was working fine in JBoss v5.1 and adds important description for MBean's operations/parameters to MBeanInfo.
Such MBean description was then displayed in javax.management tools like JConsole or JMX Console so it is very useful.
Here is a sample from our source codes:
Sample MXBean Interface:
@MXBean(true)
@Description("Some nice description of whole MXBean")
@Local
public interface XYMXBean {
@Description("Some nice description of MXBean operation")
String performSomeExecution(@PName("nicePrameterName") String parameterName);
}
Sample MXBean Impl:
@Singleton
@Startup
public class XYMBeanImpl implements XYMXBean {
private static final String MXBEAN_OBJECT_NAME = "com.abc.def:service=XY";
private static Log logger = LogFactory.getLog(XYMBeanImpl.class);
private ObjectName objectName;
@PostConstruct
public void registerInJMX() {
logger.debug("Registering MXBean: " + MXBEAN_OBJECT_NAME);
this.objectName = MBeanHelper.registerInJMX(this, MXBEAN_OBJECT_NAME);
}
@PreDestroy
public void unregisterFromJMX() {
logger.debug("Unregistering MXBean: " + objectName.getCanonicalName());
MBeanHelper.unregisterFromJMX(objectName);
}
@Override
public String performSomeExecution(String parameterName) {
// do some business logic
}
}
Notes:
Such @Description and @PName annotations were working in JBoss v5.1, but now in JBoss v7.1 these annotations doesn't fill MBeanInfo with provided description content.
Am I wrong with my code or is there some known limitation I'm not aware of?
Thanks a lot for any hint.
Tomas