Uploaded image for project: 'WildFly Core'
  1. WildFly Core
  2. WFCORE-1492

The read-attribute result for platform mbean properties that throw UnsupportedOperationException should be 'undefined'

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 2.1.0.Final
    • Management
    • None

      Some platform mbean getters are documented to throw a UOE on some VMs. The read-resource handler will catch the UOE and leave the attribute undefined, but the read-attribute handler will convert the UOE to an OperationFailedException. This JIRA is to change that read-attribute behavior to return undefined as well.

      There was a rationale for the different behavior. Basically, the read-attribute behavior is consistent with what the underlying java.lang.management.XXXMBean does – it fails. Typically (probably always) there is another boolean getter on the mbean that will tell you if xxx is supported, with the assumption you won't call the unsupported method if not. But for read-resource, we are reading all the attributes, and we guarantee a response value. So we catch the exception and return undefined.

      One minor downside to this is if JMX clients read these attributes, they'll get a null response instead of a failure. But I think that's ok; the MBeanAttributeInfo for these is created by us; these are not the real platform mbeans, they are our wrappers around them really intended for exposure over DMR, not JMX. If a JMX client wants the standard platform mbean semantics, they can access the real underlying platform mbeans.

      This should be done in conjunction with WFCORE-406, which deals with ensuring our management metadata is correct.

            Unassigned Unassigned
            bstansbe@redhat.com Brian Stansberry
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: