org.objectweb.jonas_ejb.container
Class JEntitySwitchRO
java.lang.Object
org.objectweb.jonas_ejb.container.JEntitySwitch
org.objectweb.jonas_ejb.container.JEntitySwitchCST
org.objectweb.jonas_ejb.container.JEntitySwitchRO
public class JEntitySwitchRO
- extends JEntitySwitchCST
ReadOnly lock policy : Instance are never written to database.
They are regularly read from database if bean is shared.
- 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 |
|
Method Summary |
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 |
txCompleted(javax.transaction.Transaction tx,
boolean committed)
This transaction is now over. |
void |
waitmyturn(javax.transaction.Transaction tx)
Wait until I'm allowed to work on this instance. |
| 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 |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
nextRead
protected long nextRead
JEntitySwitchRO
public JEntitySwitchRO()
- 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.
- 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
txCompleted
public void txCompleted(javax.transaction.Transaction tx,
boolean committed)
- This transaction is now over. We can dispose of the instance for another
transaction or discard it.
- Overrides:
txCompleted in class JEntitySwitch
- Parameters:
tx - the transaction objectcommitted - true if transaction was committed.