|
||||||||||
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
Constructor Summary | |
Pool(ConnectionManager cmgr,
XADataSourceImpl xads)
Pool constructor |
Method Summary | |
void |
adjust()
Adjust the pool size, according to poolMax and poolMin values. |
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 |
getBusyMaxRecent()
|
int |
getBusyMinRecent()
|
int |
getCheckLevel()
|
int |
getConnectionFailures()
|
int |
getConnectionLeaks()
|
int |
getCurrentBusy()
|
int |
getCurrentInTx()
|
int |
getCurrentOpened()
|
int |
getCurrentWaiters()
|
int |
getMaxAge()
|
long |
getMaxAgeMilli()
|
int |
getMaxOpenTime()
|
long |
getMaxOpenTimeMilli()
|
int |
getMaxWaiters()
|
int |
getMaxWaitTime()
|
int |
getOpenedCount()
|
int |
getPoolMax()
|
int |
getPoolMin()
|
int |
getRejectedFull()
|
int |
getRejectedOpen()
|
int |
getRejectedOther()
|
int |
getRejectedTimeout()
|
int |
getSamplingPeriod()
|
int |
getServedOpen()
|
java.lang.String |
getTestStatement()
|
int |
getWaiterCount()
|
int |
getWaitersHigh()
|
int |
getWaitersHighRecent()
|
long |
getWaitingHigh()
|
long |
getWaitingHighRecent()
|
long |
getWaitingTime()
|
PoolItem |
openConnection(java.lang.String user,
javax.transaction.Transaction tx)
lookup connection in the pool for this user/tx |
void |
recomputeBusy()
compute current min/max busyConnections |
void |
sampling()
make samples with some monitoring values |
void |
setCheckLevel(int level)
|
void |
setMaxAge(int mn)
|
void |
setMaxOpenTime(int mn)
|
void |
setMaxWaiters(int nb)
|
void |
setMaxWaitTime(int sec)
|
void |
setPoolMax(int max)
|
void |
setPoolMin(int min)
|
void |
setSamplingPeriod(int sec)
|
void |
setTestStatement(java.lang.String s)
|
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 creation
java.lang.Exception
- The pool could not be initializedMethod Detail |
public int getPoolMin()
public void setPoolMin(int min)
min
- minimum connection pool size to be set.public int getPoolMax()
public void setPoolMax(int max)
max
- max pool size. -1 means "no limit".public int getMaxAge()
public long getMaxAgeMilli()
public void setMaxAge(int mn)
mn
- max age of connection in minutespublic int getMaxOpenTime()
public long getMaxOpenTimeMilli()
public void setMaxOpenTime(int mn)
mn
- max time of open connection in minutespublic int getMaxWaitTime()
public void setMaxWaitTime(int sec)
sec
- max time to wait for a connection, in secondspublic int getMaxWaiters()
public void setMaxWaiters(int nb)
nb
- max nb of waiterspublic int getSamplingPeriod()
public void setSamplingPeriod(int sec)
sec
- sampling period in sec.public int getCheckLevel()
public void setCheckLevel(int level)
level
- jdbc connection checking level (0, 1, or 2)public java.lang.String getTestStatement()
public void setTestStatement(java.lang.String s)
s
- test statementpublic int getBusyMaxRecent()
public int getBusyMinRecent()
public int getCurrentWaiters()
public int getOpenedCount()
public int getConnectionFailures()
public int getConnectionLeaks()
public int getServedOpen()
public int getRejectedFull()
public int getRejectedTimeout()
public int getRejectedOther()
public int getRejectedOpen()
public int getWaitersHigh()
public int getWaitersHighRecent()
public int getWaiterCount()
public long getWaitingTime()
public long getWaitingHigh()
public long getWaitingHighRecent()
public int getCurrentOpened()
public int getCurrentBusy()
public void recomputeBusy()
public int getCurrentInTx()
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
- Cannot open a connection because the pool's max size is reachedpublic void freeConnections(javax.transaction.Transaction tx)
tx
- the non null transactionpublic PoolItem closeConnection(javax.sql.XAConnection xac, int flag)
xac
- XAConnection being closedflag
- TMSUCCESS (normal close) or TMFAIL (error)
public void sampling()
public void adjust()
public void closeAllConnections()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |