|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.jonas.dbm.PoolItem
This class represents a connection stored in the pool. It may be in different states: - available and reuseable for this user (open=0, tx=null) - reusable for the same transaction, not already committed (open=?, tx!=null) - still open, but not involved in a Tx (open=1, tx=null) These 2 cases must be considered: close after commit, commit after close. We cannot suppose what shema the user will use and we must handle both correctly.
Constructor Summary | |
PoolItem(Pool pool,
javax.sql.XAConnection xac,
java.lang.String user)
|
Method Summary | |
void |
afterCompletion(int status)
synchronization implementation |
void |
beforeCompletion()
synchronization implementation |
boolean |
close()
notify as closed |
void |
enlistConnection(javax.transaction.Transaction transaction)
implementation of resource manager event |
int |
getOpenCount()
|
javax.transaction.Transaction |
getTx()
|
javax.sql.XAConnection |
getXACon()
|
boolean |
inactive()
Check if the connection has been unused for too long time. |
boolean |
isAged()
|
boolean |
isClosed()
|
boolean |
isOpen()
|
boolean |
isRME()
|
void |
open()
Notify as opened |
void |
remove()
remove this item |
void |
setRME(boolean rme)
set/unset as RME |
void |
setTx(javax.transaction.Transaction tx)
Set the associated transaction |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public PoolItem(Pool pool, javax.sql.XAConnection xac, java.lang.String user)
Method Detail |
public java.lang.String toString()
public void enlistConnection(javax.transaction.Transaction transaction) throws javax.transaction.SystemException
enlistConnection
in interface org.objectweb.transaction.api.ResourceManagerEvent
javax.transaction.SystemException
public void beforeCompletion()
beforeCompletion
in interface javax.transaction.Synchronization
public void afterCompletion(int status)
afterCompletion
in interface javax.transaction.Synchronization
public boolean isAged()
public boolean isOpen()
public int getOpenCount()
public boolean inactive()
public boolean isClosed()
public void open()
public boolean close()
public javax.sql.XAConnection getXACon()
public void setTx(javax.transaction.Transaction tx)
tx
- Transactionpublic javax.transaction.Transaction getTx()
public boolean isRME()
public void setRME(boolean rme)
public void remove()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |