You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by re...@apache.org on 2025/12/17 21:28:35 UTC
(cxf) 01/07: [CXF-9191] Fix EHCacheTokenStore resource leak (#2786)
This is an automated email from the ASF dual-hosted git repository.
reta pushed a commit to branch 4.1.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git
commit 6d1db148985cd1426253fd28be410b0a24adbfa7
Author: Stefan Nienhuis <st...@nienhuisdevelopment.com>
AuthorDate: Wed Dec 17 14:48:07 2025 +0100
[CXF-9191] Fix EHCacheTokenStore resource leak (#2786)
(cherry picked from commit 43fe7da7fe17326d2ffe8d8dfa464afb955ed23a)
---
.../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() {