You can export the MBean using XML - see the documentation. But, AFAIK, there's no way with standard components to add descriptions like that.
You would have to implement your own MBeanInfoAssembler
(or subclass one of the standard ones).
EDIT:
For example, the AbstractReflectiveMBeanInfoAssembler
gets the operation description in createModelMBeanOperationInfo by calling getOperationDescription()
. By default, this just returns the method name. The MetadataMBeanInfoAssembler
(used for the annotations) overrides this method to get the description from the annotation.
So, you could subclass the MethodNameBasedMBeanInfoAssembler
and implement the getOperationDescription()
method to get the description from wherever you want (perhaps another property in the XML).
Similarly, the operation parameter descriptions are set up in getOperationParameters()
so you would override that to build them. See the MetadataMBeanInfoAssembler to see how he does it from the annotation.