aboutsummaryrefslogtreecommitdiff
path: root/id/server/idserverlib/src/main/java/at
diff options
context:
space:
mode:
authorThomas Lenz <tlenz@iaik.tugraz.at>2019-02-04 07:56:51 +0100
committerThomas Lenz <tlenz@iaik.tugraz.at>2019-02-04 07:56:51 +0100
commitf9cdab97942aac748915cd07c32669f37de57500 (patch)
tree0dd20cde99175d17cd264222823440b7ece9b9f6 /id/server/idserverlib/src/main/java/at
parentf27dd94733a9c2cf3a6e4f5611fbeff9de199720 (diff)
downloadmoa-id-spss-f9cdab97942aac748915cd07c32669f37de57500.tar.gz
moa-id-spss-f9cdab97942aac748915cd07c32669f37de57500.tar.bz2
moa-id-spss-f9cdab97942aac748915cd07c32669f37de57500.zip
update Spring Redis Backend
Diffstat (limited to 'id/server/idserverlib/src/main/java/at')
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/storage/RedisTransactionStorage.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/storage/RedisTransactionStorage.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/storage/RedisTransactionStorage.java
index 5149186f6..df43316ca 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/storage/RedisTransactionStorage.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/storage/RedisTransactionStorage.java
@@ -36,7 +36,7 @@ import org.springframework.dao.DataAccessException;
import org.springframework.data.redis.core.RedisOperations;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.core.SessionCallback;
-import org.springframework.data.redis.serializer.GenericJackson2JsonRedisSerializer;
+import org.springframework.data.redis.serializer.RedisSerializer;
import org.springframework.stereotype.Service;
import at.gv.egiz.eaaf.core.api.storage.ITransactionStorage;
@@ -58,7 +58,7 @@ public class RedisTransactionStorage implements ITransactionStorage {
protected AuthConfiguration authConfig;
@Autowired
- private GenericJackson2JsonRedisSerializer assertionStoreSerializer;
+ private RedisSerializer<AssertionStore> assertionStoreSerializer;
public RedisTemplate<String, Object> getTemplate(){
return this.redisTemplate;
@@ -69,10 +69,11 @@ public class RedisTransactionStorage implements ITransactionStorage {
}
public boolean containsKey(String key) {
+
try {
searchInDatabase(key);
return true;
-
+
} catch (MOADatabaseException e) {
return false;
}
@@ -371,7 +372,7 @@ public void putRaw(String key, Object element) throws EAAFException {
+ " found. Process gets stopped.");
}
- redisTemplate.opsForValue().set(as.getArtifact(), new String(assertionStoreSerializer.serialize(element)),expTime,TimeUnit.MILLISECONDS);
+ redisTemplate.opsForValue().set(as.getArtifact(), new String(assertionStoreSerializer.serialize(as)),expTime,TimeUnit.MILLISECONDS);
}