org.objectweb.jonas.dbm.PoolItem Class Reference

Collaboration diagram for org.objectweb.jonas.dbm.PoolItem:

Collaboration graph
[legend]
List of all members.

Public Member Functions

void enlistConnection (Transaction transaction) throws javax.transaction.SystemException
void beforeCompletion ()
void afterCompletion (int status)
boolean isAged ()
boolean isOpen ()
int getOpenCount ()
boolean inactive ()
boolean isClosed ()
void open ()
boolean close ()
XAConnection getXACon ()
void setTx (Transaction tx)
Transaction getTx ()
boolean isRME ()
void setRME (boolean rme)
void remove ()

Detailed Description

This class represents a connection stored in the pool. It may be in different states:

Definition at line 53 of file PoolItem.java.


Member Function Documentation

void org.objectweb.jonas.dbm.PoolItem.afterCompletion int  status  ) 
 

synchronization implementation

Definition at line 124 of file PoolItem.java.

References org.objectweb.jonas.dbm.Pool.freeConnections().

Here is the call graph for this function:

void org.objectweb.jonas.dbm.PoolItem.beforeCompletion  ) 
 

synchronization implementation

Definition at line 117 of file PoolItem.java.

boolean org.objectweb.jonas.dbm.PoolItem.close  ) 
 

notify as closed

Returns:
true if normal close.

Definition at line 180 of file PoolItem.java.

Referenced by org.objectweb.jonas.dbm.Pool.closeConnection().

void org.objectweb.jonas.dbm.PoolItem.enlistConnection Transaction  transaction  )  throws javax.transaction.SystemException
 

implementation of resource manager event

Definition at line 96 of file PoolItem.java.

int org.objectweb.jonas.dbm.PoolItem.getOpenCount  ) 
 

Returns:
open count

Definition at line 148 of file PoolItem.java.

Referenced by org.objectweb.jonas.dbm.ConnectionManager.getConnection().

Transaction org.objectweb.jonas.dbm.PoolItem.getTx  ) 
 

Returns:
the Transaction

Definition at line 212 of file PoolItem.java.

Referenced by org.objectweb.jonas.dbm.Pool.closeConnection().

XAConnection org.objectweb.jonas.dbm.PoolItem.getXACon  ) 
 

Returns:
the associated XAConnection

Definition at line 197 of file PoolItem.java.

Referenced by org.objectweb.jonas.dbm.ConnectionManager.getConnection(), and org.objectweb.jonas.dbm.Pool.openConnection().

boolean org.objectweb.jonas.dbm.PoolItem.inactive  ) 
 

Check if the connection has been unused for too long time. This occurs usually when the caller forgot to call close().

Returns:
true if open time has been reached, and not involved in a tx.

Definition at line 157 of file PoolItem.java.

Referenced by org.objectweb.jonas.dbm.Pool.adjust().

boolean org.objectweb.jonas.dbm.PoolItem.isAged  ) 
 

Returns:
true if connection max age has expired

Definition at line 134 of file PoolItem.java.

Referenced by org.objectweb.jonas.dbm.Pool.adjust().

boolean org.objectweb.jonas.dbm.PoolItem.isClosed  ) 
 

Returns:
true if connection is closed

Definition at line 164 of file PoolItem.java.

Referenced by org.objectweb.jonas.dbm.Pool.closeConnection().

boolean org.objectweb.jonas.dbm.PoolItem.isOpen  ) 
 

Returns:
true if connection is still open

Definition at line 141 of file PoolItem.java.

Referenced by org.objectweb.jonas.dbm.Pool.freeConnections().

boolean org.objectweb.jonas.dbm.PoolItem.isRME  ) 
 

Returns:
true if registered as RME

Definition at line 219 of file PoolItem.java.

Referenced by org.objectweb.jonas.dbm.ConnectionManager.connectionClosed(), org.objectweb.jonas.dbm.ConnectionManager.connectionErrorOccurred(), and org.objectweb.jonas.dbm.ConnectionManager.getConnection().

void org.objectweb.jonas.dbm.PoolItem.open  ) 
 

Notify as opened

Definition at line 171 of file PoolItem.java.

References org.objectweb.jonas.dbm.Pool.getMaxOpenTimeMilli().

Here is the call graph for this function:

void org.objectweb.jonas.dbm.PoolItem.remove  ) 
 

remove this item

Definition at line 233 of file PoolItem.java.

Referenced by org.objectweb.jonas.dbm.Pool.adjust(), and org.objectweb.jonas.dbm.Pool.freeConnections().

void org.objectweb.jonas.dbm.PoolItem.setRME boolean  rme  ) 
 

set/unset as RME

Definition at line 226 of file PoolItem.java.

Referenced by org.objectweb.jonas.dbm.ConnectionManager.connectionClosed(), org.objectweb.jonas.dbm.ConnectionManager.connectionErrorOccurred(), and org.objectweb.jonas.dbm.ConnectionManager.getConnection().

void org.objectweb.jonas.dbm.PoolItem.setTx Transaction  tx  ) 
 

Set the associated transaction

Parameters:
tx Transaction

Definition at line 205 of file PoolItem.java.

Referenced by org.objectweb.jonas.dbm.Pool.freeConnections(), and org.objectweb.jonas.dbm.Pool.openConnection().


The documentation for this class was generated from the following file:
Generated on Tue Feb 15 15:06:46 2005 for JOnAS by  doxygen 1.3.9.1