aboutsummaryrefslogtreecommitdiff
path: root/id/server/idserverlib/src/main/resources
diff options
context:
space:
mode:
authorChristian Maierhofer <cmaierhofer@iaik.tugraz.at>2016-04-26 15:35:46 +0200
committerChristian Maierhofer <cmaierhofer@iaik.tugraz.at>2016-04-26 15:35:46 +0200
commit129285d2c6fcd82a3cba7fc5345e87699129c005 (patch)
treec325262f5fc6f2f3fa5fdd5fdc0f63a6725adf64 /id/server/idserverlib/src/main/resources
parent851f8c8ed0959c75a2bd28a61ff4cd5dd49f98f5 (diff)
downloadmoa-id-spss-129285d2c6fcd82a3cba7fc5345e87699129c005.tar.gz
moa-id-spss-129285d2c6fcd82a3cba7fc5345e87699129c005.tar.bz2
moa-id-spss-129285d2c6fcd82a3cba7fc5345e87699129c005.zip
modified RedisTransactionStorage, modified beans definition
Diffstat (limited to 'id/server/idserverlib/src/main/resources')
-rw-r--r--id/server/idserverlib/src/main/resources/moaid.authentication.beans.xml20
-rw-r--r--id/server/idserverlib/src/main/resources/session.db.beans.xml58
-rw-r--r--id/server/idserverlib/src/main/resources/session.redis.beans.xml34
3 files changed, 92 insertions, 20 deletions
diff --git a/id/server/idserverlib/src/main/resources/moaid.authentication.beans.xml b/id/server/idserverlib/src/main/resources/moaid.authentication.beans.xml
index 42192d6a0..cd5fe6acf 100644
--- a/id/server/idserverlib/src/main/resources/moaid.authentication.beans.xml
+++ b/id/server/idserverlib/src/main/resources/moaid.authentication.beans.xml
@@ -81,26 +81,6 @@
class="at.gv.egovernment.moa.id.auth.modules.internal.tasks.EvaluateSSOConsentsTaskImpl"
scope="prototype"/>
- <!-- bean id="TransactionStorage"
- class="at.gv.egovernment.moa.id.storage.DBTransactionStorage"/ -->
-
- <bean id="TransactionStorage"
- class="at.gv.egovernment.moa.id.storage.RedisTransactionStorage"/>
- <!-- Redis Beans -->
- <bean id="jedisConnFactory"
- class="org.springframework.data.redis.connection.jedis.JedisConnectionFactory"
- p:use-pool="true"/>
-
- <bean id="RedisStringSerializer" class="org.springframework.data.redis.serializer.StringRedisSerializer" />
- <bean id="assertionStoreSerializer" class="org.springframework.data.redis.serializer.JacksonJsonRedisSerializer">
- <constructor-arg type="java.lang.Class" value="at.gv.egovernment.moa.id.commons.db.dao.session.AssertionStore"/>
- </bean>
-
- <bean id="redisTemplate"
- class="org.springframework.data.redis.core.RedisTemplate"
- p:connection-factory-ref="jedisConnFactory"
- p:value-serializer-ref="RedisStringSerializer"
- p:key-serializer-ref="RedisStringSerializer"/>
</beans> \ No newline at end of file
diff --git a/id/server/idserverlib/src/main/resources/session.db.beans.xml b/id/server/idserverlib/src/main/resources/session.db.beans.xml
new file mode 100644
index 000000000..0aeb24bac
--- /dev/null
+++ b/id/server/idserverlib/src/main/resources/session.db.beans.xml
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans profile="default"
+ xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:context="http://www.springframework.org/schema/context"
+ xmlns:tx="http://www.springframework.org/schema/tx"
+ xmlns:aop="http://www.springframework.org/schema/aop"
+ xmlns:p="http://www.springframework.org/schema/p"
+ xsi:schemaLocation="http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.1.xsd
+ http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd
+ http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd">
+
+
+
+ <bean id="TransactionStorage"
+ class="at.gv.egovernment.moa.id.storage.DBTransactionStorage"
+ />
+
+ <!-- MYSQL Conector -->
+ <tx:annotation-driven transaction-manager="sessionTransactionManager"/>
+
+ <bean id="sessionDataSource" class="org.apache.commons.dbcp2.BasicDataSource" lazy-init="true" destroy-method="close">
+ <aop:scoped-proxy/>
+ <property name="driverClassName" value="${moasession.hibernate.connection.driver_class}" />
+ <property name="url" value="${moasession.hibernate.connection.url}"/>
+ <property name="username" value="${moasession.hibernate.connection.username}" />
+ <property name="password" value="${moasession.hibernate.connection.password}" />
+
+ <property name="connectionProperties" value="${moasession.dbcp.connectionProperties}" />
+ <property name="initialSize" value="${moasession.dbcp.initialSize}" />
+ <property name="maxTotal" value="${moasession.dbcp.maxActive}" />
+ <property name="maxIdle" value="${moasession.dbcp.maxIdle}" />
+ <property name="minIdle" value="${moasession.dbcp.minIdle}" />
+ <!-- property name="maxWait" value="${moasession.dbcp.maxWaitMillis}" / -->
+ <property name="testOnBorrow" value="${moasession.dbcp.testOnBorrow}" />
+ <property name="testOnReturn" value="${moasession.dbcp.testOnReturn}" />
+ <property name="testWhileIdle" value="${moasession.dbcp.testWhileIdle}" />
+ <property name="validationQuery" value="${moasession.dbcp.validationQuery}" />
+ </bean>
+
+ <bean id="sessionJpaVendorAdapter" class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
+ <property name="showSql" value="${moasession.hibernate.show_sql}" />
+ <property name="generateDdl" value="${moasession.jpaVendorAdapter.generateDdl}" />
+ <property name="databasePlatform" value="${moasession.hibernate.dialect}" />
+ </bean>
+
+ <bean name="session" id="session" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean" depends-on="sessionDataSource">
+ <property name="dataSource" ref="sessionDataSource" />
+ <property name="jpaVendorAdapter" ref="sessionJpaVendorAdapter" />
+ <property name="persistenceUnitName" value="session" />
+ </bean>
+
+ <bean name="sessionTransactionManager" id="sessionTransactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">
+ <property name="entityManagerFactory" ref="session" />
+ </bean>
+
+</beans> \ No newline at end of file
diff --git a/id/server/idserverlib/src/main/resources/session.redis.beans.xml b/id/server/idserverlib/src/main/resources/session.redis.beans.xml
new file mode 100644
index 000000000..421159d08
--- /dev/null
+++ b/id/server/idserverlib/src/main/resources/session.redis.beans.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans profile="redis"
+ xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:context="http://www.springframework.org/schema/context"
+ xmlns:tx="http://www.springframework.org/schema/tx"
+ xmlns:aop="http://www.springframework.org/schema/aop"
+ xmlns:p="http://www.springframework.org/schema/p"
+ xsi:schemaLocation="http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.1.xsd
+ http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd
+ http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd">
+
+
+ <bean id="TransactionStorage"
+ class="at.gv.egovernment.moa.id.storage.RedisTransactionStorage"/>
+
+ <!-- Redis Beans -->
+ <bean id="jedisConnFactory"
+ class="org.springframework.data.redis.connection.jedis.JedisConnectionFactory"
+ p:use-pool="true"/>
+
+ <bean id="RedisStringSerializer" class="org.springframework.data.redis.serializer.StringRedisSerializer" />
+ <bean id="assertionStoreSerializer" class="org.springframework.data.redis.serializer.JacksonJsonRedisSerializer">
+ <constructor-arg type="java.lang.Class" value="at.gv.egovernment.moa.id.commons.db.dao.session.AssertionStore"/>
+ </bean>
+
+ <bean id="redisTemplate"
+ class="org.springframework.data.redis.core.RedisTemplate"
+ p:connection-factory-ref="jedisConnFactory"
+ p:value-serializer-ref="RedisStringSerializer"
+ p:key-serializer-ref="RedisStringSerializer"/>
+
+</beans> \ No newline at end of file