|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.ejb.plugins.AbstractInterceptor
org.jboss.ejb.plugins.EntitySynchronizationInterceptor
public class 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, isAppException, 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 AbstractInterceptorpublic void setContainer(Container container)
ContainerPlugin
setContainer in interface ContainerPluginsetContainer in class AbstractInterceptorcontainer - The container using this plugin. This may be null if the
plugin is being disassociated from a container.
public void create()
throws Exception
create in interface org.jboss.system.Servicecreate in class AbstractInterceptorExceptionpublic void start()
start in interface org.jboss.system.Servicestart in class AbstractInterceptorpublic void stop()
stop in interface org.jboss.system.Servicestop 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 InterceptorinvokeHome in class AbstractInterceptormi - ???
Exception - ???
public Object invoke(Invocation mi)
throws Exception
Interceptor
invoke in interface Interceptorinvoke in class AbstractInterceptormi - ???
Exception - ???
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||