Skip to content

Commit 7ae5e65

Browse files
committed
LDEV-6111 - call touchAll when warmup
1 parent fa1f075 commit 7ae5e65

File tree

3 files changed

+19
-16
lines changed

3 files changed

+19
-16
lines changed

core/src/main/java/lucee/runtime/engine/CFMLEngineImpl.java

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,10 @@
110110
import lucee.runtime.config.ConfigWebImpl;
111111
import lucee.runtime.config.ConfigWebPro;
112112
import lucee.runtime.config.DeployHandler;
113-
import lucee.runtime.debug.DebuggerPrintStream;
114113
import lucee.runtime.config.Identification;
115114
import lucee.runtime.config.Password;
116115
import lucee.runtime.config.ResetFilter;
116+
import lucee.runtime.debug.DebuggerPrintStream;
117117
import lucee.runtime.engine.listener.CFMLServletContextListener;
118118
import lucee.runtime.exp.Abort;
119119
import lucee.runtime.exp.ApplicationException;
@@ -1749,24 +1749,27 @@ public Controler getControler() {
17491749
return controler;
17501750
}
17511751

1752-
public void onStart(ConfigPro config, boolean reload) {
1753-
boolean isWeb = config instanceof ConfigWeb;
1752+
public void onStart(ConfigServerImpl config, boolean reload) throws IOException {
17541753
Boolean build = Caster.toBoolean(SystemUtil.getSystemPropOrEnvVar("lucee.enable.warmup", ""), null);
17551754
if (build == null) build = Caster.toBoolean(SystemUtil.getSystemPropOrEnvVar("lucee.build", ""), null);
17561755
boolean warmup = Boolean.TRUE.equals(build);
17571756
if (warmup) {
1758-
if (!isWeb) {
1759-
onStartCall(config, reload, true);
1760-
1761-
String msg = "Lucee warmup completed. Shutting down.";
1762-
// CONSOLE_OUT.println(msg);
1763-
LogUtil.logGlobal(config, Log.LEVEL_INFO, "config", msg);
1764-
LogUtil.log(config, Log.LEVEL_INFO, "application", msg);
1765-
shutdownFelix();
1766-
System.exit(0);
1767-
}
1757+
onStartCall(config, reload, true);
1758+
1759+
// make sure all .CFConfig.json settings are loaded
1760+
ConfigUtil.getConfigServerImpl(config).touchAll(null);
1761+
1762+
String msg = "Lucee warmup completed. Shutting down.";
1763+
// CONSOLE_OUT.println(msg);
1764+
LogUtil.logGlobal(config, Log.LEVEL_INFO, "config", msg);
1765+
LogUtil.log(config, Log.LEVEL_INFO, "application", msg);
1766+
shutdownFelix();
1767+
System.exit(0);
17681768
}
1769-
else onStartCall(config, reload, false);
1769+
}
1770+
1771+
public void onStart(ConfigWebPro config, boolean reload) {
1772+
onStartCall(config, reload, false);
17701773
}
17711774

17721775
private void onStartCall(ConfigPro config, boolean reload, boolean warmup) {

loader/build.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<project default="core" basedir="." name="Lucee"
33
xmlns:resolver="antlib:org.apache.maven.resolver.ant">
44

5-
<property name="version" value="7.2.0.15-ALPHA"/>
5+
<property name="version" value="7.2.0.16-ALPHA"/>
66

77
<taskdef uri="antlib:org.apache.maven.resolver.ant" resource="org/apache/maven/resolver/ant/antlib.xml">
88
<classpath>

loader/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
<groupId>org.lucee</groupId>
55
<artifactId>lucee</artifactId>
6-
<version>7.2.0.15-ALPHA</version>
6+
<version>7.2.0.16-ALPHA</version>
77
<packaging>jar</packaging>
88

99
<name>Lucee Loader Build</name>

0 commit comments

Comments
 (0)