|
||||||||||
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 final 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(PropertyMgr props,
java.lang.String prefix,
int size)
Constructs a new connection pool with the specified size. |
|
PooledConnectionMgr(java.lang.String jdbc_url,
java.lang.String jdbc_driver,
java.lang.String jdbc_user,
java.lang.String jdbc_password,
java.lang.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. |
|
PooledConnectionMgr(SystemLog log,
PropertyMgr props,
java.lang.String prefix,
int size)
Constructs a new connection pool with the specified size. |
Method Summary | |
---|---|
java.util.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. |
java.util.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(java.lang.String[] args)
|
void |
setDebugCheckout(boolean dbg)
Helps to debug connection checkouts. |
java.lang.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(java.lang.String jdbc_url, java.lang.String jdbc_driver, java.lang.String jdbc_user, java.lang.String jdbc_password, java.lang.String jdbc_catalog, int size) throws java.lang.Exception
ConnectionMgr
java.lang.Exception
public PooledConnectionMgr(PropertyMgr props, int size) throws java.lang.Exception
java.lang.Exception
public PooledConnectionMgr(PropertyMgr props, java.lang.String prefix, int size) throws java.lang.Exception
java.lang.Exception
public PooledConnectionMgr(SystemLog log, PropertyMgr props, int size) throws java.lang.Exception
java.lang.Exception
public PooledConnectionMgr(SystemLog log, PropertyMgr props, java.lang.String prefix, int size) throws java.lang.Exception
java.lang.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 java.util.Iterator getCheckoutInfo()
setDebugCheckout(boolean)
has first been invoked with
true.
public java.util.List getHungTransactions(long milliseconds)
public java.lang.String toString()
toString
in class ConnectionMgr
public static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |