aboutsummaryrefslogtreecommitdiff
path: root/id/server/moa-id-commons/src/main/resources
diff options
context:
space:
mode:
authorThomas Lenz <tlenz@iaik.tugraz.at>2015-07-02 07:34:08 +0200
committerThomas Lenz <tlenz@iaik.tugraz.at>2015-07-02 07:34:08 +0200
commit409e23a07616387d675e065ceac7172997fef5b7 (patch)
treee77ab5bb92a492fc6d2e91b03aad9b1766e37684 /id/server/moa-id-commons/src/main/resources
parent5bc01dab26425144a41dbece04b642fb963e1315 (diff)
downloadmoa-id-spss-409e23a07616387d675e065ceac7172997fef5b7.tar.gz
moa-id-spss-409e23a07616387d675e065ceac7172997fef5b7.tar.bz2
moa-id-spss-409e23a07616387d675e065ceac7172997fef5b7.zip
new files for key/value config
Diffstat (limited to 'id/server/moa-id-commons/src/main/resources')
-rw-r--r--id/server/moa-id-commons/src/main/resources/configuration.beans.xml56
1 files changed, 56 insertions, 0 deletions
diff --git a/id/server/moa-id-commons/src/main/resources/configuration.beans.xml b/id/server/moa-id-commons/src/main/resources/configuration.beans.xml
new file mode 100644
index 000000000..ea0e7c78d
--- /dev/null
+++ b/id/server/moa-id-commons/src/main/resources/configuration.beans.xml
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans 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"
+ 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">
+
+ <context:annotation-config />
+
+ <context:property-placeholder location="${location}"/>
+
+ <bean id="configPropertyDao"
+ class="at.gv.egovernment.moa.id.commons.db.dao.config.DatabaseConfigPropertyImpl"/>
+
+ <bean id="moaidconfig" class="at.gv.egovernment.moa.id.commons.config.persistence.MOAIDConfigurationImpl" />
+<!-- <property name="configPropertyDao" ref="configPropertyDao" />
+ </bean> -->
+
+
+<!-- <bean id="configRead" class="at.gv.egovernment.moa.id.commons.db.NewConfigurationDBRead"/> -->
+<!-- <bean id="configWrite" class="at.gv.egovernment.moa.id.commons.db.NewConfigurationDBWrite"/> -->
+
+ <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" lazy-init="true" destroy-method="close">
+ <aop:scoped-proxy/>
+ <property name="driverClassName" value="${configuration.hibernate.connection.driver_class}" />
+ <property name="url" value="${configuration.hibernate.connection.url}"/>
+ <property name="username" value="${configuration.hibernate.connection.username}" />
+ <property name="password" value="${configuration.hibernate.connection.password}" />
+ <property name="testOnBorrow" value="true" />
+ <property name="validationQuery" value="SELECT 1" />
+ </bean>
+
+
+ <bean id="jpaVendorAdapter" class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
+ <property name="showSql" value="true" />
+ <property name="generateDdl" value="${jpaVendorAdapter.generateDdl}" />
+ <property name="databasePlatform" value="${configuration.hibernate.dialect}" />
+ </bean>
+
+
+ <bean name="config" id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
+ <property name="dataSource" ref="dataSource" />
+ <property name="jpaVendorAdapter" ref="jpaVendorAdapter" />
+ <property name="persistenceUnitName" value="config" />
+ </bean>
+
+ <bean name="transactionManager" id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">
+ <property name="entityManagerFactory" ref="entityManagerFactory" />
+ </bean>
+ <tx:annotation-driven transaction-manager="transactionManager"/>
+
+</beans> \ No newline at end of file