JMX: Nick Stephen blogs on SnapshotProxies and SynchronizedStandardMBean
By daniel on Sep 08, 2006
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
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.
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
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
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.