JMXWrapper
JMXWrapper copied to clipboard
JMXWrapper is a wrapper that allows creation of dynamic JMX MBeans through annotations
This seems to work well according to the instructions but it falls short when JMC (Java Mission Control) tries to render objects (even just PoJos) that are attributes of the...
It'd be nice if an MBean could specify an annotation that would add an `MBeanNotificationInfo` to an attribute or operation: * https://docs.oracle.com/javase/8/docs/api/javax/management/MBeanNotificationInfo.html * https://docs.oracle.com/javase/tutorial/jmx/notifs/index.html * https://docs.oracle.com/javase/8/docs/technotes/guides/jmx/JMX_1_4_specification.pdf 2.5 JMX Notification Model
If an operation throws an exception, then the JMX wrapper assumes that this is a failure to invoke: ``` javax.management.ReflectionException: Can't convert signature for operation checkHealth ``` https://github.com/uklimaschewski/JMXWrapper/blob/master/src/com/udojava/jmx/wrapper/JMXBeanWrapper.java#L454 Where it...
One of the useful things about descriptors is they can specify default values, min and max value and useful metadata on attributes: * https://docs.oracle.com/javase/8/docs/technotes/guides/jmx/tutorial/essential.html#wp1055639 * https://docs.oracle.com/javase/8/docs/api/javax/management/Descriptor.html * https://docs.oracle.com/javase/8/docs/technotes/guides/jmx/JMX_1_4_specification.pdf section 4.4...
https://github.com/uklimaschewski/JMXWrapper/blob/80fad1cb25a7af68ba412c298ca11e7edc979eca/src/com/udojava/jmx/wrapper/JMXBeanWrapper.java#L637 and https://github.com/uklimaschewski/JMXWrapper/blob/80fad1cb25a7af68ba412c298ca11e7edc979eca/src/com/udojava/jmx/wrapper/JMXBeanWrapper.java#L653 The description is updated if the annotation without a description is found first. However the sortValue is not updated. ### Example ```java @JMXBean(sorted=true) public class MyBean {...
The readme example: ```java @JMXBean(description = "My first JMX bean test") public class MyBean { int level = 0; @JMXBeanAttribute(name = "Floor Level", description = "The current floor level") public...