public class RDBConnectionManager extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
DBCP_CONNECTIONINITSQLS
NOTE: Versions 1.3 and 1.4 of DBCP incorrectly use "initConnectionSqls" as
the name of this property for JNDI object factory configuration.
|
static String |
DBCP_DEFAULTAUTOCOMMIT
Default: true The default auto-commit state of connections created by this
pool.
|
static String |
DBCP_DEFAULTCATALOG
Default: The default catalog of connections created by this pool.
|
static String |
DBCP_DEFAULTREADONLY
Default: driver default The default read-only state of connections created
by this pool.
|
static String |
DBCP_DEFAULTTRANSACTIONISOLATION
Default: driver default The default TransactionIsolation state of
connections created by this pool.
|
static String |
DBCP_INITIALSIZE
Default: 0 The initial number of connections that are created when the pool
is started.
|
static String |
DBCP_LOGABANDONED
Default: false Flag to log stack traces for application code which
abandoned a Statement or Connection.
|
static String |
DBCP_MAXACTIVE
Default: 8 The maximum number of active connections that can be allocated
from this pool at the same time, or negative for no limit.
|
static String |
DBCP_MAXIDLE
Default: 8 The maximum number of connections that can remain idle in the
pool, without extra ones being released, or negative for no limit.
|
static String |
DBCP_MAXWAIT
Default: indefinitely The maximum number of milliseconds that the pool will
wait (when there are no available connections) for a connection to be
returned before throwing an exception, or -1 to wait indefinitely.
|
static String |
DBCP_MINEVICTABLEIDLETIMEMILLIS
Default: 1000 * 60 * 30 The minimum amount of time an object may sit idle
in the pool before it is eligable for eviction by the idle object evictor
(if any).
|
static String |
DBCP_MINIDLE
Default: 0 The minimum number of connections that can remain idle in the
pool, without extra ones being created, or zero to create none.
|
static String |
DBCP_NUMTESTSPEREVICTIONRUN
Default: 3 The number of objects to examine during each run of the idle
object evictor thread (if any).
|
static String |
DBCP_REMOVEABANDONED
Default: false Flag to remove abandoned connections if they exceed the
removeAbandonedTimout.
|
static String |
DBCP_REMOVEABANDONEDTIMEOUT
Default: 300 Timeout in seconds before an abandoned connection can be
removed.
|
static String |
DBCP_TESTONBORROW
Default: true The indication of whether objects will be validated before
being borrowed from the pool.
|
static String |
DBCP_TESTONRETURN
Default: false The indication of whether objects will be validated before
being returned to the pool.
|
static String |
DBCP_TESTWHILEIDLE
Default: false The indication of whether objects will be validated by the
idle object evictor (if any).
|
static String |
DBCP_TIMEBETWEENEVICTIONRUNSMILLIS
Default: -1 The number of milliseconds to sleep between runs of the idle
object evictor thread.
|
static String |
DBCP_VALIDATIONQUERY
The SQL query that will be used to validate connections from this pool
before returning them to the caller.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
finalize() |
Connection |
getConnection() |
int |
getNumLockedProcesses()
getNumLockedProcesses - gets the number of currently locked processes on
the MySQL db
|
static RDBConnectionManager |
instance() |
static void |
printDriverStats() |
public static final String DBCP_DEFAULTAUTOCOMMIT
public static final String DBCP_DEFAULTREADONLY
public static final String DBCP_DEFAULTTRANSACTIONISOLATION
public static final String DBCP_DEFAULTCATALOG
public static final String DBCP_INITIALSIZE
public static final String DBCP_MAXACTIVE
public static final String DBCP_MAXIDLE
public static final String DBCP_MINIDLE
public static final String DBCP_MAXWAIT
public static final String DBCP_VALIDATIONQUERY
public static final String DBCP_TESTONBORROW
public static final String DBCP_TESTONRETURN
public static final String DBCP_TESTWHILEIDLE
public static final String DBCP_TIMEBETWEENEVICTIONRUNSMILLIS
public static final String DBCP_NUMTESTSPEREVICTIONRUN
public static final String DBCP_MINEVICTABLEIDLETIMEMILLIS
public static final String DBCP_CONNECTIONINITSQLS
public static final String DBCP_REMOVEABANDONED
public static final String DBCP_REMOVEABANDONEDTIMEOUT
public static final String DBCP_LOGABANDONED
public static RDBConnectionManager instance()
public Connection getConnection() throws SQLException
SQLExceptionpublic int getNumLockedProcesses()
Copyright © 2018. All rights reserved.