Review Request for 7024172 "Move platform MXBeans to java.lang.management"

Mandy Chung mandy.chung at oracle.com
Fri Mar 25 16:28:43 UTC 2011



7024172: Move BufferPoolMXBean and PlatformLoggingMXBean to java.lang.management

Webrev at:
     http://cr.openjdk.java.net/~mchung/jdk7/7024172/webrev.00/
javadoc at:
     http://cr.openjdk.java.net/~mchung/jdk7/7024172/api

Problem:

java.nio.BufferPoolMXBean and java.util.logging.PlatformLoggingMXBean
are new PlatformManagedObject added in JDK 7.  However, the
management interfaces and its implementation have a dependency on
JMX.  Having the management interfaces in the same package as its runtime
component (e.g. BufferPoolMXBean in java.nio package) leads to split packages.
That is, the java.nio.BufferPoolMXBean will be in the management module
separated from all other java.nio.* classes that are in the base module which
is awkward. Similarly, java.util.logging is split across the management module
and the logging module.

On the other hand, management interfaces typically are accessed through JMX.
In addition, an ObjectName is defined for each platform MXBean as an
identifier for remote access. Types referenced by management interfaces
are generally the basic types and custom data type specific for monitoring
and management purpose. java.nio.BufferPoolMXBean and
java.util.logging.PlatformLoggingMXBean do not define attributes of type
defined in the java.nio and java.util.logging package.

This fix will eliminate the split package situation by moving the management
interfaces to another package.  These two MXBeans are new and we can set
the right precedence for future management interfaces.

Summary of Changes:
1. Move java.nio.BufferPoolMXBean to java.lang.management
2. Move java.util.logging.PlatformLoggingMXBean to java.lang.management
3. PlatformLoggingMXBean does not implement java.util.logging.LoggingMXBean
    but instead it defines the same methods as in LoggingMXBean.
4. java.lang.management.ManagementFactory spec change
    - Added methods to return a singleton platform MXBean
      i.e. getPlatformMXBean(Class) and
      getPlatformMXBean(MBeanServerConnection, Class) method
    - Replace getAllPlatformMXBeanInterfaces() that returns a List
      with a new getPlatformManagementInterfaces() method that returns a Set.

Thanks
Mandy




More information about the core-libs-dev mailing list