Set order of LiquibaseDBLockProviderFactory to 1

- makes it the default provider when no provider is explicitly configured
- avoid NPE at server startup when other providers are present and none is set as default
This commit is contained in:
Stefan Guilhen 2022-01-10 17:42:36 -03:00 committed by Hynek Mlnařík
parent dea123169f
commit 2fd1593abf

View file

@ -30,6 +30,7 @@ import org.keycloak.models.dblock.DBLockProviderFactory;
public class LiquibaseDBLockProviderFactory implements DBLockProviderFactory {
private static final Logger logger = Logger.getLogger(LiquibaseDBLockProviderFactory.class);
public static final int PROVIDER_PRIORITY = 1;
private long lockWaitTimeoutMillis;
@ -68,4 +69,9 @@ public class LiquibaseDBLockProviderFactory implements DBLockProviderFactory {
public String getId() {
return "jpa";
}
@Override
public int order() {
return PROVIDER_PRIORITY;
}
}