Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-2103

Overly strict ModelMBeanInfoSupport validation of name/className descriptors.

    XMLWordPrintable

Details

    Description

      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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            starksm64 Scott Stark (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: