@ComponentProfile(summary="Connect to a database using a JDBC driver; connection pooling handled via C3P0", tag="connections,jdbc") public class JdbcPooledConnection extends JdbcPooledConnectionImpl
DatabaseConnection
instance that provides connection pooling via c3p0.Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_ACQUIRE_INCREMENT |
static int |
DEFAULT_MAXIMUM_POOL_SIZE |
static int |
DEFAULT_MINIMUM_POOL_SIZE |
connectionPool
log
Constructor and Description |
---|
JdbcPooledConnection() |
Modifier and Type | Method and Description |
---|---|
protected PooledDataSource |
createPool() |
int |
currentBusyConnectionCount() |
int |
currentConnectionCount() |
int |
currentIdleConnectionCount() |
boolean |
equals(java.lang.Object o)
Force implementations to over-ride equals with a semantic implementation.
|
java.lang.Integer |
getAcquireIncrement() |
TimeInterval |
getConnectionAcquireWait() |
TimeInterval |
getIdleConnectionTestPeriod() |
TimeInterval |
getMaxIdleTime() |
java.lang.Integer |
getMaximumPoolSize() |
java.lang.Integer |
getMinimumPoolSize() |
JdbcPoolFactory |
getPoolFactory() |
int |
hashCode()
Force implementations to over-ride hashcode.
|
int |
maxPoolSize() |
int |
minPoolSize() |
void |
setAcquireIncrement(java.lang.Integer acquireIncrement) |
void |
setConnectionAcquireWait(TimeInterval connectionAcquireWait) |
void |
setIdleConnectionTestPeriod(TimeInterval idleConnectionTestPeriod) |
void |
setMaxIdleTime(TimeInterval t) |
void |
setMaximumPoolSize(java.lang.Integer maximumPoolSize) |
void |
setMinimumPoolSize(java.lang.Integer minimumPoolSize) |
void |
setPoolFactory(JdbcPoolFactory f) |
asDataSource, closeDatabaseConnection, getConnectionName, getConnectUrl, initialiseDatabaseConnection, makeConnection, setConnectUrl, startDatabaseConnection, stopDatabaseConnection
alwaysValidateConnection, autoCommit, checkInternalState, closeConnection, connect, connectionProperties, debugMode, getAlwaysValidateConnection, getAutoCommit, getConnectionProperties, getDebugMode, getDriverImp, getPassword, getTestStatement, getUsername, initConnection, prepareConnection, setAlwaysValidateConnection, setAutoCommit, setConnectionProperties, setDebugMode, setDriverImp, setPassword, setTestStatement, setUsername, startConnection, stopConnection
connectionAttempts, connectionRetryInterval, createLoggingStatement, getConnectionAttempts, getConnectionRetryInterval, logWarning, setConnectionAttempts, setConnectionRetryInterval
addExceptionListener, addMessageConsumer, addMessageProducer, changeState, cloneForTesting, close, connectionErrorHandler, getConnectionErrorHandler, getUniqueId, getWorkersFirstOnShutdown, init, prepare, requestClose, requestInit, requestStart, requestStop, retrieveComponentState, retrieveConnection, retrieveExceptionListeners, retrieveMessageConsumers, retrieveMessageProducers, setConnectionErrorHandler, setUniqueId, setWorkersFirstOnShutdown, start, stop, workersFirstOnShutdown
public static final int DEFAULT_MINIMUM_POOL_SIZE
public static final int DEFAULT_MAXIMUM_POOL_SIZE
public static final int DEFAULT_ACQUIRE_INCREMENT
protected PooledDataSource createPool() throws java.lang.Exception
createPool
in class JdbcPooledConnectionImpl
java.lang.Exception
public boolean equals(java.lang.Object o)
DatabaseConnection
Force implementations to over-ride equals with a semantic implementation.
equals
in class DatabaseConnection
Object.equals(java.lang.Object)
public int hashCode()
DatabaseConnection
Force implementations to over-ride hashcode.
hashCode
in class DatabaseConnection
Object.hashCode()
public java.lang.Integer getMinimumPoolSize()
public void setMinimumPoolSize(java.lang.Integer minimumPoolSize)
public int minPoolSize()
public java.lang.Integer getMaximumPoolSize()
public void setMaximumPoolSize(java.lang.Integer maximumPoolSize)
public int maxPoolSize()
public java.lang.Integer getAcquireIncrement()
public void setAcquireIncrement(java.lang.Integer acquireIncrement)
public TimeInterval getConnectionAcquireWait()
public void setConnectionAcquireWait(TimeInterval connectionAcquireWait)
public TimeInterval getIdleConnectionTestPeriod()
public void setIdleConnectionTestPeriod(TimeInterval idleConnectionTestPeriod)
public TimeInterval getMaxIdleTime()
public void setMaxIdleTime(TimeInterval t)
public int currentBusyConnectionCount() throws java.sql.SQLException
java.sql.SQLException
public int currentConnectionCount() throws java.sql.SQLException
java.sql.SQLException
public int currentIdleConnectionCount() throws java.sql.SQLException
java.sql.SQLException
public JdbcPoolFactory getPoolFactory()
public void setPoolFactory(JdbcPoolFactory f)
f
- the poolFactory to set