|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.ejb.plugins.AbstractInterceptor org.jboss.ejb.plugins.EntitySynchronizationInterceptor
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
|
Field Summary | |
protected int |
commitOption
The current commit option. |
protected EntityContainer |
container
The container of this interceptor. |
protected long |
optionDRefreshRate
The refresh rate for commit option d |
Fields inherited from class org.jboss.ejb.plugins.AbstractInterceptor |
log, nextInterceptor |
Constructor Summary | |
EntitySynchronizationInterceptor()
|
Method Summary | |
void |
create()
|
protected Synchronization |
createSynchronization(Transaction tx,
EntityEnterpriseContext ctx)
|
Container |
getContainer()
|
Object |
invoke(Invocation mi)
??? |
Object |
invokeHome(Invocation mi)
??? |
protected void |
register(EntityEnterpriseContext ctx,
Transaction tx)
Register a transaction synchronization callback with a context. |
void |
setContainer(Container container)
This callback is set by the container so that the plugin may access it |
void |
start()
|
void |
stop()
|
Methods inherited from class org.jboss.ejb.plugins.AbstractInterceptor |
destroy, getNext, setNext |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected int commitOption
protected long optionDRefreshRate
protected EntityContainer container
Constructor Detail |
public EntitySynchronizationInterceptor()
Method Detail |
public Container getContainer()
getContainer
in class AbstractInterceptor
public void setContainer(Container container)
ContainerPlugin
setContainer
in interface ContainerPlugin
setContainer
in class AbstractInterceptor
public void create() throws Exception
create
in interface org.jboss.system.Service
create
in class AbstractInterceptor
Exception
public void start()
start
in interface org.jboss.system.Service
start
in class AbstractInterceptor
public void stop()
stop
in interface org.jboss.system.Service
stop
in class AbstractInterceptor
protected Synchronization createSynchronization(Transaction tx, EntityEnterpriseContext ctx)
protected void register(EntityEnterpriseContext ctx, Transaction tx)
public Object invokeHome(Invocation mi) throws Exception
Interceptor
invokeHome
in interface Interceptor
invokeHome
in class AbstractInterceptor
Exception
public Object invoke(Invocation mi) throws Exception
Interceptor
invoke
in interface Interceptor
invoke
in class AbstractInterceptor
Exception
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |