Hi Jeff

jmx4r is a pretty useful library.

> This error is strange, there should not be a white space between
> 'active' and '=3D'. The method to set the value should be 'active=3D', no=
t
> 'active =3D'

That is a typo, apologies.

> This may be due to an error in the description of the MBean.
> What you can do:
> * check what attributes are exposed by the jmx4r mbean
> =A0 irb> standby_mbean.attributes

standby_mbean.attributes.each { |a | puts a.grep /^ac/ }
# =3D> active

> * check what is exposed by the Real JMX MBean object:
> =A0 irb> =A0JMX::MBean.pretty_print
> "xxx.jmx.monitors:name=3Dhydra.planb.cps,type=3DJmsQueueStatsMBeanFactory=
"

very nice

> In you case, you should see a "Value" attribute which is both readable
> and writable.

writable is false and I am an idiot.

I then successfully invoked a JMX operation on the object returned
with MBean#find_by_name

Thanks

Aidy

On Aug 4, 3:46=A0pm, Jeff Mesnil <jmes... / gmail.com> wrote:
> aidy wrote:
> > Hi,
>
> > I am attempting to use the jmx4r library to set an MBean attribute.
> > `method_missing': undefined method `active =3D'
>
> > exception, when I attempt to set the attribute.
>
> This error is strange, there should not be a white space between
> 'active' and '=3D'. The method to set the value should be 'active=3D', no=
t
> 'active =3D'
>
> This may be due to an error in the description of the MBean.
> What you can do:
> * check what attributes are exposed by the jmx4r mbean
> =A0 irb> standby_mbean.attributes
> * check what is exposed by the Real JMX MBean object:
> =A0 irb> =A0JMX::MBean.pretty_print
> "xxx.jmx.monitors:name=3Dhydra.planb.cps,type=3DJmsQueueStatsMBeanFactory=
"
>
> In you case, you should see a "Value" attribute which is both readable
> and writable.
>
> hope that helps,
> jeff
> --
> Posted viahttp://www.ruby-forum.com/.