You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ofbiz.apache.org by "Mridul Pathak (Jira)" <ji...@apache.org> on 2026/10/25 06:44:00 UTC
[jira] [Closed] (OFBIZ-13726) Remove OFBizDynamicThresholdFilter and the ThreadContext "uri" entries that feed it
[ https://issues.apache.org/jira/browse/OFBIZ-13726?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mridul Pathak closed OFBIZ-13726.
---------------------------------
Fix Version/s: Upcoming Branch
24.09.09
Resolution: Fixed
> Remove OFBizDynamicThresholdFilter and the ThreadContext "uri" entries that feed it
> -----------------------------------------------------------------------------------
>
> Key: OFBIZ-13726
> URL: https://issues.apache.org/jira/browse/OFBIZ-13726
> Project: OFBiz
> Issue Type: Improvement
> Components: framework/base, framework/webapp, product
> Affects Versions: Upcoming Branch, 24.09.08
> Reporter: Mridul Pathak
> Assignee: Mridul Pathak
> Priority: Minor
> Fix For: Upcoming Branch, 24.09.09
>
>
> h3. Problem
> {{OFBizDynamicThresholdFilter}} (OFBIZ-11980) is declared as a configuration-wide filter in {{log4j2.xml}}, so it runs on every logging call, including the ones the logger levels then discard, only to keep {{/getJs}} requests at ERROR. Since the change made to remove a compilation warning, it builds a new context data map on each call ({{ContextDataFactory.createContextData()}} plus {{injectContextData(...)}}) and copies the ThreadContext into it. It also relies on internal Log4j classes ({{org.apache.logging.log4j.core.impl}}), it needs the deprecated {{packages}} plugin scanning in {{log4j2.xml}}, and it is the reason {{log4j-core}} is an {{implementation}} dependency.
> h3. Proposal
> * Remove {{OFBizDynamicThresholdFilter}}, its element and the {{packages}} attribute in {{log4j2.xml}}.
> * Remove the {{ThreadContext.put("uri", ...)}}/{{remove("uri")}} calls in {{ControlFilter}} and {{CatalogUrlFilter}}.
> * Make {{log4j-core}} a {{runtimeOnly}} dependency, plus {{testImplementation}} for {{EntityEcaUtilConcurrencyTest}}, which uses its API.
> {{/getJs}} requests then log like any other request.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)