JDK-6778909 : Add @Description annotations to built-in MBean interfaces
  • Type: Enhancement
  • Component: core-svc
  • Sub-Component: java.lang.management
  • Affected Version: 7
  • Priority: P5
  • Status: Open
  • Resolution: Unresolved
  • OS: generic
  • CPU: generic
  • Submitted: 2008-12-02
  • Updated: 2020-02-05
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdUnresolved
Related Reports
Relates :  
Description
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.

Comments
EVALUATION Nothing complicated here. @Description strings should be suitable for use in tooltips, so the main challenge is capturing the essential details of each item in a short string, without distorting its meaning.
02-12-2008