diff options
author | Christian Maierhofer <cmaierhofer@iaik.tugraz.at> | 2016-04-28 13:35:55 +0200 |
---|---|---|
committer | Christian Maierhofer <cmaierhofer@iaik.tugraz.at> | 2016-04-28 13:35:55 +0200 |
commit | 61661f2ea4978d56691f7a672469c6d43e9dba41 (patch) | |
tree | 2ea7048bfffa662ee6b2d04858f00fb1cb6a2fea /id/server/idserverlib/src/main/resources | |
parent | 6f353de9f09b26440f67f62ba8186ae82f16adb5 (diff) | |
download | moa-id-spss-61661f2ea4978d56691f7a672469c6d43e9dba41.tar.gz moa-id-spss-61661f2ea4978d56691f7a672469c6d43e9dba41.tar.bz2 moa-id-spss-61661f2ea4978d56691f7a672469c6d43e9dba41.zip |
Modifiing MOASessionDBUtils
Diffstat (limited to 'id/server/idserverlib/src/main/resources')
-rw-r--r-- | id/server/idserverlib/src/main/resources/session.common.beans.xml | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/id/server/idserverlib/src/main/resources/session.common.beans.xml b/id/server/idserverlib/src/main/resources/session.common.beans.xml new file mode 100644 index 000000000..abc3c3200 --- /dev/null +++ b/id/server/idserverlib/src/main/resources/session.common.beans.xml @@ -0,0 +1,54 @@ +<?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"> + + <context:annotation-config/> + + <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="sessionFactory" class="org.springframework.orm.hibernate4.LocalSessionFactoryBean"> + <property name="dataSource" ref="sessionDataSource"/> + <property name="packagesToScan" value="at.gv.egovernment.moa.id.commons.db" /> + <property name="hibernateProperties"> + <props> + <prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop> + <prop key="hibernate.show_sql">${moasession.hibernate.show_sql}</prop> + <prop key="hibernate.hbm2ddl.auto">update</prop> + <prop key="current_session_context_class">thread</prop> + <prop key="hibernate.transaction.flush_before_completion">true</prop> + <prop key="hibernate.transaction.auto_close_session">true</prop> + </props> + </property> + </bean> + + <bean id="moaSessionDBUtils" class="at.gv.egovernment.moa.id.commons.db.MOASessionDBUtils"> + </bean> + + +</beans>
\ No newline at end of file |