public abstract class JdbcPooledConnectionImpl extends DatabaseConnection
Modifier and Type | Field and Description |
---|---|
protected PooledDataSource |
connectionPool |
log
Constructor and Description |
---|
JdbcPooledConnectionImpl() |
Modifier and Type | Method and Description |
---|---|
javax.sql.DataSource |
asDataSource()
Expose this DatabaseConnection as a DataSource
|
protected void |
closeDatabaseConnection()
Initialise the underlying database connection.
|
protected abstract PooledDataSource |
createPool() |
protected java.lang.String |
getConnectionName()
Returns a name for this connection for logging purposes.
|
java.lang.String |
getConnectUrl() |
protected void |
initialiseDatabaseConnection()
Initialise the underlying database connection.
|
protected java.sql.Connection |
makeConnection()
Make the connection.
|
void |
setConnectUrl(java.lang.String connectUrl) |
protected void |
startDatabaseConnection()
Initialise the underlying database connection.
|
protected void |
stopDatabaseConnection()
Initialise the underlying database connection.
|
alwaysValidateConnection, autoCommit, checkInternalState, closeConnection, connect, connectionProperties, debugMode, equals, getAlwaysValidateConnection, getAutoCommit, getConnectionProperties, getDebugMode, getDriverImp, getPassword, getTestStatement, getUsername, hashCode, 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, getLookupName, getUniqueId, getWorkersFirstOnShutdown, init, prepare, requestClose, requestInit, requestStart, requestStop, retrieveComponentState, retrieveConnection, retrieveExceptionListeners, retrieveMessageConsumers, retrieveMessageProducers, setConnectionErrorHandler, setLookupName, setUniqueId, setWorkersFirstOnShutdown, start, stop, workersFirstOnShutdown
protected transient PooledDataSource connectionPool
protected java.sql.Connection makeConnection() throws java.sql.SQLException
DatabaseConnection
Make the connection.
This abstract method should be implemented by concrete sub-classes to make or check the current connection to the Jdbc source.
makeConnection
in class DatabaseConnection
java.sql.SQLException
- if the connection could not be made.DatabaseConnection.connect()
protected void initialiseDatabaseConnection() throws CoreException
DatabaseConnection
Initialise the underlying database connection.
This abstract method should be implemented by concrete sub-classes to initialise any components other than the DriverManager.
initialiseDatabaseConnection
in class DatabaseConnection
CoreException
- wrapping any underlying exception.protected void startDatabaseConnection() throws CoreException
DatabaseConnection
Initialise the underlying database connection.
This abstract method should be implemented by concrete sub-classes to initialise any components other than the DriverManager.
startDatabaseConnection
in class DatabaseConnection
CoreException
- wrapping any underlying exception.protected void stopDatabaseConnection()
DatabaseConnection
Initialise the underlying database connection.
This abstract method should be implemented by concrete sub-classes to stop any components other than the DriverManager.
stopDatabaseConnection
in class DatabaseConnection
protected void closeDatabaseConnection()
DatabaseConnection
Initialise the underlying database connection.
This abstract method should be implemented by concrete sub-classes to close any components.
closeDatabaseConnection
in class DatabaseConnection
protected abstract PooledDataSource createPool() throws java.lang.Exception
java.lang.Exception
public javax.sql.DataSource asDataSource() throws java.sql.SQLException
DatabaseConnection
asDataSource
in class DatabaseConnection
java.sql.SQLException
DataSource
protected java.lang.String getConnectionName()
DatabaseConnection
Returns a name for this connection for logging purposes.
getConnectionName
in class DatabaseConnection
public java.lang.String getConnectUrl()
public void setConnectUrl(java.lang.String connectUrl)