JDK-7024172 : Move BufferPoolMXBean and PlatformLoggingMXBean to java.lang.management package
  • Type: Bug
  • Component: core-svc
  • Sub-Component: java.lang.management
  • Affected Version: 7
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2011-03-03
  • Updated: 2017-05-16
  • Resolved: 2011-04-21
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.
JDK 7
7 b138Fixed
Related Reports
Relates :  
Description
The management interface for buffer pools (BufferPoolMXBean) is in the java.nio package. The rational for this was that JSR-174/JSR-163 had "reserved" java.lang.management for VM instrumentation. With modules coming in jdk8 it is time to re-examine this as it's awkward to include java.nio in the base module without include BufferPoolMXBean (a platform managed component and so has a dependency on JMX). This bug is submitted to re-examine this and get agreement to move this management interface to java.lang.management.
java.util.logging.PlatformLoggingMXBean should also be moved to avoid the
java.util.logging package be splitted across two modules.
This bug fix adds the following new SDK/JDK tests:

    java/lang/management/BufferPoolMXBean/Basic.java
    java/lang/management/PlatformLoggingMXBean/LoggingMXBeanTest.java
    java/lang/management/PlatformLoggingMXBean/PlatformLoggingMXBeanTest.java

and this bug fix modifies the following existing SDK/JDK test:

    java/lang/management/ManagementFactory/GetPlatformMXBeans.java

These new/revised tests are not valid for execution until JDK7-B138.
If these tests are executed on older bits, they will fail to compile.
However, this entry will make that failure appear on the known fail_list.

Comments
EVALUATION Changeset URL: http://hg.openjdk.java.net/jdk7/tl/jdk/rev/3e001dd50408
29-03-2011

EVALUATION The new java.lang.management.PlatformManagedObject was added as a generic support to any platform MXBeans of any type so that it simplifies the work required when a new management interface is added in the platform (e.g. java.nio.BufferPoolMXBean). The management interfaces typically are accessed through JMX while they can be used as ordinary Java interfaces. In addition, for remote management, an ObjectName is defined for each platform MXBean that leads to a dependency on JMX. With modules coming in JDK 8, due to the dependency from the management interfaces and its implementation to JMX, we revisit that grouping the management interfaces with 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 are in (base module). Similarly, java.util.logging is split across the management module and the logging module. 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; instead the implementation class of the MXBean may. We should avoid the split package situation. The proposal is to move BufferPoolMXBean and PlatformLoggingMXBean to the java.lang.management package grouped with JMX in the management module. When a new platform management interface is added in a future release, we will determine if the java.lang.management package is an appropriate package for it or a new package should be created.
16-03-2011