JDK-6888171 : JMX Monitor API should not require JavaBeans to be present
  • Type: Bug
  • Component: core-svc
  • Sub-Component: javax.management
  • Affected Version: 7
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2009-10-05
  • Updated: 2014-10-01
  • Resolved: 2011-03-08
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 b78Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Description
Currently JMX has a depenedencies on the JavaBeans API (which in turn has a dependency on applet, AWT, and other classes). Here are the specific dependencies:

com.sun.jmx.mbeanserver.DefaultMXBeanMappingFactory$CompositeBuilderViaConstructor -> java.beans.ConstructorProperties (beans)
com.sun.jmx.mbeanserver.Introspector     -> java.beans.BeanInfo (beans)
com.sun.jmx.mbeanserver.Introspector     -> java.beans.Introspector (beans)
com.sun.jmx.mbeanserver.Introspector     -> java.beans.PropertyDescriptor (beans)
javax.management.JMX$MBeanOptions        -> java.beans.BeanInfo (beans)
javax.management.JMX$MBeanOptions        -> java.beans.Introspector (beans)
javax.management.JMX$MBeanOptions        -> java.beans.PropertyDescriptor (beans) 

This bug seeks to eliminate these dependencies. The context for this request is JDK modularization where it may be desirable to have a "management" module that supports monitoring and management of the VM without requiring that all Java SE modules be installed.
Now that JSR-255 has been backed out of jdk7 we are left with the following dependencies:

com.sun.jmx.mbeanserver.DefaultMXBeanMappingFactory$CompositeBuilderViaConstructor -> java.beans.ConstructorProperties (beans)
com.sun.jmx.mbeanserver.Introspector     -> java.beans.BeanInfo (beans)
com.sun.jmx.mbeanserver.Introspector     -> java.beans.Introspector (beans)
com.sun.jmx.mbeanserver.Introspector     -> java.beans.PropertyDescriptor (beans)

Comments
EVALUATION The remaining dependency in the JMX monitor API can be addressed by using reflection to identify the accessor methods. This does not impact applications that provide explicit information about the beans as the presence of BeanInfo classes will require Java Beans to be present. This solution has been implemented for jdk7 b78, see: http://mail.openjdk.java.net/pipermail/jmx-dev/2009-November/000060.html
23-11-2009

EVALUATION When JSR 255 is removed from JDK 7 most but not all of these dependencies will evaporate. We can introduce a small amount of duplication of code to get rid of most of the rest but the principal remaining concern is @ConstructorProperties which is imported from java.beans. That should probably be separated out from the rest of the java.beans module.
05-10-2009