-
Bug
-
Resolution: Done
-
Major
-
JBossAS-4.0.2 Final
-
None
I've noticed an incompatablilty between the implementation of JMX on JBoss and the JMX 1.2.1 RI/JDK5. When a ModelMBeanInfoSupport object is created with a className of 'org.jboss.SomeBean', and a descriptor with a field called 'name' with value 'SomeBean', the following runtime error results:
RuntimeOperationsException: null Cause: java.lang.IllegalArgumentException: Invalid name, expected 'org.jboss.SomeBean' but got: SomeBean
at javax.management.modelmbean.ModelMBeanInfoSupport.isMBeanDescriptorValid(ModelMBeanInfoSupport.java:498)
at javax.management.modelmbean.ModelMBeanInfoSupport.setMBeanDescriptor(ModelMBeanInfoSupport.java:484)
at javax.management.modelmbean.ModelMBeanInfoSupport.<init>(ModelMBeanInfoSupport.java:199)
at atg.management.xml.ModelMBeanInfoFactory.createMBeanInfo(ModelMBeanInfoFactory.java:296)
This appears to be do to implementation details of earlier jmx ris as well as this statement from the jmx spec:
<extract, jmx-1.2 spec>
TABLE 4-3 ModelMBeanInfo Constructors
ModelMBeanInfo (with className, description, ModelMBeanAttributeInfo[], ModelMBeanConstructorInfo[],
ModelMBeanOperationInfo[], ModelMBeanNotificationInfo[])
Creates a ModelMBeanInfo with the provided information, but the MBean descriptor is a default one constructed
by the ModelMBeanInfo implementation. The constructed MBean descriptor must not be null. It contains at least the name and descriptorType fields. The name should be the MBean class, as returned by the getClassName method inherited from MBeanInfo.
</extract, jmx-1.2 spec>
this is certainly not a must statement. As long as relaxing this does not invalidate one of the cts jmx tests we should relax the className, name requirement.