|
||||||||||
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.JEntitySwitchDB
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 |
ihContext
EntityContext for non-transacted requests |
protected java.util.HashMap |
itsContext
Map of EntityContext's for transactions Key is the Transaction. |
Fields inherited from class org.objectweb.jonas_ejb.container.JEntitySwitch |
bf, blockedtx, counter, countIH, discarded, ident, inDirtyList, isremoved, lazyregister, local, lockpolicy, mustReload, myTimerService, pk, remote, runningtx, shared, txUpdates, waiters, writingtx |
Constructor Summary | |
JEntitySwitchDB()
empty constructor. |
Method Summary | |
void |
endIH()
|
protected JEntityContext |
getContext4Tx(javax.transaction.Transaction tx)
|
int |
getState()
|
protected void |
initpolicy(JEntityFactory bf)
|
void |
notifyWriting(javax.transaction.Transaction tx,
JEntityContext bctx)
This transaction has just modified this instance. |
boolean |
passivateIH(boolean passivation)
|
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)
|
void |
waitmyturn(javax.transaction.Transaction tx)
|
Methods inherited from class org.objectweb.jonas_ejb.container.JEntitySwitch |
bindICtx, discardICtx, getBeanFactory, getBlockedTx, getBlockingTx, getEntityTimerService, getICtx, getICtx, getLocal, getPolicy, getPrimaryKey, getRemote, init, mapICtx, noLongerUsed, notifyTimeout, registerCtx, terminate, tryBindICtx, txCompleted |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected JEntityContext ihContext
protected java.util.HashMap itsContext
Constructor Detail |
public JEntitySwitchDB()
Method Detail |
protected void initpolicy(JEntityFactory bf)
initpolicy
in class JEntitySwitch
protected JEntityContext getContext4Tx(javax.transaction.Transaction tx)
tx
- The Transaction
protected void setContext4Tx(javax.transaction.Transaction tx, JEntityContext ctx)
tx
- The Transactionprotected void removeContext4Tx(javax.transaction.Transaction tx)
public void waitmyturn(javax.transaction.Transaction tx)
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
public void endIH()
endIH
in class JEntitySwitch
public void notifyWriting(javax.transaction.Transaction tx, JEntityContext bctx)
notifyWriting
in class JEntitySwitch
tx
- transactionpublic int getState()
getState
in class JEntitySwitch
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |