aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--id/server/idserverlib/pom.xml2
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/storage/RedisTransactionStorage.java9
-rw-r--r--id/server/idserverlib/src/main/resources/session.redis.beans.xml3
-rw-r--r--pom.xml10
4 files changed, 16 insertions, 8 deletions
diff --git a/id/server/idserverlib/pom.xml b/id/server/idserverlib/pom.xml
index f819329f3..f15dea961 100644
--- a/id/server/idserverlib/pom.xml
+++ b/id/server/idserverlib/pom.xml
@@ -489,7 +489,7 @@
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-redis</artifactId>
- <version>2.1.0.RELEASE</version>
+ <version>${org.springframework.data.spring-data-redis}</version>
</dependency>
<dependency>
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);
}
diff --git a/id/server/idserverlib/src/main/resources/session.redis.beans.xml b/id/server/idserverlib/src/main/resources/session.redis.beans.xml
index feda9b273..a352cf9ab 100644
--- a/id/server/idserverlib/src/main/resources/session.redis.beans.xml
+++ b/id/server/idserverlib/src/main/resources/session.redis.beans.xml
@@ -24,7 +24,8 @@
p:port="${redis.port}"/>
<bean id="RedisStringSerializer" class="org.springframework.data.redis.serializer.StringRedisSerializer" />
- <bean id="assertionStoreSerializer" class="org.springframework.data.redis.serializer.JacksonJsonRedisSerializer">
+
+ <bean id="assertionStoreSerializer" class="org.springframework.data.redis.serializer.Jackson2JsonRedisSerializer">
<constructor-arg type="java.lang.Class" value="at.gv.egovernment.moa.id.commons.db.dao.session.AssertionStore"/>
</bean>
diff --git a/pom.xml b/pom.xml
index 04fa9b53a..26e120adf 100644
--- a/pom.xml
+++ b/pom.xml
@@ -26,8 +26,9 @@
<!-- =================================================================================== -->
<egiz.eaaf.version>1.0.5-Snapshot</egiz.eaaf.version>
- <org.springframework.version>5.1.0.RELEASE</org.springframework.version>
- <org.springframework.data.spring-data-jpa>2.1.0.RELEASE</org.springframework.data.spring-data-jpa>
+ <org.springframework.version>5.1.3.RELEASE</org.springframework.version>
+ <org.springframework.data.spring-data-jpa>2.1.3.RELEASE</org.springframework.data.spring-data-jpa>
+ <org.springframework.data.spring-data-redis>2.1.3.RELEASE</org.springframework.data.spring-data-redis>
<surefire.version>2.22.0</surefire.version>
<jaxb.version>2.3.0</jaxb.version>
@@ -738,6 +739,11 @@
<version>${org.springframework.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.springframework.data</groupId>
+ <artifactId>spring-data-redis</artifactId>
+ <version>${org.springframework.data.spring-data-redis}</version>
+ </dependency>
<!-- the core, which includes Streaming API, shared low-level abstractions (but NOT data-binding) -->