https://issues.apache.org/bugzilla/show_bug.cgi?id=45660
Summary: NDC could remove Hashtable entry if Stack gets empty
Product: Log4j
Version: 1.2
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: enhancement
Priority: P3
Component: Other
AssignedTo: [email protected]
ReportedBy: [EMAIL PROTECTED]
NDC documentation says that users should call remove() to get rid of the not
needed entries and that the best place for that would be at the end of the
thread's life.
However in a servlet/filter environment (for example Spring's
Log4jNestedDiagnosticContextFilter,
http://static.springframework.org/spring/docs/2.5.x/api/org/springframework/web/filter/Log4jNestedDiagnosticContextFilter.html)
there is no ideal place to call NDC.remove() (because spring does not know if
anything else is using NDC or not and the web app developer does not know if
the servlet container is using NDC or not).
So maybe NDC could remove the Hashtable entry in the pop if the Stack is left
empty. That would solve the mentioned problem and would also maintain
compatibility.
This idea came up with conjunction of Spring's filter
(http://jira.springframework.org/browse/SPR-5103).
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]