diff --git a/bundles/ch.elexis.core.jpa/src/ch/elexis/core/jpa/entitymanager/ElexisEntityManger.java b/bundles/ch.elexis.core.jpa/src/ch/elexis/core/jpa/entitymanager/ElexisEntityManger.java index 2eed9f0b8c..672606e007 100644 --- a/bundles/ch.elexis.core.jpa/src/ch/elexis/core/jpa/entitymanager/ElexisEntityManger.java +++ b/bundles/ch.elexis.core.jpa/src/ch/elexis/core/jpa/entitymanager/ElexisEntityManger.java @@ -24,11 +24,11 @@ import org.slf4j.LoggerFactory; import ch.elexis.core.constants.ElexisSystemPropertyConstants; +import ch.elexis.core.l10n.Messages; import ch.elexis.core.jpa.entitymanager.ui.IDatabaseUpdateUi; import ch.elexis.core.jpa.liquibase.LiquibaseDBInitializer; import ch.elexis.core.jpa.liquibase.LiquibaseDBScriptExecutor; import ch.elexis.core.jpa.liquibase.LiquibaseDBUpdater; -import ch.elexis.core.l10n.Messages; import ch.elexis.core.services.IElexisEntityManager; import ch.elexis.core.utils.CoreUtil; @@ -102,8 +102,9 @@ public synchronized EntityManager getEntityManager(boolean managed) { if (factory == null) { // try to initialize if (factoryBuilder != null) { + if (!SKIP_LIQUIBASE) { - if (updateProgress != null && !isSystemPropertyDBConfig()) { + if (updateProgress != null) { try { updateProgress.executeWithProgress(Messages.ElexisEntityManger_Database_Init, () -> { dbInit(updateProgress); @@ -156,12 +157,6 @@ public synchronized EntityManager getEntityManager(boolean managed) { } } - private boolean isSystemPropertyDBConfig() { - String prop_dbUser = System.getProperty(ElexisSystemPropertyConstants.CONN_DB_USERNAME); - String prop_dbConnSpec = System.getProperty(ElexisSystemPropertyConstants.CONN_DB_SPEC); - return prop_dbUser != null && prop_dbConnSpec != null; - } - private void dbUpdate(IDatabaseUpdateUi updateProgress2) { LiquibaseDBUpdater updater = new LiquibaseDBUpdater(dataSource, updateProgress); updateSuccess = updater.update();