About Me

JMX, SNMP, Java, etc...

Daniel Fuchs blogs on JMX, SNMP, Java, etc...

All | Personal | Sun
tags: blogging firewall hg java jconsole jmx jvm management mbean mercurial monitoring opendmk openjdk opensource rmi snmp ssl

Table Of Contents (list all entries)

« Blogs, Java, Roller,... | Main | What is JMX? »
20060908 Friday September 08, 2006
JMX: Nick Stephen blogs on SnapshotProxies and SynchronizedStandardMBean

... Today Nick Stephen posted an article explaining how to access several attributes of one MBean in a synchronized way. This is a nice trick which can be quite useful.

Beware however that if you want to guarantee full data coherency, both the MBean implementation (server side) and the client application must cooperate (the client must use the described SnapshotProxy and not the regular proxy created by the MBeanServerInvocationHandler). If you use MXBeans however, data coherency is apparent right at the model level: the interface explicitely tells you that all the values are returned together, since they are part of the same attribute.

Yet, a SnapshotProxy may have other interesting properties: you could imagine coding a CachingSnapshotProxy that would refresh its internal cache of MBean attribute values only when it detects that its data is stale (because it received an AttributeValueChangeNotification from the remote MBean, or because the delay since the time it fetched the value has crossed a configured timeout). For instance, the JVM SNMP Agent, without directly using any such CachingSnapshotProxy, implements a somewhat similar mechanism to avoid calling the Management & Monitoring API too often...

Welcome to the World Of Sun Bloggers Nick!

Cheers
-- daniel
PS (not directly related to the subject of this blog): I have also updated my entry about Looking for JMX Overview, Examples, Tutorial, and more with a few additional links.
Tags:
Posted by dfuchs ( Sep 08 2006, 08:39:53 PM CEST ) Permalink Comments [0]

Trackback URL: http://blogs.sun.com/jmxetc/entry/jmx_nick_stephen_blogs_on
Comments:

Post a Comment:

Name:
E-Mail:
URL:

Your Comment:

HTML Syntax: NOT allowed
[Table Of Contents]

This is a personal Weblog, and I do not speak for my employer.

Calendar

RSS Feeds

DFuchs on DZone

Search

Links

Lookup RFC

Planet JMX

From Grenoble

Navigation

Referers