From 48f78cf80aac1bbf9d4c34068b48b4cce425b40b Mon Sep 17 00:00:00 2001 From: Stan Silvert Date: Thu, 9 Jul 2015 14:46:54 -0400 Subject: [PATCH 1/2] KEYCLOAK-1547 Need to use overridable removeUserSession() method. --- .../sessions/infinispan/InfinispanUserSessionProvider.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/model/sessions-infinispan/src/main/java/org/keycloak/models/sessions/infinispan/InfinispanUserSessionProvider.java b/model/sessions-infinispan/src/main/java/org/keycloak/models/sessions/infinispan/InfinispanUserSessionProvider.java index 2275a9864e..71bac9e6e7 100755 --- a/model/sessions-infinispan/src/main/java/org/keycloak/models/sessions/infinispan/InfinispanUserSessionProvider.java +++ b/model/sessions-infinispan/src/main/java/org/keycloak/models/sessions/infinispan/InfinispanUserSessionProvider.java @@ -236,7 +236,7 @@ public class InfinispanUserSessionProvider implements UserSessionProvider { .execute(); for (String id : sessions.keySet()) { - removeUserSession(realm, id); + removeUserSession(realm, getUserSession(realm, id)); } } @@ -252,7 +252,7 @@ public class InfinispanUserSessionProvider implements UserSessionProvider { .execute(); for (String id : map.keySet()) { - removeUserSession(realm, id); + removeUserSession(realm, getUserSession(realm, id)); } map = new MapReduceTask(sessionCache) From af8949c29176c4726d80087105571cdb74ca5a3e Mon Sep 17 00:00:00 2001 From: Stan Silvert Date: Mon, 13 Jul 2015 11:21:35 -0400 Subject: [PATCH 2/2] Change to make removeUserSession() a protected method. --- .../sessions/infinispan/InfinispanUserSessionProvider.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/model/sessions-infinispan/src/main/java/org/keycloak/models/sessions/infinispan/InfinispanUserSessionProvider.java b/model/sessions-infinispan/src/main/java/org/keycloak/models/sessions/infinispan/InfinispanUserSessionProvider.java index 71bac9e6e7..f865ca3d19 100755 --- a/model/sessions-infinispan/src/main/java/org/keycloak/models/sessions/infinispan/InfinispanUserSessionProvider.java +++ b/model/sessions-infinispan/src/main/java/org/keycloak/models/sessions/infinispan/InfinispanUserSessionProvider.java @@ -236,7 +236,7 @@ public class InfinispanUserSessionProvider implements UserSessionProvider { .execute(); for (String id : sessions.keySet()) { - removeUserSession(realm, getUserSession(realm, id)); + removeUserSession(realm, id); } } @@ -252,7 +252,7 @@ public class InfinispanUserSessionProvider implements UserSessionProvider { .execute(); for (String id : map.keySet()) { - removeUserSession(realm, getUserSession(realm, id)); + removeUserSession(realm, id); } map = new MapReduceTask(sessionCache) @@ -361,7 +361,7 @@ public class InfinispanUserSessionProvider implements UserSessionProvider { } } - void removeUserSession(RealmModel realm, String userSessionId) { + protected void removeUserSession(RealmModel realm, String userSessionId) { tx.remove(sessionCache, userSessionId); Map map = new MapReduceTask(sessionCache)