Package com.adaptris.core.jdbc
Class AdvancedJdbcPooledConnection
- java.lang.Object
-
- com.adaptris.core.AdaptrisConnectionImp
-
- com.adaptris.core.AllowsRetriesConnection
-
- com.adaptris.core.jdbc.DatabaseConnection
-
- com.adaptris.core.jdbc.JdbcPooledConnectionImpl
-
- com.adaptris.core.jdbc.AdvancedJdbcPooledConnection
-
- All Implemented Interfaces:
AdaptrisComponent,AdaptrisConnection,ComponentLifecycle,ComponentLifecycleExtension,StateManagedComponent
@ComponentProfile(summary="Connect to a database using a JDBC driver; connection pooling handled via C3P0", tag="connections,jdbc") public class AdvancedJdbcPooledConnection extends JdbcPooledConnectionImplADatabaseConnectioninstance that provides connection pooling via c3p0.- See Also:
PooledConnectionProperties
-
-
Field Summary
-
Fields inherited from class com.adaptris.core.jdbc.JdbcPooledConnectionImpl
connectionPool
-
Fields inherited from class com.adaptris.core.AdaptrisConnectionImp
log
-
-
Constructor Summary
Constructors Constructor Description AdvancedJdbcPooledConnection()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected C3P0PooledDataSourcecreatePool()intcurrentBusyConnectionCount()intcurrentConnectionCount()intcurrentIdleConnectionCount()booleanequals(java.lang.Object ajpc)Force implementations to over-ride equals with a semantic implementation.KeyValuePairSetgetConnectionPoolProperties()inthashCode()Force implementations to over-ride hashcode.voidsetConnectionPoolProperties(KeyValuePairSet kvps)-
Methods inherited from class com.adaptris.core.jdbc.JdbcPooledConnectionImpl
asDataSource, closeDatabaseConnection, getConnectionName, getConnectUrl, initialiseDatabaseConnection, makeConnection, setConnectUrl, startDatabaseConnection, stopDatabaseConnection
-
Methods inherited from class com.adaptris.core.jdbc.DatabaseConnection
alwaysValidateConnection, autoCommit, checkInternalState, closeConnection, connect, connectionProperties, debugMode, getAlwaysValidateConnection, getAutoCommit, getConnectionProperties, getDebugMode, getDriverImp, getPassword, getUsername, initConnection, loadDriverClass, prepareConnection, setAlwaysValidateConnection, setAutoCommit, setConnectionProperties, setDebugMode, setDriverImp, setPassword, setUsername, startConnection, stopConnection
-
Methods inherited from class com.adaptris.core.AllowsRetriesConnection
connectionAttempts, connectionRetryInterval, createLoggingStatement, getConnectionAttempts, getConnectionRetryInterval, logWarning, setConnectionAttempts, setConnectionRetryInterval
-
Methods inherited from class com.adaptris.core.AdaptrisConnectionImp
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
-
-
-
-
Method Detail
-
createPool
protected C3P0PooledDataSource createPool() throws java.lang.Exception
- Specified by:
createPoolin classJdbcPooledConnectionImpl- Throws:
java.lang.Exception
-
equals
public boolean equals(java.lang.Object ajpc)
Description copied from class:DatabaseConnectionForce implementations to over-ride equals with a semantic implementation.
- Specified by:
equalsin classDatabaseConnection- See Also:
Object.equals(java.lang.Object)
-
hashCode
public int hashCode()
Description copied from class:DatabaseConnectionForce implementations to over-ride hashcode.
- Specified by:
hashCodein classDatabaseConnection- See Also:
Object.hashCode()
-
getConnectionPoolProperties
public KeyValuePairSet getConnectionPoolProperties()
-
setConnectionPoolProperties
public void setConnectionPoolProperties(KeyValuePairSet kvps)
-
currentBusyConnectionCount
public int currentBusyConnectionCount() throws java.sql.SQLException- Throws:
java.sql.SQLException
-
currentConnectionCount
public int currentConnectionCount() throws java.sql.SQLException- Throws:
java.sql.SQLException
-
currentIdleConnectionCount
public int currentIdleConnectionCount() throws java.sql.SQLException- Throws:
java.sql.SQLException
-
-