Duplicate :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
The ObjectName of the platform MXBeans follows a convention where an ObjectName must have a "type" property. A MXBean can have other key properties (e.g. MemoryManagerMXBean and MemoryPoolMXBean). Currently, MemoryManagerMXBean and MemoryPoolMXBean have a "name" property whose value is its name obtained by the getName() method. In JDK7, a new BufferPoolMXBean will be added and also has the "name" property in its ObjectName. Propose to add a new NamedManagedObject interface: public interface NamedManagedObject { public String getName(); } All platform MXBeans that have a name property will implement this interface to enforce the ObjectName convention. This will also simplify the implementation of the ManagementFactory.getPlatformMBeanServer() method to find all platform MXBeans and construct the ObjectName to register into a MBeanServer. The java.lang.management API defines the management interfaces for the Java virtual machine. The management interface for other components in the platform will reside in its own package. For example, the management interface for the logging facility is java.util.logging.LoggingMXBean. There is no easy way to find out what management interfaces are defined in the Java platform. In addition, when a new management interface is added in the platform, it needs to provide a factory method to obtain the platform MXBeans (e.g. java.util.logging.LogManager.getLoggerMXBean()). NIO and other components will define their management interfaces in the future JDK releases. Need to add a generic support for platform MXBeans of any type to simplify the work required when a platform component adds the monitoring and management support for local as well as remote access. This fix uses a new API in JDK7 so the following tests will fail to compile on JDK6 (as expected): com/sun/management/HotSpotDiagnosticMXBean/DumpHeap.sh com/sun/management/HotSpotDiagnosticMXBean/GetDiagnosticOptions.java com/sun/management/HotSpotDiagnosticMXBean/GetVMOption.java com/sun/management/HotSpotDiagnosticMXBean/SetVMOption.java This entry should cause any JDK6 failure to show up on the fail_list instead of being considered "new" failures.
|