From a79a196a7a4ccbf7a956f1ad27e9d42812920bd0 Mon Sep 17 00:00:00 2001 From: sudeshnas93 Date: Wed, 22 Nov 2023 23:19:52 +0530 Subject: [PATCH] [2.3] Do not override application-specified com.sun.faces.enableDistributable value --- .../main/java/com/sun/faces/config/ConfigureListener.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/impl/src/main/java/com/sun/faces/config/ConfigureListener.java b/impl/src/main/java/com/sun/faces/config/ConfigureListener.java index 3845a049ac..c5910c7cf0 100644 --- a/impl/src/main/java/com/sun/faces/config/ConfigureListener.java +++ b/impl/src/main/java/com/sun/faces/config/ConfigureListener.java @@ -179,8 +179,11 @@ public void contextInitialized(ServletContextEvent sce) { } } - if (webXmlProcessor.isDistributablePresent()) { - webConfig.setOptionEnabled(WebConfiguration.BooleanWebContextInitParameter.EnableDistributable, true); + // Do not override if already defined + if (!webConfig.isSet(WebConfiguration.BooleanWebContextInitParameter.EnableDistributable)) { + webConfig.setOptionEnabled(WebConfiguration.BooleanWebContextInitParameter.EnableDistributable, webXmlProcessor.isDistributablePresent()); + } + if (webConfig.isOptionEnabled(WebConfiguration.BooleanWebContextInitParameter.EnableDistributable)) { context.setAttribute(WebConfiguration.BooleanWebContextInitParameter.EnableDistributable.getQualifiedName(), TRUE); }