Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6778909

Add @Description annotations to built-in MBean interfaces

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Won't Fix
    • Icon: P5 P5
    • None
    • 7
    • core-svc
    • None

      Since the JMX API 2.0 now provides support for putting descriptions into MBean interfaces, via the @Description annotation, it would be a good idea if we annotated the MBean interfaces defined by the JMX API itself, as well as the platform MXBeans. The user experience will be much better if you point JConsole or VisualVM at one of the java.lang.management MXBeans and see a tooltip saying something "Approximate accumulated collection time (ms)" rather than just "CollectionTime".

      In addition, for MBeans that emit notifications (e.g. MemoryMXBean), we can document the notification types using @NotificationInfo. This isn't strictly necessary but it typically simplifies the implementation, and serves as an example for users wanting to do the same thing.

      Finally, we will be adding an @ObjectNameTemplate annotation that will allow us to say e.g. @ObjectNameTemplate("java.lang:type=MemoryPool,name={Name}"), which defines formally the naming scheme for MemoryPoolMXBean instances. The {Name} is replaced with the value of the Name attribute (i.e. we call getName()). It would be useful to add these annotations to all of the platform MXBeans so the information about their naming scheme is available formally as well as informally.

            Unassigned Unassigned
            emcmanus Eamonn McManus
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: