|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.jonas.dbm.Pool
Connection Pool
Contributor(s):
Constructor Summary | |
Pool(ConnectionManager cmgr,
XADataSourceImpl xads)
Pool constructor |
Method Summary | |
void |
check4MaxAge()
Check all connections not in a transaction if their maxage is reached and if so kill them. |
void |
closeAllConnections()
Close all connections in the pool, when server is shut down. |
PoolItem |
closeConnection(javax.sql.XAConnection xac,
int flag)
Mark a specific Connection in the pool as closed. |
void |
freeConnections(javax.transaction.Transaction tx)
The transaction has committed (or rolled back). |
int |
getCurrentNumberOfXAConnection()
Management method: |
protected int |
getMaxConnPool()
|
protected int |
getMinConnPool()
|
PoolItem |
newConnection(java.lang.String user,
javax.transaction.Transaction tx)
Add a new XAConnection in the pool |
PoolItem |
openConnection(java.lang.String user,
javax.transaction.Transaction tx)
lookup connection in the pool for this user/tx |
protected int |
setConnCheckLevel(int jdbcConnCheckLevel)
|
protected long |
setConnMaxAge(long jdbcConnMaxAge)
|
protected int |
setMaxConnPool(int maxConPool)
|
protected int |
setMinConnPool(int minConPool)
|
protected java.lang.String |
setTestStatement(java.lang.String jdbcTestStmt)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Pool(ConnectionManager cmgr, XADataSourceImpl xads) throws java.lang.Exception
xads
- XA DataSource implementation created by this pool's Connection manager. Allows
for getting XA Connections.cmgr
- the pool's Connection manager has to be registered as ConnectionEventListener of the XA connections
created at the pool creationMethod Detail |
protected int setConnCheckLevel(int jdbcConnCheckLevel)
protected long setConnMaxAge(long jdbcConnMaxAge)
jdbcConnMaxAge
- max age of connection in minutesprotected java.lang.String setTestStatement(java.lang.String jdbcTestStmt)
protected int setMinConnPool(int minConPool) throws ServiceException
ServiceException
protected int setMaxConnPool(int maxConPool)
protected int getMaxConnPool()
protected int getMinConnPool()
public PoolItem openConnection(java.lang.String user, javax.transaction.Transaction tx) throws java.sql.SQLException
user
- user nametx
- Transaction the connection is involved
java.sql.SQLException
public PoolItem newConnection(java.lang.String user, javax.transaction.Transaction tx) throws java.sql.SQLException
user
- user nametx
- Transaction the connection is involved
java.sql.SQLException
public void freeConnections(javax.transaction.Transaction tx)
tx
- the non null transactionpublic PoolItem closeConnection(javax.sql.XAConnection xac, int flag)
public void check4MaxAge()
public void closeAllConnections()
public int getCurrentNumberOfXAConnection()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |