Search code examples
jboss7.xjmxmbeansrhq

RHQ - JMX plugin - Update attribute value


I'm using RHQ JMX plugin to get operations and attributes of one custom Mbean. It is working but I would like to add the possibility to update an attribute value and I can't use the setter function to update it as it's not recognized as an operation.

How can I update my plugin to add this possibility ?


Solution

  • If you're writing your own plugin, you can declare the bean attribute as a:

    • measurement, to get history of values
    • resource configuration property, to easily update the value from RHQ

    Declaring an int MBean attribue in resource configuration works as follow:

    <resource-configuration>
        <c:simple-property name="MyAttributeName" type="integer"/>
    </resource-configuration>