org.objectweb.jonas_ejb.container
Class JEntitySwitchCRU
java.lang.Object
org.objectweb.jonas_ejb.container.JEntitySwitch
org.objectweb.jonas_ejb.container.JEntitySwitchCST
org.objectweb.jonas_ejb.container.JEntitySwitchCRU
- public class JEntitySwitchCRU
- extends JEntitySwitchCST
Container Read Uncommitted lock-policy.
Only 1 thread can write. All other threads can read, without
waiting for a committed state. There is no wait.
This policy is deprecated : CRW should be used instead.
- Author:
- Philippe Durieux
| Fields inherited from class org.objectweb.jonas_ejb.container.JEntitySwitch |
bf, blockedtx, counter, countIH, countIT, deadlockTimeout, estimestamp, FEW_SECONDS, ident, inactivityTimeout, inDirtyList, isdetached, isremoved, lazyregister, local, lockpolicy, mustReload, mustStore, myTimerService, pk, readTimeout, reentrant, remote, runningtx, shared, todiscard, txUpdates, waiters, writingtx |
| Methods inherited from class org.objectweb.jonas_ejb.container.JEntitySwitch |
bindICtx, detachPk, discardContext, forceDiscardICtx, getBeanFactory, getBlockingTx, getEntityTimerService, getICtx, getICtx, getLocal, getPolicy, getPrimaryKey, getRemote, init, lazyRegistering, notifyTimeout, notifyWriting, registerCtx, releaseICtx, terminate, txCompleted |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JEntitySwitchCRU
public JEntitySwitchCRU()
- empty constructor. Object is initialized via init() because it is
implemented differently according to jorm mappers.
initpolicy
protected void initpolicy(JEntityFactory bf)
- Overrides:
initpolicy in class JEntitySwitchCST
waitmyturn
public void waitmyturn(javax.transaction.Transaction tx)
- Description copied from class:
JEntitySwitchCST
- Wait until I'm allowed to work on this instance.
Transaction isolation may be done here, depending on lock-policy.
- Overrides:
waitmyturn in class JEntitySwitchCST
- Parameters:
tx - Transaction
mapICtx
public JEntityContext mapICtx(javax.transaction.Transaction tx,
JEntityContext bctx,
boolean forced,
boolean holdit,
boolean notused)
- Map a context and its instance.
Could use the inherited method here. This is just a simplified
version for performances.
- Overrides:
mapICtx in class JEntitySwitch
- Parameters:
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.
- Returns:
- JEntityContext actually mapped