Peter Centgraf pushed to branch feature/REPO-1725 at cms-community / 
hippo-repository


Commits:
80da965a by Peter Centgraf at 2017-07-11T17:12:49+02:00
REPO-1725 use bootstrap model (not baseline) in case of failure storing baseline

- - - - -


1 changed file:

- engine/src/main/java/org/onehippo/cm/engine/ConfigurationServiceImpl.java


Changes:

=====================================
engine/src/main/java/org/onehippo/cm/engine/ConfigurationServiceImpl.java
=====================================
--- a/engine/src/main/java/org/onehippo/cm/engine/ConfigurationServiceImpl.java
+++ b/engine/src/main/java/org/onehippo/cm/engine/ConfigurationServiceImpl.java
@@ -142,10 +142,6 @@ public class ConfigurationServiceImpl implements 
InternalConfigurationService {
             boolean startAutoExportService = configure && autoExportAllowed;
 
             ConfigurationModelImpl baselineModel = loadBaselineModel();
-
-            // set runtimeConfigurationModel from baseline for use later -- 
this is a reasonable default in case of exception
-            runtimeConfigurationModel = baselineModel;
-
             ConfigurationModelImpl bootstrapModel = null;
             boolean success;
             if (mustConfigure) {
@@ -178,6 +174,9 @@ public class ConfigurationServiceImpl implements 
InternalConfigurationService {
                     log.info("ConfigurationService: apply bootstrap config");
                     success = applyConfig(baselineModel, bootstrapModel, 
false, verify, fullConfigure, !first);
                     if (success) {
+                        // set runtimeConfigurationModel from bootstrapModel 
-- this is a reasonable default in case of exception
+                        runtimeConfigurationModel = bootstrapModel;
+
                         log.info("ConfigurationService: store bootstrap 
config");
                         success = storeBaselineModel(bootstrapModel);
                     }
@@ -223,6 +222,9 @@ public class ConfigurationServiceImpl implements 
InternalConfigurationService {
                 }
             }
             else {
+                // if we're not doing any bootstrap, use the baseline model as 
our runtime model
+                runtimeConfigurationModel = baselineModel;
+
                 log.info("ConfigurationService: start repository services");
                 startRepositoryServicesTask.execute();
             }



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-repository/commit/80da965a275e8f21942aa4b5e2dfc0fe65682f07
_______________________________________________
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn

Reply via email to