tbuffagni opened a new pull request, #415: URL: https://github.com/apache/commons-jcs/pull/415
## Summary - Shut down the executor owned by ElementEventQueue when the queue is disposed. - Add a regression test that verifies the worker thread terminates and repeated disposal is safe. ## Why ElementEventQueue creates an executor directly through ThreadPoolManager.createPool(). This executor is not registered in the manager pool maps, so ThreadPoolManager.dispose() does not terminate it. During Tomcat WAR undeployment, the surviving JCS-ElementEventQueue-* workers cause thread-leak warnings and accumulate across redeployments even after JCS.shutdown() is invoked. JIRA: [JCS-248](https://issues.apache.org/jira/browse/JCS-248) ## Validation - mvn -B clean verify with Maven 3.9.11 and Eclipse Temurin 21: **BUILD SUCCESS**. - All seven reactor modules completed successfully. - Core module: 421 tests, 0 failures, 0 errors, 0 skipped. - The equivalent JCS 3.2.1 patch was also validated through five Tomcat deploy/workload/undeploy cycles: leak warnings decreased from 10 to 0 and the thread-count slope from +2.3 to -0.1 threads per cycle. ## Checklist - [x] Read the contribution guidelines. - [x] Read the ASF Generative Tooling Guidance. - [x] AI disclosure: OpenAI Codex assisted with bug analysis, the minimal code change, the regression test, validation, and drafting this pull request. - [x] Ran the project verification build successfully. - [x] Added a regression test that fails without the runtime change. - [x] Limited the pull request to the intended production change and regression test. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
