|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfc.jdbc.ConnectionMgr
fc.jdbc.PooledConnectionMgr
public class PooledConnectionMgr
A pooled connection manager. Connections must be closed when done with, which automatically returns them back to the pool.
| Field Summary | |
|---|---|
static long |
ConnectionTimeoutWarning
If a connection cannot be obtained within this time, then a warning will be logged. |
static int |
defaultSize
|
| Constructor Summary | |
|---|---|
PooledConnectionMgr(PropertyMgr props,
int size)
Constructs a new connection pool with the specified size. |
|
PooledConnectionMgr(String jdbc_url,
String jdbc_driver,
String jdbc_user,
String jdbc_password,
String jdbc_catalog,
int size)
Constructs a new connection pool with the specified size. |
|
PooledConnectionMgr(SystemLog log,
PropertyMgr props,
int size)
Constructs a new connection pool with the specified size. |
|
| Method Summary | |
|---|---|
Iterator |
getCheckoutInfo()
Returns a iterator over a collection of Exception objects, each containing a stack trace for code that has currently checked out a connection from this pool. |
List |
getHungTransactions(long milliseconds)
Gets a list of connections in the pool such that each connection has a transaction that was started more than the specified milliseconds ago but has not yet been aborted or commited (this is a good way to see if there is a transaction leak somewhere). |
static void |
main(String[] args)
|
void |
setDebugCheckout(boolean dbg)
Helps to debug connection checkouts. |
String |
toString()
|
| Methods inherited from class fc.jdbc.ConnectionMgr |
|---|
close, getConnection, getDBName, getDriver, getURL, setCatalog |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int defaultSize
public static final long ConnectionTimeoutWarning
| Constructor Detail |
|---|
public PooledConnectionMgr(String jdbc_url,
String jdbc_driver,
String jdbc_user,
String jdbc_password,
String jdbc_catalog,
int size)
throws Exception
ConnectionMgr
Exception
public PooledConnectionMgr(PropertyMgr props,
int size)
throws Exception
Exception
public PooledConnectionMgr(SystemLog log,
PropertyMgr props,
int size)
throws Exception
Exception| Method Detail |
|---|
public void setDebugCheckout(boolean dbg)
dbg - true to enable tracking of checked out
connections from this pool. false
stops tracking and clears any existing tracking
info.public Iterator getCheckoutInfo()
setDebugCheckout(boolean) has first been invoked with
true.
public List getHungTransactions(long milliseconds)
public String toString()
toString in class ConnectionMgr
public static void main(String[] args)
throws Exception
Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||