Commit acb99cbb authored by Ard Schrijvers's avatar Ard Schrijvers

HSTTWO-4326 [Backport 11.2] Move setting the flag that jcr nodes have been...

HSTTWO-4326 [Backport 11.2] Move setting the flag that jcr nodes have been loaded to more logical location

(cherry picked from commit b12ff712)
parent 3b256d6d
......@@ -28,6 +28,7 @@ import javax.jcr.Session;
import org.apache.commons.lang.StringUtils;
import org.hippoecm.hst.configuration.model.HstNode;
import org.hippoecm.hst.configuration.model.ModelLoadingException;
import org.hippoecm.hst.site.HstServices;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
......@@ -90,6 +91,7 @@ public class HstNodeLoadingCache implements HstEventConsumer {
try (LazyCloseableSession lazyCloseableSession = createLazyCloseableSession()) {
if (rootNode == null) {
rootNode = new HstNodeImpl(lazyCloseableSession.getSession().getNode(rootPath), null);
HstServices.setHstConfigurationNodesLoaded(true);
events = null;
} else if (events != null) {
// reload only certain parts
......
......@@ -332,7 +332,6 @@ public class DefaultHstSiteConfigurer implements HstSiteConfigurer {
final HstNodeLoadingCache hstNodeLoadingCache = componentManager.getComponent(HstNodeLoadingCache.class);
// triggers the loading of all the hst configuration nodes
hstNodeLoadingCache.getNode(hstNodeLoadingCache.getRootPath());
HstServices.setHstConfigurationNodesLoaded(true);
log.info("Loaded all HST Configuraion JCR nodes in {} ms.", (System.currentTimeMillis() - start));
}
log.info(INIT_DONE_MSG);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment