From 597ee2b8c9f1034cac11b044ecfe4d47dcd0a75f Mon Sep 17 00:00:00 2001 From: Stian Thorgersen Date: Thu, 2 Oct 2014 09:00:31 +0200 Subject: [PATCH] Fixes to infinispan user session provider --- .../sessions/infinispan/InfinispanUserSessionProvider.java | 3 ++- .../sessions/infinispan/mapreduce/ClientSessionMapper.java | 4 +++- 2 files changed, 5 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 033fe534bc..60bcb59c33 100644 --- 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 @@ -395,7 +395,7 @@ public class InfinispanUserSessionProvider implements UserSessionProvider { throw new IllegalStateException("Can't remove session: task in progress for session"); } } else { - tasks.put(key, new CacheTask(cache, CacheOperation.ADD, key, value)); + tasks.put(key, new CacheTask(cache, CacheOperation.REPLACE, key, value)); } } @@ -426,6 +426,7 @@ public class InfinispanUserSessionProvider implements UserSessionProvider { break; case REPLACE: cache.replace(key, value); + break; } } } diff --git a/model/sessions-infinispan/src/main/java/org/keycloak/models/sessions/infinispan/mapreduce/ClientSessionMapper.java b/model/sessions-infinispan/src/main/java/org/keycloak/models/sessions/infinispan/mapreduce/ClientSessionMapper.java index 7329d3fa88..369b7a6f5d 100644 --- a/model/sessions-infinispan/src/main/java/org/keycloak/models/sessions/infinispan/mapreduce/ClientSessionMapper.java +++ b/model/sessions-infinispan/src/main/java/org/keycloak/models/sessions/infinispan/mapreduce/ClientSessionMapper.java @@ -80,7 +80,9 @@ public class ClientSessionMapper implements Mapper