|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.jonas_ejb.container.JEntitySwitch
org.objectweb.jonas_ejb.container.JEntitySwitchCS
JEntitySwitch is used internally to synchronize accesses to the entity context and thus to the entity bean instance. All parts common to EJBObject and EJBLocalObject should be here. Different policies can be applied to manage context/instance pairs: - only 1 pair (container manages the transaction isolation) - 1 pair for each transaction (transaction isolation managed by DataBase) - 2 pairs (1 for transactional accesses, 1 for non transaction accesses)
Field Summary | |
protected JEntityContext |
itContext
unique EntityContext |
protected static int |
maxtime
|
protected boolean |
mustStore
True if a TX need this instance currently used outside tx When the last release is done, we must store this instance. |
protected boolean |
reentrant
reentrant=true if a bean instance can be accessed concurrently. |
Fields inherited from class org.objectweb.jonas_ejb.container.JEntitySwitch |
bf, blockedtx, counter, countIH, discarded, ident, inDirtyList, lazyregister, local, lockpolicy, mustReload, myTimerService, pk, remote, runningtx, shared, txUpdates, waiters, writingtx |
Constructor Summary | |
JEntitySwitchCS()
empty constructor. |
Method Summary | |
void |
endIH()
Instance is ready to use for new transaction. |
protected JEntityContext |
getContext4Tx(javax.transaction.Transaction tx)
|
protected void |
initpolicy(JEntityFactory bf)
|
JEntityContext |
mapICtx(javax.transaction.Transaction tx,
JEntityContext bctx,
boolean forced,
boolean holdit)
Map a context and its instance. |
void |
notifyWriting(javax.transaction.Transaction tx,
JEntityContext bctx)
|
boolean |
passivateIH(boolean passivation)
try to passivate IH (called from swapper) |
void |
releaseICtx(javax.transaction.Transaction tx)
Release a context/instance at end of request. |
protected void |
removeContext4Tx(javax.transaction.Transaction tx)
|
protected void |
setContext4Tx(javax.transaction.Transaction tx,
JEntityContext ctx)
|
Methods inherited from class org.objectweb.jonas_ejb.container.JEntitySwitch |
bindICtx, discardICtx, getBlockedTx, getBlockingTx, getEntityTimerService, getICtx, getICtx, getLocal, getPolicy, getPrimaryKey, getRemote, getState, init, noLongerUsed, notifyTimeout, registerCtx, tryBindICtx, txCompleted |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected JEntityContext itContext
protected boolean reentrant
protected boolean mustStore
protected static int maxtime
Constructor Detail |
public JEntitySwitchCS()
Method Detail |
protected void initpolicy(JEntityFactory bf)
initpolicy
in class JEntitySwitch
protected JEntityContext getContext4Tx(javax.transaction.Transaction tx)
protected void setContext4Tx(javax.transaction.Transaction tx, JEntityContext ctx)
protected void removeContext4Tx(javax.transaction.Transaction tx)
public JEntityContext mapICtx(javax.transaction.Transaction tx, JEntityContext bctx, boolean forced, boolean holdit)
mapICtx
in class JEntitySwitch
tx
- - the Transaction objectbctx
- - the JEntityContext to bind if not nullforced
- - force to take this context. (case of create)holdit
- - increment count to hold it, a release will be called later.
public void releaseICtx(javax.transaction.Transaction tx)
releaseICtx
in class JEntitySwitch
tx
- - transaction associated to this contextpublic boolean passivateIH(boolean passivation)
passivateIH
in class JEntitySwitch
passivation
- false if only store bean state.
public void endIH()
endIH
in class JEntitySwitch
public void notifyWriting(javax.transaction.Transaction tx, JEntityContext bctx)
notifyWriting
in class JEntitySwitch
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |