Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6403794

java.lang.management implementation should not assume PlatformMBeanServer supports MXBeans

XMLWordPrintable

    • 6
    • b81
    • generic
    • generic

      From ###@###.###:
      > We might question whether it's a good idea to use MXBeans in the
      > Java SE implementation given this risk that people will install previously
      > compatible MBeanServers that would break the Java SE implementation.

      The context here is that the JMX API defines a system property, javax.management.builder.initial, which can be used to replace the standard MBeanServer implementation with another one. If you do this in JDK 5.0, the PlatformMBeanServer will use your implementation. This works because the java.lang.management code doesn't expect the MBeanServer implementation to support MXBeans, and wraps them itself in DynamicMBeans. But in JDK 6, the j.l.m code *does* expect the implementation to support MXBeans, so your replacement MBeanServer suddenly must, or the java.lang MBeans will no longer work. This is a regression.

            lmalvent Luis-Miguel Alventosa (Inactive)
            emcmanus Eamonn McManus
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: