|
110 | 110 | import lucee.runtime.config.ConfigWebImpl; |
111 | 111 | import lucee.runtime.config.ConfigWebPro; |
112 | 112 | import lucee.runtime.config.DeployHandler; |
113 | | -import lucee.runtime.debug.DebuggerPrintStream; |
114 | 113 | import lucee.runtime.config.Identification; |
115 | 114 | import lucee.runtime.config.Password; |
116 | 115 | import lucee.runtime.config.ResetFilter; |
| 116 | +import lucee.runtime.debug.DebuggerPrintStream; |
117 | 117 | import lucee.runtime.engine.listener.CFMLServletContextListener; |
118 | 118 | import lucee.runtime.exp.Abort; |
119 | 119 | import lucee.runtime.exp.ApplicationException; |
@@ -1749,24 +1749,27 @@ public Controler getControler() { |
1749 | 1749 | return controler; |
1750 | 1750 | } |
1751 | 1751 |
|
1752 | | - public void onStart(ConfigPro config, boolean reload) { |
1753 | | - boolean isWeb = config instanceof ConfigWeb; |
| 1752 | + public void onStart(ConfigServerImpl config, boolean reload) throws IOException { |
1754 | 1753 | Boolean build = Caster.toBoolean(SystemUtil.getSystemPropOrEnvVar("lucee.enable.warmup", ""), null); |
1755 | 1754 | if (build == null) build = Caster.toBoolean(SystemUtil.getSystemPropOrEnvVar("lucee.build", ""), null); |
1756 | 1755 | boolean warmup = Boolean.TRUE.equals(build); |
1757 | 1756 | 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); |
1768 | 1768 | } |
1769 | | - else onStartCall(config, reload, false); |
| 1769 | + } |
| 1770 | + |
| 1771 | + public void onStart(ConfigWebPro config, boolean reload) { |
| 1772 | + onStartCall(config, reload, false); |
1770 | 1773 | } |
1771 | 1774 |
|
1772 | 1775 | private void onStartCall(ConfigPro config, boolean reload, boolean warmup) { |
|
0 commit comments