This is an automated email from the ASF dual-hosted git repository. reta pushed a commit to branch 3.6.x-fixes in repository https://gitbox.apache.org/repos/asf/cxf.git
commit 8448814c762390f41806b29a6e5011219d7f9003 Author: Stefan Nienhuis <[email protected]> AuthorDate: Wed Dec 17 14:48:07 2025 +0100 [CXF-9191] Fix EHCacheTokenStore resource leak (#2786) (cherry picked from commit 43fe7da7fe17326d2ffe8d8dfa464afb955ed23a) (cherry picked from commit 6d1db148985cd1426253fd28be410b0a24adbfa7) (cherry picked from commit 30026d610f55b50c9e0b3ebeedbb78f2154c0e01) --- .../java/org/apache/cxf/ws/security/tokenstore/EHCacheTokenStore.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/tokenstore/EHCacheTokenStore.java b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/tokenstore/EHCacheTokenStore.java index 80b890f1ec..d7c63d5818 100644 --- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/tokenstore/EHCacheTokenStore.java +++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/tokenstore/EHCacheTokenStore.java @@ -127,6 +127,10 @@ public class EHCacheTokenStore implements TokenStore, Closeable, BusLifeCycleLis cacheManager.removeCache(key); cacheManager.close(); } + + if (bus != null) { + bus.getExtension(BusLifeCycleManager.class).unregisterLifeCycleListener(this); + } } public void initComplete() {
