Skip to content

Commit 2c410e6

Browse files
committed
Default validateOnHeartbeat = !System.getenv().containsKey("LAMBDA_TASK_ROOT");
With this we can then remove the explicit experimental lambdaMode() and just auto detect it. When running in lambda we don't want to validate connections in a background task due to lambda suspend.
1 parent 22f44c9 commit 2c410e6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ebean-datasource-api/src/main/java/io/ebean/datasource/DataSourceConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public class DataSourceConfig implements DataSourceBuilder.Settings {
8080
private Properties clientInfo;
8181
private String applicationName;
8282
private boolean shutdownOnJvmExit;
83-
private boolean validateOnHeartbeat = true;
83+
private boolean validateOnHeartbeat = !System.getenv().containsKey("LAMBDA_TASK_ROOT");
8484

8585
@Override
8686
public Settings settings() {

0 commit comments

Comments
 (0)