-
Bug
-
Resolution: Fixed
-
P3
-
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.
> 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.