use of org.dbflute.helper.jdbc.connection.DfConnectionCreationHook in project dbflute-core by dbflute.
the class DfTaskControlLogic method setupDataSource.
// ===================================================================================
// Data Source
// ===========
public void setupDataSource() throws SQLException {
final DfDataSourceHandler dataSourceHandler = _databaseResource.getDataSourceHandler();
dataSourceHandler.setUser(_databaseResource.getUser());
dataSourceHandler.setPassword(_databaseResource.getPassword());
dataSourceHandler.setDriver(_databaseResource.getDriver());
dataSourceHandler.setUrl(_databaseResource.getUrl());
dataSourceHandler.setConnectionProperties(_databaseResource.getConnectionProperties());
dataSourceHandler.setAutoCommit(true);
dataSourceHandler.addConnectionCreationHook(new DfConnectionCreationHook() {
public void hook(Connection conn) throws SQLException {
connectMainSchema(conn);
}
});
dataSourceHandler.prepare();
}
Aggregations