cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject cxf git commit: [CXF-7207] Closing the individual caches too
Date Thu, 12 Jan 2017 18:54:49 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 1a8ae7afb -> 7c472eba7


[CXF-7207] Closing the individual caches too


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/7c472eba
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/7c472eba
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/7c472eba

Branch: refs/heads/master
Commit: 7c472eba77b6957af54dadd2129711543d0f20db
Parents: 1a8ae7a
Author: Sergey Beryozkin <sberyozkin@gmail.com>
Authored: Thu Jan 12 18:54:32 2017 +0000
Committer: Sergey Beryozkin <sberyozkin@gmail.com>
Committed: Thu Jan 12 18:54:32 2017 +0000

----------------------------------------------------------------------
 .../security/oauth2/grants/code/JCacheCodeDataProvider.java  | 6 ++++++
 .../rs/security/oauth2/provider/JCacheOAuthDataProvider.java | 8 ++++++++
 2 files changed, 14 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/7c472eba/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/grants/code/JCacheCodeDataProvider.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/grants/code/JCacheCodeDataProvider.java
b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/grants/code/JCacheCodeDataProvider.java
index 867e99f..56b12d4 100644
--- a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/grants/code/JCacheCodeDataProvider.java
+++ b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/grants/code/JCacheCodeDataProvider.java
@@ -123,4 +123,10 @@ public class JCacheCodeDataProvider extends JCacheOAuthDataProvider
     protected static boolean isExpired(ServerAuthorizationCodeGrant grant) {
         return System.currentTimeMillis() < (grant.getIssuedAt() + grant.getExpiresIn());
     }
+    
+    @Override
+    public void close() {
+        grantCache.close();
+        super.close();
+    }
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/7c472eba/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/JCacheOAuthDataProvider.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/JCacheOAuthDataProvider.java
b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/JCacheOAuthDataProvider.java
index 9c73e26..2c6981b 100644
--- a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/JCacheOAuthDataProvider.java
+++ b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/JCacheOAuthDataProvider.java
@@ -183,6 +183,14 @@ public class JCacheOAuthDataProvider extends AbstractOAuthDataProvider
{
 
     @Override
     public void close() {
+        
+        clientCache.close();
+        refreshTokenCache.close();
+        if (accessTokenCache != null) {
+            accessTokenCache.close();
+        } else {
+            jwtAccessTokenCache.close();
+        }
         cacheManager.close();
     }
 


Mime
View raw message