Skip to content

Commit 645b06f

Browse files
committed
LDEV-5798 - reload filesystem when a extension got installed
1 parent 7ababac commit 645b06f

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

core/src/main/java/lucee/runtime/config/ConfigWebFactory.java

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -562,8 +562,13 @@ synchronized static void load(ConfigServerImpl cs, ConfigImpl config, ConfigWebI
562562
if (LOG) LogUtil.logGlobal(ThreadLocalPageContext.getConfig(cs == null ? config : cs), Log.LEVEL_DEBUG, ConfigWebFactory.class.getName(), "loaded filesystem");
563563

564564
if (!essentialOnly) {
565-
_loadExtensionBundles(cs, config, root, log);
565+
boolean installedExtensions = _loadExtensionBundles(cs, config, root, log);
566566
if (LOG) LogUtil.logGlobal(ThreadLocalPageContext.getConfig(cs == null ? config : cs), Log.LEVEL_DEBUG, ConfigWebFactory.class.getName(), "loaded extension");
567+
if (installedExtensions) {
568+
_loadFilesystem(cs, config, root, doNew, log);
569+
if (LOG) LogUtil.logGlobal(ThreadLocalPageContext.getConfig(cs == null ? config : cs), Log.LEVEL_DEBUG, ConfigWebFactory.class.getName(),
570+
"loaded filesystem again after installing extensions");
571+
}
567572

568573
}
569574
else {
@@ -4948,7 +4953,7 @@ private static void _loadCFX(ConfigServerImpl configServer, ConfigImpl config, S
49484953
* @param doc
49494954
* @param log
49504955
*/
4951-
private static void _loadExtensionBundles(ConfigServerImpl cs, ConfigImpl config, Struct root, Log log) {
4956+
private static boolean _loadExtensionBundles(ConfigServerImpl cs, ConfigImpl config, Struct root, Log log) {
49524957
Log deployLog = config.getLog("deploy");
49534958
if (deployLog != null) log = deployLog;
49544959
try {
@@ -4960,7 +4965,7 @@ private static void _loadExtensionBundles(ConfigServerImpl cs, ConfigImpl config
49604965
String md5 = CollectionUtil.md5(children);
49614966
if (!changed) {
49624967
if (md5.equals(config.getExtensionsMD5())) {
4963-
return;
4968+
return false;
49644969
}
49654970
}
49664971

@@ -5059,6 +5064,7 @@ private static void _loadExtensionBundles(ConfigServerImpl cs, ConfigImpl config
50595064
ExceptionUtil.rethrowIfNecessary(t);
50605065
log(config, log, t);
50615066
}
5067+
return true;
50625068
}
50635069

50645070
private static void _loadExtensionDefinition(ConfigServerImpl cs, ConfigImpl config, Struct root, Log log) {

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="6.1.2.46-SNAPSHOT"/>
5+
<property name="version" value="6.1.2.47-SNAPSHOT"/>
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>6.1.2.46-SNAPSHOT</version>
6+
<version>6.1.2.47-SNAPSHOT</version>
77
<packaging>jar</packaging>
88

99
<name>Lucee Loader Build</name>

0 commit comments

Comments
 (0)