|
||||||||||
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.JEntitySwitchCRW
Container Optimistic lock-policy. Only 1 thread can write. All other threads can read, without waiting for a committed state. There is no wait.
Field Summary | |
protected JEntityContext |
itContext
unique EntityContext |
protected static int |
maxtime
|
Fields inherited from class org.objectweb.jonas_ejb.container.JEntitySwitch |
bf, blockedtx, counter, countIH, countIT, ident, inactivityTimeout, inDirtyList, isremoved, lazyregister, local, lockpolicy, mustReload, mustStore, myTimerService, pk, reentrant, remote, runningtx, shared, timestamp, todiscard, txUpdates, waiters, writingtx |
Constructor Summary | |
JEntitySwitchCRW()
empty constructor. |
Method Summary | |
void |
endIH()
|
protected JEntityContext |
getContext4Tx(javax.transaction.Transaction tx)
|
int |
getState()
|
protected void |
initpolicy(JEntityFactory bf)
|
JEntityContext |
mapICtx(javax.transaction.Transaction tx,
JEntityContext bctx,
boolean forced,
boolean holdit,
boolean notused)
Map a context and its instance. |
void |
notifyWriting(javax.transaction.Transaction tx,
JEntityContext bctx)
This transaction has just modified this instance. |
boolean |
passivateIH(boolean passivation)
try to passivate instances |
protected void |
removeContext4Tx(javax.transaction.Transaction tx)
|
protected void |
setContext4Tx(javax.transaction.Transaction tx,
JEntityContext ctx)
|
void |
waitmyturn(javax.transaction.Transaction tx)
Must wait only if writingtx is not null, because we must wait for the writing transaction to finish. |
Methods inherited from class org.objectweb.jonas_ejb.container.JEntitySwitch |
bindICtx, discardContext, discardICtx, getBeanFactory, getBlockedTx, getBlockingTx, getEntityTimerService, getICtx, getICtx, getLocal, getPolicy, getPrimaryKey, getRemote, init, lazyRegistering, notifyTimeout, registerCtx, releaseICtx, 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 itContext
protected static int maxtime
Constructor Detail |
public JEntitySwitchCRW()
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 void waitmyturn(javax.transaction.Transaction tx)
public JEntityContext mapICtx(javax.transaction.Transaction tx, JEntityContext bctx, boolean forced, boolean holdit, boolean notused)
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.notused
- - true if we must check non-reentrance.
public 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
tx
- transactionpublic int getState()
getState
in class JEntitySwitch
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |