Save This Page
Home » jboss-5.0.0.CR1-src » org » jboss » ejb » plugins » [javadoc | source]
org.jboss.ejb.plugins
public class: EntitySynchronizationInterceptor [javadoc | source]
java.lang.Object
   org.jboss.ejb.plugins.AbstractInterceptor
      org.jboss.ejb.plugins.EntitySynchronizationInterceptor

All Implemented Interfaces:
    Interceptor

Direct Known Subclasses:
    EntityMultiInstanceSynchronizationInterceptor

The role of this interceptor is to synchronize the state of the cache with the underlying storage. It does this with the ejbLoad and ejbStore semantics of the EJB specification. In the presence of a transaction this is triggered by transaction demarcation. It registers a callback with the underlying transaction monitor through the JTA interfaces. If there is no transaction the policy is to store state upon returning from invocation. The synchronization polices A,B,C of the specification are taken care of here.

WARNING: critical code, get approval from senior developers before changing.

Nested Class Summary:
protected class  EntitySynchronizationInterceptor.InstanceSynchronization   
class  EntitySynchronizationInterceptor.ValidContextsRefresher  Flushes the cache according to the optiond refresh rate. 
Field Summary
protected  int commitOption    The current commit option. 
protected  long optionDRefreshRate    The refresh rate for commit option d 
protected  EntityContainer container    The container of this interceptor. 
Fields inherited from org.jboss.ejb.plugins.AbstractInterceptor:
nextInterceptor,  log,  container
Method from org.jboss.ejb.plugins.EntitySynchronizationInterceptor Summary:
create,   createSynchronization,   getContainer,   invoke,   invokeHome,   register,   setContainer,   start,   stop
Methods from org.jboss.ejb.plugins.AbstractInterceptor:
create,   destroy,   getContainer,   getNext,   invoke,   invokeHome,   isAppException,   setContainer,   setNext,   start,   stop
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.jboss.ejb.plugins.EntitySynchronizationInterceptor Detail:
 public  void create() throws Exception 
 protected Synchronization createSynchronization(Transaction tx,
    EntityEnterpriseContext ctx) 
 public Container getContainer() 
 public Object invoke(Invocation mi) throws Exception 
 public Object invokeHome(Invocation mi) throws Exception 
 protected  void register(EntityEnterpriseContext ctx,
    Transaction tx) 
    Register a transaction synchronization callback with a context.
 public  void setContainer(Container container) 
 public  void start() 
 public  void stop()