Package com.adaptris.jdbc.flyway
Class FlywayJdbcConnection
- java.lang.Object
-
- All Implemented Interfaces:
AdaptrisComponent
,AdaptrisConnection
,ComponentLifecycle
,ComponentLifecycleExtension
,StateManagedComponent
@ComponentProfile(summary="Extension of AdvancedJdbcPooledConnection which will run flyway migration on init.", tag="connections,jdbc,flyway", since="3.9.0") public class FlywayJdbcConnection extends AdvancedJdbcPooledConnection
Extension ofAdvancedJdbcPooledConnection
which will run flyway migration on init.In the adapter configuration file this class is aliased as flyway-jdbc-connection which is the preferred alternative to the fully qualified classname when building your configuration.
-
-
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 FlywayJdbcConnection()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FlywayMigrator
getFlyway()
protected void
initialiseDatabaseConnection()
protected FlywayMigrator
migrator()
void
setFlyway(FlywayMigrator flyway)
FlywayJdbcConnection
withFlyway(DefaultFlywayMigrator flyway)
-
Methods inherited from class com.adaptris.core.jdbc.AdvancedJdbcPooledConnection
createPool, currentBusyConnectionCount, currentConnectionCount, currentIdleConnectionCount, equals, getConnectionPoolProperties, hashCode, setConnectionPoolProperties
-
Methods inherited from class com.adaptris.core.jdbc.JdbcPooledConnectionImpl
asDataSource, closeDatabaseConnection, getConnectionName, getConnectUrl, 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
-
initialiseDatabaseConnection
protected void initialiseDatabaseConnection() throws CoreException
- Overrides:
initialiseDatabaseConnection
in classJdbcPooledConnectionImpl
- Throws:
CoreException
-
withFlyway
public FlywayJdbcConnection withFlyway(DefaultFlywayMigrator flyway)
-
migrator
protected FlywayMigrator migrator()
-
getFlyway
public FlywayMigrator getFlyway()
-
setFlyway
public void setFlyway(FlywayMigrator flyway)
-
-