Class JdbcPooledConnectionImpl
- All Implemented Interfaces:
AdaptrisComponent,AdaptrisConnection,ComponentLifecycle,ComponentLifecycleExtension,StateManagedComponent
- Direct Known Subclasses:
AdvancedJdbcPooledConnection,JdbcPooledConnection,PluggableJdbcPooledConnection
-
Field Summary
FieldsFields inherited from class com.adaptris.core.AdaptrisConnectionImp
log -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionExpose this DatabaseConnection as a DataSourceprotected voidInitialise the underlying database connection.protected abstract PooledDataSourceprotected StringReturns a name for this connection for logging purposes.protected voidInitialise the underlying database connection.protected ConnectionMake the connection.voidsetConnectUrl(String connectUrl) protected voidInitialise the underlying database connection.protected voidInitialise the underlying database connection.Methods inherited from class com.adaptris.core.jdbc.DatabaseConnection
alwaysValidateConnection, autoCommit, checkInternalState, closeConnection, connect, connectionProperties, debugMode, equals, getAlwaysValidateConnection, getAutoCommit, getConnectionProperties, getDebugMode, getDriverImp, getPassword, getUsername, hashCode, initConnection, loadDriverClass, prepareConnection, setAlwaysValidateConnection, setAutoCommit, setConnectionProperties, setDebugMode, setDriverImp, setPassword, setUsername, startConnection, stopConnectionMethods inherited from class com.adaptris.core.AllowsRetriesConnection
connectionAttempts, connectionRetryInterval, createLoggingStatement, getConnectionAttempts, getConnectionRetryInterval, logWarning, setConnectionAttempts, setConnectionRetryIntervalMethods 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
-
Field Details
-
connectionPool
-
-
Constructor Details
-
JdbcPooledConnectionImpl
public JdbcPooledConnectionImpl()
-
-
Method Details
-
makeConnection
Description copied from class:DatabaseConnectionMake the connection.
This abstract method should be implemented by concrete sub-classes to make or check the current connection to the Jdbc source.
- Specified by:
makeConnectionin classDatabaseConnection- Returns:
- a java.sql.Connection
- Throws:
SQLException- if the connection could not be made.- See Also:
-
initialiseDatabaseConnection
Description copied from class:DatabaseConnectionInitialise the underlying database connection.
This abstract method should be implemented by concrete sub-classes to initialise any components other than the DriverManager.
- Specified by:
initialiseDatabaseConnectionin classDatabaseConnection- Throws:
CoreException- wrapping any underlying exception.
-
startDatabaseConnection
Description copied from class:DatabaseConnectionInitialise the underlying database connection.
This abstract method should be implemented by concrete sub-classes to initialise any components other than the DriverManager.
- Specified by:
startDatabaseConnectionin classDatabaseConnection- Throws:
CoreException- wrapping any underlying exception.
-
stopDatabaseConnection
protected void stopDatabaseConnection()Description copied from class:DatabaseConnectionInitialise the underlying database connection.
This abstract method should be implemented by concrete sub-classes to stop any components other than the DriverManager.
- Specified by:
stopDatabaseConnectionin classDatabaseConnection
-
closeDatabaseConnection
protected void closeDatabaseConnection()Description copied from class:DatabaseConnectionInitialise the underlying database connection.
This abstract method should be implemented by concrete sub-classes to close any components.
- Specified by:
closeDatabaseConnectionin classDatabaseConnection
-
createPool
- Throws:
Exception
-
asDataSource
Description copied from class:DatabaseConnectionExpose this DatabaseConnection as a DataSource- Overrides:
asDataSourcein classDatabaseConnection- Returns:
- a DataSource implementation
- Throws:
SQLException- See Also:
-
getConnectionName
Description copied from class:DatabaseConnectionReturns a name for this connection for logging purposes.
- Specified by:
getConnectionNamein classDatabaseConnection- Returns:
- a name for this connection for logging purposes
-
getConnectUrl
-
setConnectUrl
-