Skip to content

Commit

Permalink
Use failTimeout instead of failFast for Hikari >= 3.0.0
Browse files Browse the repository at this point in the history
initializationFailFast has been removed from Hikari >= 3.0.0 and replaced
with initializationFailTimeout. See https://github.com/brettwooldridge/HikariCP#infrequently-used
  • Loading branch information
jopereira committed Oct 28, 2020
1 parent f16ffee commit c8573bc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ public class WSProdConfig extends WSBaseConfig {
@Value("${datasource.driverClassName}")
String dataSourceDriver;

@Value("${datasource.failFast}")
String dataSourceFailFast;
@Value("${datasource.failTimeout}")
String dataSourceFailTimeout;

@Value("${datasource.maximumPoolSize}")
String dataSourceMaximumPoolSize;
Expand Down Expand Up @@ -84,6 +84,7 @@ public DataSource dataSource() {
config.setMaxLifetime(Integer.parseInt(dataSourceMaxLifetime));
config.setIdleTimeout(Integer.parseInt(dataSourceIdleTimeout));
config.setConnectionTimeout(Integer.parseInt(dataSourceConnectionTimeout));
config.setInitializationFailTimeout(Integer.parseInt(dataSourceFailTimeout));
return new HikariDataSource(config);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ server.error.whitelabel.enabled=true
# datasource.username=dpppt
# datasource.password=dpppt
# datasource.driverClassName=org.postgresql.ds.PGSimpleDataSource
# datasource.failFast=true
# datasource.failTimeout=1
# datasource.maximumPoolSize=5
# datasource.maxLifetime=1700000
# datasource.idleTimeout=600000
Expand Down

0 comments on commit c8573bc

Please sign in to comment.