users@glassfish.java.net

Re: MBean and Management Rule: Observed Attribute not reachable

From: Shalini Muthukrishnan <Shalini.Muthukrishnan_at_Sun.COM>
Date: Tue, 15 Dec 2009 11:41:32 +0530

Could you try removing the property (in management-rule) :

<property name="stringnotify" value="notifydiffer"/>

and add in place of this as follows :

<property name="notifydiffer" value="true"/>

Thanks,
Shalini.
glassfish_at_javadesktop.org wrote:
> I an trying to monitor a attributes value which is listed on jconsole. I am successfully retreiving the attributes value using JMX.
>
> 1. I create a custom MBean to get the value of this attribute.
> 2. I create anoter action mbean which will send notification if the value of this attribute changes.
> 3. I create a monitor management rule and observe the value of this attribute.
>
> When the value of the attribute changes; i see "Observed attribute not accessible by the mbean" when i print notification.getMessage().
>
> Following are the relevant entries from my domain.xml:
>
> <mbean enabled="true" impl-class-name="com.instance.state.InstanceState" name="NAMBean" object-name="user:impl-class-name=com.instance.state.InstanceState,name=NAMBean" object-type="user"/>
>
> <mbean enabled="true" impl-class-name="com.instance.state.InstanceStateAction" name="NAMBeanAction" object-name="user:impl-class-name=com.instance.state.InstanceStateAction,name=NAMBeanAction" object-type="user"/>
>
> <management-rule enabled="true" name="instance_monitor">
> <event level="WARNING" record-event="true" type="monitor">
> <property name="observedmbean" value="NAMBean"/>
> <property name="observedattribute" value="StateValue"/>
> <property name="monitortype" value="stringmonitor"/>
> <property name="stringnotify" value="notifydiffer"/>
> <property name="stringtocompare" value="2"/>
> </event>
> <action action-mbean-name="NAMBeanAction"/>
> </management-rule>
>
>
> P.S the stateValue is the variable which my first custoem MBean returns.
>
> Any help would be appreciated.
> [Message sent by forum member 'lazania' ]
>
> http://forums.java.net/jive/thread.jspa?messageID=376368
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>