Fixes to infinispan user session provider

This commit is contained in:
Stian Thorgersen 2014-10-02 09:00:31 +02:00
parent 6ff37cfc24
commit 597ee2b8c9
2 changed files with 5 additions and 2 deletions

View file

@ -395,7 +395,7 @@ public class InfinispanUserSessionProvider implements UserSessionProvider {
throw new IllegalStateException("Can't remove session: task in progress for session"); throw new IllegalStateException("Can't remove session: task in progress for session");
} }
} else { } 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; break;
case REPLACE: case REPLACE:
cache.replace(key, value); cache.replace(key, value);
break;
} }
} }
} }

View file

@ -80,7 +80,9 @@ public class ClientSessionMapper implements Mapper<String, SessionEntity, String
collector.emit(key, entity); collector.emit(key, entity);
break; break;
case USER_SESSION_AND_TIMESTAMP: case USER_SESSION_AND_TIMESTAMP:
collector.emit(entity.getUserSession(), entity.getTimestamp()); if (entity.getUserSession() != null) {
collector.emit(entity.getUserSession(), entity.getTimestamp());
}
break; break;
} }
} }