|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.objectweb.jonas_ejb.container.JEntitySwitch
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) In the current version, we implement only the first. Others will be implemented later.
Field Summary | |
protected JEntityFactory |
bf
|
protected javax.transaction.Transaction |
currtx
|
protected JEntityContext |
Icontext
|
protected java.lang.String |
ident
|
protected int |
IHcount
|
protected JEntityLocal |
local
|
protected java.lang.Object |
pk
|
protected boolean |
reentrant
|
protected JEntityRemote |
remote
|
protected boolean |
shared
|
Constructor Summary | |
JEntitySwitch(JEntityFactory bf,
java.lang.Object pk)
constructor. |
Method Summary | |
void |
bindICtx(javax.transaction.Transaction tx,
JEntityContext bctx)
bind a JEntityContext for a create method. |
void |
discardICtx(javax.transaction.Transaction tx)
Discard a context/instance at end of request. |
JEntityContext |
getICtx(javax.transaction.Transaction tx)
Get a context/instance associated with this transaction Called at least at each request |
JEntityContext |
getICtx(javax.transaction.Transaction tx,
JEntityContext newctx)
bind a JEntityContext for a remove method. |
JEntityLocal |
getLocal()
Return the underlaying EJBLocalObject |
java.lang.Object |
getPrimaryKey()
Returns the PK |
JEntityRemote |
getRemote()
Return the underlaying EJBObject |
int |
getState()
|
void |
noLongerUsed()
Remove this EJB and UnExport the remote object. |
boolean |
passivateIH(boolean passivation)
try to passivate IH (called from swapper) args passivation false if only store bean state. |
void |
releaseICtx(javax.transaction.Transaction tx)
Release a context/instance at end of request. |
void |
tryBindICtx(javax.transaction.Transaction tx,
JEntityContext bctx)
Try to bind a JEntityContext if none already bound. |
void |
txCompleted(javax.transaction.Transaction tx,
boolean committed)
This transaction is now over. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected JEntityFactory bf
protected java.lang.Object pk
protected JEntityLocal local
protected JEntityRemote remote
protected boolean shared
protected boolean reentrant
protected int IHcount
protected JEntityContext Icontext
protected java.lang.String ident
protected javax.transaction.Transaction currtx
Constructor Detail |
public JEntitySwitch(JEntityFactory bf, java.lang.Object pk)
Method Detail |
public JEntityLocal getLocal()
public JEntityRemote getRemote()
public java.lang.Object getPrimaryKey()
public void bindICtx(javax.transaction.Transaction tx, JEntityContext bctx)
tx
- - the Transaction objectbctx
- - the JEntityContext to bindpublic void tryBindICtx(javax.transaction.Transaction tx, JEntityContext bctx)
tx
- - the Transaction objectpublic JEntityContext getICtx(javax.transaction.Transaction tx, JEntityContext newctx)
tx
- - the Transaction objectbctx
- - the JEntityContext to bindpublic JEntityContext getICtx(javax.transaction.Transaction tx)
tx
- - the Transaction objectpublic void releaseICtx(javax.transaction.Transaction tx)
tx
- - transaction associated to this contextpublic void discardICtx(javax.transaction.Transaction tx)
tx
- - transaction associated to this contextpublic void txCompleted(javax.transaction.Transaction tx, boolean committed)
public boolean passivateIH(boolean passivation)
public void noLongerUsed()
public int getState()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |