From 7f3e5227fbc83f319d8c28ffe3eb17ebcc78f0a8 Mon Sep 17 00:00:00 2001 From: Paul Ferraro Date: Tue, 31 Oct 2023 18:33:34 -0400 Subject: [PATCH] [5345] 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 684baa88bb..7775923b4c 100644 --- a/impl/src/main/java/com/sun/faces/config/ConfigureListener.java +++ b/impl/src/main/java/com/sun/faces/config/ConfigureListener.java @@ -150,8 +150,11 @@ public void contextInitialized(ServletContextEvent servletContextEvent) { } } - 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)) { servletContext.setAttribute(WebConfiguration.BooleanWebContextInitParameter.EnableDistributable.getQualifiedName(), TRUE); }