|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.opencms.db.CmsDbPool
public final class CmsDbPool
Various methods to create DBCP pools.
Only JDBC Driver based pools are supported currently. JNDI DataSource based pools might be added probably later.
Please note: This class is subject to change in later versions.
To obtain information about the connections, please use the
CmsSqlManager.
| Field Summary | |
|---|---|
static String |
DBCP_JDBC_URL_PREFIX
This prefix is required to make the JDBC DriverManager return pooled DBCP connections. |
static String |
KEY_DATABASE
Prefix for database keys. |
static String |
KEY_DATABASE_NAME
Key for the database name. |
static String |
KEY_DATABASE_POOL
Key for the pool id. |
static String |
KEY_DATABASE_STATEMENTS
Key for statement pooling. |
static String |
KEY_JDBC_DRIVER
Key for jdbc driver. |
static String |
KEY_JDBC_URL
Key for jdbc url. |
static String |
KEY_JDBC_URL_PARAMS
Key for jdbc url params. |
static String |
KEY_MAX_ACTIVE
Key for maximum active connections. |
static String |
KEY_MAX_IDLE
Key for maximum idle connections. |
static String |
KEY_MAX_WAIT
Key for maximum wait time. |
static String |
KEY_PASSWORD
Key for database password. |
static String |
KEY_POOL_DEFAULT
Key for default. |
static String |
KEY_POOL_URL
Key for pool url. |
static String |
KEY_POOL_USER
Key for pool user. |
static String |
KEY_POOL_VFS
Key for vfs pool. |
static String |
KEY_POOLING
Key for pooling flag. |
static String |
KEY_TEST_ON_BORROW
Key for test on borrow flag. |
static String |
KEY_TEST_QUERY
Key for test query. |
static String |
KEY_USERNAME
Key for user name. |
static String |
KEY_WHEN_EXHAUSTED_ACTION
Key for "when pool exhausted" action. |
static String |
OPENCMS_DEFAULT_POOL_NAME
The name of the opencms default pool. |
static String |
OPENCMS_DEFAULT_POOL_URL
The default OpenCms JDBC pool URL. |
static String |
OPENCMS_URL_PREFIX
The prefix used for opencms JDBC pools. |
| Method Summary | |
|---|---|
static PoolingDriver |
createDriverManagerConnectionPool(Map configuration,
String key)
Creates a JDBC DriverManager based DBCP connection pool. |
static String |
getDbPoolName(Map configuration,
String key)
Returns the database pool name for a given configuration key. |
static List |
getDbPoolNames(Map configuration)
Returns a list of available database pool names. |
static String |
getDefaultDbPoolName()
Returns the name of the default database connection pool. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String DBCP_JDBC_URL_PREFIX
public static final String KEY_DATABASE
public static final String KEY_DATABASE_NAME
public static final String KEY_DATABASE_POOL
public static final String KEY_DATABASE_STATEMENTS
public static final String KEY_JDBC_DRIVER
public static final String KEY_JDBC_URL
public static final String KEY_JDBC_URL_PARAMS
public static final String KEY_MAX_ACTIVE
public static final String KEY_MAX_IDLE
public static final String KEY_MAX_WAIT
public static final String KEY_PASSWORD
public static final String KEY_POOL_DEFAULT
public static final String KEY_POOL_URL
public static final String KEY_POOL_USER
public static final String KEY_POOL_VFS
public static final String KEY_POOLING
public static final String KEY_TEST_ON_BORROW
public static final String KEY_TEST_QUERY
public static final String KEY_USERNAME
public static final String KEY_WHEN_EXHAUSTED_ACTION
public static final String OPENCMS_DEFAULT_POOL_NAME
public static final String OPENCMS_DEFAULT_POOL_URL
public static final String OPENCMS_URL_PREFIX
| Method Detail |
|---|
public static PoolingDriver createDriverManagerConnectionPool(Map configuration,
String key)
throws Exception
configuration - the configuration (opencms.properties)key - the key of the database pool in the configuration
Exception - if the pool could not be initialized
public static String getDbPoolName(Map configuration,
String key)
configuration - the configurationkey - a db pool configuration key
public static List getDbPoolNames(Map configuration)
configuration - the configuration
public static String getDefaultDbPoolName()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||