|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.mchange.v2.c3p0.PoolBackedDataSourceFactory
DataSources
. See examples.
public final class PoolBackedDataSourceFactory
A class offering Factory methods for creating DataSources backed by Connection and Statement Pools.
Method Summary | |
---|---|
static javax.sql.DataSource |
create(javax.sql.DataSource unpooledDataSource)
Deprecated. Creates a pool-backed DataSource using unpooledDataSource as its source for Connections and default values for pool params. |
static javax.sql.DataSource |
create(javax.sql.DataSource unpooledDataSource,
int minPoolSize,
int maxPoolSize,
int acquireIncrement,
int maxIdleTime,
int maxStatements)
Deprecated. Creates a pool-backed DataSource using unpooledDataSource as its source for Connections. |
static javax.sql.DataSource |
create(javax.sql.DataSource unpooledDataSource,
int minPoolSize,
int maxPoolSize,
int acquireIncrement,
int maxIdleTime,
int maxStatements,
java.lang.String factoryLocation)
Deprecated. Creates a pool-backed DataSource using unpooledDataSource as its source for Connections. |
static javax.sql.DataSource |
create(java.lang.String jdbcUrl,
java.lang.String user,
java.lang.String password)
Deprecated. Creates a pool-backed DataSource using default pool parameters. |
static javax.sql.DataSource |
create(java.lang.String jdbcUrl,
java.lang.String user,
java.lang.String password,
int minPoolSize,
int maxPoolSize,
int acquireIncrement,
int maxIdleTime,
int maxStatements)
Deprecated. Creates a pool-backed DataSource. |
static javax.sql.DataSource |
create(java.lang.String jdbcUrl,
java.lang.String user,
java.lang.String password,
int minPoolSize,
int maxPoolSize,
int acquireIncrement,
int maxIdleTime,
int maxStatements,
java.lang.String factoryLocation)
Deprecated. Creates a pool-backed DataSource. |
static javax.sql.DataSource |
create(java.lang.String jdbcDriverClass,
java.lang.String jdbcUrl,
java.lang.String user,
java.lang.String password)
Deprecated. Creates a pool-backed DataSource using default values for pool parameters. |
static javax.sql.DataSource |
create(java.lang.String jdbcDriverClass,
java.lang.String jdbcUrl,
java.lang.String user,
java.lang.String password,
int minPoolSize,
int maxPoolSize,
int acquireIncrement,
int maxIdleTime,
int maxStatements)
Deprecated. Creates a pool-backed DataSource. |
static javax.sql.DataSource |
create(java.lang.String jdbcDriverClass,
java.lang.String jdbcUrl,
java.lang.String user,
java.lang.String password,
int minPoolSize,
int maxPoolSize,
int acquireIncrement,
int maxIdleTime,
int maxStatements,
java.lang.String factoryLocation)
Deprecated. Creates a pool-backed DataSource. |
static javax.sql.DataSource |
createReferenceable(javax.sql.DataSource unpooledDataSource,
int minPoolSize,
int maxPoolSize,
int acquireIncrement,
int maxIdleTime,
int maxStatements,
java.lang.String factoryLocation)
Deprecated. all implementations are now both Referenceable and Serializable. use create() |
static javax.sql.DataSource |
createReferenceable(javax.sql.DataSource unpooledDataSource,
java.lang.String factoryLocation)
Deprecated. all implementations are now both Referenceable and Serializable. use create() |
static javax.sql.DataSource |
createReferenceable(java.lang.String jdbcDriverClass,
java.lang.String jdbcUrl,
java.lang.String user,
java.lang.String password,
int minPoolSize,
int maxPoolSize,
int acquireIncrement,
int maxIdleTime,
int maxStatements,
java.lang.String factoryLocation)
Deprecated. all implementations are now both Referenceable and Serializable. use create() |
static javax.sql.DataSource |
createReferenceable(java.lang.String jdbcDriverClass,
java.lang.String jdbcUrl,
java.lang.String user,
java.lang.String password,
java.lang.String factoryLocation)
Deprecated. all implementations are now both Referenceable and Serializable. use create() |
static javax.sql.DataSource |
createSerializable(javax.sql.DataSource unpooledDataSource)
Deprecated. all implementations are now both Referenceable and Serializable. use create() |
static javax.sql.DataSource |
createSerializable(javax.sql.DataSource unpooledDataSource,
int minPoolSize,
int maxPoolSize,
int acquireIncrement,
int maxIdleTime,
int maxStatements)
Deprecated. all implementations are now both Referenceable and Serializable. use create() |
static javax.sql.DataSource |
createSerializable(java.lang.String jdbcDriverClass,
java.lang.String jdbcUrl,
java.lang.String user,
java.lang.String password)
Deprecated. all implementations are now both Referenceable and Serializable. use create() |
static javax.sql.DataSource |
createSerializable(java.lang.String jdbcDriverClass,
java.lang.String jdbcUrl,
java.lang.String user,
java.lang.String password,
int minPoolSize,
int maxPoolSize,
int acquireIncrement,
int maxIdleTime,
int maxStatements)
Deprecated. all implementations are now both Referenceable and Serializable. use create() |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static javax.sql.DataSource createReferenceable(javax.sql.DataSource unpooledDataSource, int minPoolSize, int maxPoolSize, int acquireIncrement, int maxIdleTime, int maxStatements, java.lang.String factoryLocation) throws java.sql.SQLException
unpooledDataSource
- an unpooledDataSource to use as the
primary source for connections.minPoolSize
- the minimum (and starting) number of Connections
that should be held in the pool.maxPoolSize
- the maximum number of Connections
that should be held in the pool.acquireIncrement
- the number of Connections that should be
acquired at a time when the pool runs out of ConnectionsmaxIdleTime
- the maximum number of seconds a Connection should be
allowed to remain idle before it is expired from the pool.
A value of 0 means Connections never expire.maxStatements
- the maximum number of PreparedStatements that should
be cached by this pool. A value of 0 means that Statement caching
should be disabled.factoryLocation
- a codebase url where JNDI clients can find the
c3p0 libraries. Use null if clients will be expected to have the
libraries available locally.
java.sql.SQLException
public static javax.sql.DataSource createReferenceable(javax.sql.DataSource unpooledDataSource, java.lang.String factoryLocation) throws java.sql.SQLException
unpooledDataSource
- an unpooledDataSource to use as the
primary source for connections.factoryLocation
- a codebase url where JNDI clients can find the
c3p0 libraries. Use null if clients will be expected to have the
libraries available locally.
java.sql.SQLException
public static javax.sql.DataSource createReferenceable(java.lang.String jdbcDriverClass, java.lang.String jdbcUrl, java.lang.String user, java.lang.String password, int minPoolSize, int maxPoolSize, int acquireIncrement, int maxIdleTime, int maxStatements, java.lang.String factoryLocation) throws java.sql.SQLException
jdbcDriverClass
- a jdbc driver class that can resolve jdbcUrl.jdbcUrl
- the jdbcUrl of the RDBMS that Connections should be made to.user
- a username (may be null) for authentication to the RDBMSpassword
- a password (may be null) for authentication to the RDBMSminPoolSize
- the minimum (and starting) number of Connections
that should be held in the pool.maxPoolSize
- the maximum number of Connections
that should be held in the pool.acquireIncrement
- the number of Connections that should be
acquired at a time when the pool runs out of ConnectionsmaxIdleTime
- the maximum number of seconds a Connection should be
allowed to remain idle before it is expired from the pool.
A value of 0 means Connections never expire.maxStatements
- the maximum number of PreparedStatements that should
be cached by this pool. A value of 0 means that Statement caching
should be disabled.factoryLocation
- a codebase url where JNDI clients can find the
c3p0 libraries. Use null if clients will be expected to have the
libraries available locally.
java.sql.SQLException
public static javax.sql.DataSource createReferenceable(java.lang.String jdbcDriverClass, java.lang.String jdbcUrl, java.lang.String user, java.lang.String password, java.lang.String factoryLocation) throws java.sql.SQLException
jdbcDriverClass
- a jdbc driver class that can resolve jdbcUrl.jdbcUrl
- the jdbcUrl of the RDBMS that Connections should be made to.user
- a username (may be null) for authentication to the RDBMSpassword
- a password (may be null) for authentication to the RDBMSfactoryLocation
- a codebase url where JNDI clients can find the
c3p0 libraries. Use null if clients will be expected to have the
libraries available locally.
java.sql.SQLException
public static javax.sql.DataSource createSerializable(javax.sql.DataSource unpooledDataSource, int minPoolSize, int maxPoolSize, int acquireIncrement, int maxIdleTime, int maxStatements) throws java.sql.SQLException
unpooledDataSource
- an unpooledDataSource to use as the
primary source for connections.minPoolSize
- the minimum (and starting) number of Connections
that should be held in the pool.maxPoolSize
- the maximum number of Connections
that should be held in the pool.acquireIncrement
- the number of Connections that should be
acquired at a time when the pool runs out of ConnectionsmaxIdleTime
- the maximum number of seconds a Connection should be
allowed to remain idle before it is expired from the pool.
A value of 0 means Connections never expire.maxStatements
- the maximum number of PreparedStatements that should
be cached by this pool. A value of 0 means that Statement caching
should be disabled.
java.sql.SQLException
public static javax.sql.DataSource createSerializable(javax.sql.DataSource unpooledDataSource) throws java.sql.SQLException
unpooledDataSource
- an unpooledDataSource to use as the
primary source for connections.
java.sql.SQLException
public static javax.sql.DataSource createSerializable(java.lang.String jdbcDriverClass, java.lang.String jdbcUrl, java.lang.String user, java.lang.String password, int minPoolSize, int maxPoolSize, int acquireIncrement, int maxIdleTime, int maxStatements) throws java.sql.SQLException
jdbcDriverClass
- a jdbc driver class that can resolve jdbcUrl.jdbcUrl
- the jdbcUrl of the RDBMS that Connections should be made to.user
- a username (may be null) for authentication to the RDBMSpassword
- a password (may be null) for authentication to the RDBMSminPoolSize
- the minimum (and starting) number of Connections
that should be held in the pool.maxPoolSize
- the maximum number of Connections
that should be held in the pool.acquireIncrement
- the number of Connections that should be
acquired at a time when the pool runs out of ConnectionsmaxIdleTime
- the maximum number of seconds a Connection should be
allowed to remain idle before it is expired from the pool.
A value of 0 means Connections never expire.maxStatements
- the maximum number of PreparedStatements that should
be cached by this pool. A value of 0 means that Statement caching
should be disabled.
java.sql.SQLException
public static javax.sql.DataSource createSerializable(java.lang.String jdbcDriverClass, java.lang.String jdbcUrl, java.lang.String user, java.lang.String password) throws java.sql.SQLException
jdbcDriverClass
- a jdbc driver class that can resolve jdbcUrl.jdbcUrl
- the jdbcUrl of the RDBMS that Connections should be made to.user
- a username (may be null) for authentication to the RDBMSpassword
- a password (may be null) for authentication to the RDBMS
java.sql.SQLException
public static javax.sql.DataSource create(javax.sql.DataSource unpooledDataSource, int minPoolSize, int maxPoolSize, int acquireIncrement, int maxIdleTime, int maxStatements, java.lang.String factoryLocation) throws java.sql.SQLException
unpooledDataSource
- an unpooledDataSource to use as the
primary source for connections.minPoolSize
- the minimum (and starting) number of Connections
that should be held in the pool.maxPoolSize
- the maximum number of Connections
that should be held in the pool.acquireIncrement
- the number of Connections that should be
acquired at a time when the pool runs out of ConnectionsmaxIdleTime
- the maximum number of seconds a Connection should be
allowed to remain idle before it is expired from the pool.
A value of 0 means Connections never expire.maxStatements
- the maximum number of PreparedStatements that should
be cached by this pool. A value of 0 means that Statement caching
should be disabled.factoryLocation
- a codebase url where JNDI clients can find the
c3p0 libraries. Use null if clients will be expected to have the
libraries available locally. Used only if the JNDI service prefers
References to Serialized Objects when Objects are bound.
java.sql.SQLException
public static javax.sql.DataSource create(javax.sql.DataSource unpooledDataSource, int minPoolSize, int maxPoolSize, int acquireIncrement, int maxIdleTime, int maxStatements) throws java.sql.SQLException
unpooledDataSource
- an unpooledDataSource to use as the
primary source for connections.minPoolSize
- the minimum (and starting) number of Connections
that should be held in the pool.maxPoolSize
- the maximum number of Connections
that should be held in the pool.acquireIncrement
- the number of Connections that should be
acquired at a time when the pool runs out of ConnectionsmaxIdleTime
- the maximum number of seconds a Connection should be
allowed to remain idle before it is expired from the pool.
A value of 0 means Connections never expire.maxStatements
- the maximum number of PreparedStatements that should
be cached by this pool. A value of 0 means that Statement caching
should be disabled.
java.sql.SQLException
public static javax.sql.DataSource create(javax.sql.DataSource unpooledDataSource) throws java.sql.SQLException
unpooledDataSource
- an unpooledDataSource to use as the
primary source for connections.
java.sql.SQLException
public static javax.sql.DataSource create(java.lang.String jdbcDriverClass, java.lang.String jdbcUrl, java.lang.String user, java.lang.String password, int minPoolSize, int maxPoolSize, int acquireIncrement, int maxIdleTime, int maxStatements, java.lang.String factoryLocation) throws java.sql.SQLException
jdbcDriverClass
- a jdbc driver class that can resolve jdbcUrl.jdbcUrl
- the jdbcUrl of the RDBMS that Connections should be made to.user
- a username (may be null) for authentication to the RDBMSpassword
- a password (may be null) for authentication to the RDBMSminPoolSize
- the minimum (and starting) number of Connections
that should be held in the pool.maxPoolSize
- the maximum number of Connections
that should be held in the pool.acquireIncrement
- the number of Connections that should be
acquired at a time when the pool runs out of ConnectionsmaxIdleTime
- the maximum number of seconds a Connection should be
allowed to remain idle before it is expired from the pool.
A value of 0 means Connections never expire.maxStatements
- the maximum number of PreparedStatements that should
be cached by this pool. A value of 0 means that Statement caching
should be disabled.factoryLocation
- a codebase url where JNDI clients can find the
c3p0 libraries. Use null if clients will be expected to have the
libraries available locally. Used only if the JNDI service prefers
References to Serialized Objects when Objects are bound.
java.sql.SQLException
public static javax.sql.DataSource create(java.lang.String jdbcDriverClass, java.lang.String jdbcUrl, java.lang.String user, java.lang.String password, int minPoolSize, int maxPoolSize, int acquireIncrement, int maxIdleTime, int maxStatements) throws java.sql.SQLException
jdbcDriverClass
- a jdbc driver class that can resolve jdbcUrl.jdbcUrl
- the jdbcUrl of the RDBMS that Connections should be made to.user
- a username (may be null) for authentication to the RDBMSpassword
- a password (may be null) for authentication to the RDBMSminPoolSize
- the minimum (and starting) number of Connections
that should be held in the pool.maxPoolSize
- the maximum number of Connections
that should be held in the pool.acquireIncrement
- the number of Connections that should be
acquired at a time when the pool runs out of ConnectionsmaxIdleTime
- the maximum number of seconds a Connection should be
allowed to remain idle before it is expired from the pool.
A value of 0 means Connections never expire.maxStatements
- the maximum number of PreparedStatements that should
be cached by this pool. A value of 0 means that Statement caching
should be disabled.
java.sql.SQLException
public static javax.sql.DataSource create(java.lang.String jdbcUrl, java.lang.String user, java.lang.String password, int minPoolSize, int maxPoolSize, int acquireIncrement, int maxIdleTime, int maxStatements, java.lang.String factoryLocation) throws java.sql.SQLException
Warning: If you use this method, you must make sure a JDBC driver capable of resolving jdbcUrl has been preloaded!
jdbcUrl
- the jdbcUrl of the RDBMS that Connections should be made to.user
- a username (may be null) for authentication to the RDBMSpassword
- a password (may be null) for authentication to the RDBMSminPoolSize
- the minimum (and starting) number of Connections
that should be held in the pool.maxPoolSize
- the maximum number of Connections
that should be held in the pool.acquireIncrement
- the number of Connections that should be
acquired at a time when the pool runs out of ConnectionsmaxIdleTime
- the maximum number of seconds a Connection should be
allowed to remain idle before it is expired from the pool.
A value of 0 means Connections never expire.maxStatements
- the maximum number of PreparedStatements that should
be cached by this pool. A value of 0 means that Statement caching
should be disabled.factoryLocation
- a codebase url where JNDI clients can find the
c3p0 libraries. Use null if clients will be expected to have the
libraries available locally. Used only if the JNDI service prefers
References to Serialized Objects when Objects are bound.
java.sql.SQLException
public static javax.sql.DataSource create(java.lang.String jdbcUrl, java.lang.String user, java.lang.String password, int minPoolSize, int maxPoolSize, int acquireIncrement, int maxIdleTime, int maxStatements) throws java.sql.SQLException
Warning: If you use this method, you must make sure a JDBC driver capable of resolving jdbcUrl has been preloaded!
jdbcUrl
- the jdbcUrl of the RDBMS that Connections should be made to.user
- a username (may be null) for authentication to the RDBMSpassword
- a password (may be null) for authentication to the RDBMSminPoolSize
- the minimum (and starting) number of Connections
that should be held in the pool.maxPoolSize
- the maximum number of Connections
that should be held in the pool.acquireIncrement
- the number of Connections that should be
acquired at a time when the pool runs out of ConnectionsmaxIdleTime
- the maximum number of seconds a Connection should be
allowed to remain idle before it is expired from the pool.
A value of 0 means Connections never expire.maxStatements
- the maximum number of PreparedStatements that should
be cached by this pool. A value of 0 means that Statement caching
should be disabled.
java.sql.SQLException
public static javax.sql.DataSource create(java.lang.String jdbcDriverClass, java.lang.String jdbcUrl, java.lang.String user, java.lang.String password) throws java.sql.SQLException
jdbcDriverClass
- a jdbc driver class that can resolve jdbcUrl.jdbcUrl
- the jdbcUrl of the RDBMS that Connections should be made to.user
- a username (may be null) for authentication to the RDBMSpassword
- a password (may be null) for authentication to the RDBMS
java.sql.SQLException
public static javax.sql.DataSource create(java.lang.String jdbcUrl, java.lang.String user, java.lang.String password) throws java.sql.SQLException
Warning: If you use this method, you must make sure a JDBC driver capable of resolving jdbcUrl has been preloaded!
jdbcUrl
- the jdbcUrl of the RDBMS that Connections should be made to.user
- a username (may be null) for authentication to the RDBMSpassword
- a password (may be null) for authentication to the RDBMS
java.sql.SQLException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |