org.jboss.mx.persistence
Class DelegatingPersistenceManager

java.lang.Object
  extended byorg.jboss.mx.persistence.DelegatingPersistenceManager
All Implemented Interfaces:
PersistenceManager (src)

public class DelegatingPersistenceManager
extends java.lang.Object
implements PersistenceManager (src)

DelegatingPersistenceManager. An XMBean Persistence Manager that delegates to an external MBean-controlled implementation the actual persistence of MBean attributes.


Constructor Summary
DelegatingPersistenceManager()
           
 
Method Summary
protected  void init(ModelMBeanInvoker (src)  invoker, MBeanInfo (src)  metadata)
          Lazy initialization Gets the external persistor to use and decides on the persistName to use for this MBean load()/store() calls.
protected  boolean isLoading()
          Check if we are loading state
 void load(ModelMBeanInvoker (src)  invoker, MBeanInfo (src)  metadata)
          Called initialy when the XMBean is constructed in order to load and set the attributes of the MBean, if their persistent image exists.
protected  void setIsLoading(boolean newIsLoading)
          Set the loading status
 void store(MBeanInfo (src)  metadata)
          store() is triggered by the PersistenceInterceptor based on the persistence policy.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DelegatingPersistenceManager

public DelegatingPersistenceManager()
Method Detail

load

public void load(ModelMBeanInvoker (src)  invoker,
                 MBeanInfo (src)  metadata)
          throws MBeanException (src) 
Called initialy when the XMBean is constructed in order to load and set the attributes of the MBean, if their persistent image exists.

Specified by:
load in interface PersistenceManager (src)
Throws:
MBeanException (src)

store

public void store(MBeanInfo (src)  metadata)
           throws MBeanException (src) 
store() is triggered by the PersistenceInterceptor based on the persistence policy. In the simple case, it will be called for every attribute set. store() will save *all* attributes that: (a) are writable (so we can re-load them later on) (b) their value exists in the ATTRIBUTE_VALUE descriptor (c) are not marked as PM_NEVER

Specified by:
store in interface PersistenceManager (src)
Throws:
MBeanException (src)

init

protected void init(ModelMBeanInvoker (src)  invoker,
                    MBeanInfo (src)  metadata)
             throws MBeanException (src) 
Lazy initialization Gets the external persistor to use and decides on the persistName to use for this MBean load()/store() calls.

Throws:
MBeanException (src)

isLoading

protected boolean isLoading()
Check if we are loading state


setIsLoading

protected void setIsLoading(boolean newIsLoading)
Set the loading status

Parameters:
newIsLoading -