Map Store Removal: Remove unnecessary check in Jpa Connection Provider
Closes #26406 Signed-off-by: vramik <vramik@redhat.com>
This commit is contained in:
parent
7afd75ba08
commit
4fc7e3d607
2 changed files with 4 additions and 23 deletions
|
@ -251,17 +251,8 @@ public class DefaultJpaConnectionProviderFactory implements JpaConnectionProvide
|
||||||
startGlobalStats(session, globalStatsInterval);
|
startGlobalStats(session, globalStatsInterval);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
logger.debug("Calling migrateModel");
|
||||||
* Migrate model is executed just in case following providers are "jpa".
|
migrateModel(session);
|
||||||
* In Map Storage, there is an assumption that migrateModel is not needed.
|
|
||||||
*/
|
|
||||||
if ((Config.getProvider("realm") == null || "jpa".equals(Config.getProvider("realm"))) &&
|
|
||||||
(Config.getProvider("client") == null || "jpa".equals(Config.getProvider("client"))) &&
|
|
||||||
(Config.getProvider("clientScope") == null || "jpa".equals(Config.getProvider("clientScope")))) {
|
|
||||||
|
|
||||||
logger.debug("Calling migrateModel");
|
|
||||||
migrateModel(session);
|
|
||||||
}
|
|
||||||
} finally {
|
} finally {
|
||||||
// Close after creating EntityManagerFactory to prevent in-mem databases from closing
|
// Close after creating EntityManagerFactory to prevent in-mem databases from closing
|
||||||
if (connection != null) {
|
if (connection != null) {
|
||||||
|
|
|
@ -38,7 +38,6 @@ import jakarta.persistence.EntityManagerFactory;
|
||||||
import io.quarkus.arc.Arc;
|
import io.quarkus.arc.Arc;
|
||||||
|
|
||||||
import org.jboss.logging.Logger;
|
import org.jboss.logging.Logger;
|
||||||
import org.keycloak.Config;
|
|
||||||
import org.keycloak.ServerStartupError;
|
import org.keycloak.ServerStartupError;
|
||||||
import org.keycloak.common.Version;
|
import org.keycloak.common.Version;
|
||||||
import org.keycloak.connections.jpa.DefaultJpaConnectionProvider;
|
import org.keycloak.connections.jpa.DefaultJpaConnectionProvider;
|
||||||
|
@ -195,17 +194,8 @@ public class QuarkusJpaConnectionProviderFactory extends AbstractJpaConnectionPr
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initSchema(KeycloakSession session) {
|
private void initSchema(KeycloakSession session) {
|
||||||
/*
|
logger.debug("Calling migrateModel");
|
||||||
* Migrate model is executed just in case following providers are "jpa".
|
migrateModel(session);
|
||||||
* In Map Storage, there is an assumption that migrateModel is not needed.
|
|
||||||
*/
|
|
||||||
if ((Config.getProvider("realm") == null || "jpa".equals(Config.getProvider("realm"))) &&
|
|
||||||
(Config.getProvider("client") == null || "jpa".equals(Config.getProvider("client"))) &&
|
|
||||||
(Config.getProvider("clientScope") == null || "jpa".equals(Config.getProvider("clientScope")))) {
|
|
||||||
|
|
||||||
logger.debug("Calling migrateModel");
|
|
||||||
migrateModel(session);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void migrateModel(KeycloakSession session) {
|
private void migrateModel(KeycloakSession session) {
|
||||||
|
|
Loading…
Reference in a new issue