]
Brian Stansberry updated WFCORE-1492:
-------------------------------------
Fix Version/s: (was: 3.0.0.Beta1)
The read-attribute result for platform mbean properties that throw
UnsupportedOperationException should be 'undefined'
----------------------------------------------------------------------------------------------------------------------
Key: WFCORE-1492
URL:
https://issues.jboss.org/browse/WFCORE-1492
Project: WildFly Core
Issue Type: Enhancement
Components: Domain Management
Affects Versions: 2.1.0.Final
Reporter: Brian Stansberry
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.