RE: When is PersistentMBean.load() called ?
"Bordet, Simone" <[email protected]>
| Newsgroups | gmane.comp.java.mx4j.devel |
|---|---|
| Message-ID | <F4F4494F4618794E99E59D41C5292FFD025A18F5@mnoexc01.emea.cpqcorp.net> |
Hi, > I wonder whether a previously persisted ModelMBean (via store()) is > loaded back ? I thought during initialization would be a good > place, but > I could not found *any* reference to PersistentMBean.load() > in the source. This is not true, see RMMB.load(). > However, there should be one, at least according to the JMX 1.2 Spec > which states > > "load > Locates the MBean in a persistent store and primes > this instance > of the MBean with the stored values. Any currently set > values are > overwritten. This should only be called by an implementation of > the ModelMBean interface." > > Furthermore, the store() method called in > RequiredModelMBean.setAttribute() is only useful, if the "value" field > in the AttributeDescriptor is set, which is only the case if some sort > of caching is enabled (ALWAYS_STALE == false). Hence, persistence > doesn't work at all for write-through scenarios. Not sure I follow. Method store() in RMMB.setAttribute() is called based on the persist policy, it seems to me. > Does persistence for mx4j's ModelMBean does work at all or do I miss > something ? I'd double check you're looking at the latest MX4J code. Simon ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click