aboutsummaryrefslogtreecommitdiff
path: root/id/server/moa-id-commons/src/main/resources/statistic.logging.beans.xml
diff options
context:
space:
mode:
authorChristian Maierhofer <cmaierhofer@iaik.tugraz.at>2016-06-28 13:47:52 +0200
committerChristian Maierhofer <cmaierhofer@iaik.tugraz.at>2016-06-28 13:47:52 +0200
commit7717d75918fb63ee7e9d7bf31de2696577b7e991 (patch)
tree789f089649f27825e5570b8f6a0675474de5e6a5 /id/server/moa-id-commons/src/main/resources/statistic.logging.beans.xml
parent0d4863abf480dd35d5ffa87f09604096aae905bc (diff)
downloadmoa-id-spss-7717d75918fb63ee7e9d7bf31de2696577b7e991.tar.gz
moa-id-spss-7717d75918fb63ee7e9d7bf31de2696577b7e991.tar.bz2
moa-id-spss-7717d75918fb63ee7e9d7bf31de2696577b7e991.zip
statisticlogger dbcp connection pool
Diffstat (limited to 'id/server/moa-id-commons/src/main/resources/statistic.logging.beans.xml')
-rw-r--r--id/server/moa-id-commons/src/main/resources/statistic.logging.beans.xml73
1 files changed, 73 insertions, 0 deletions
diff --git a/id/server/moa-id-commons/src/main/resources/statistic.logging.beans.xml b/id/server/moa-id-commons/src/main/resources/statistic.logging.beans.xml
new file mode 100644
index 000000000..fc8edf44e
--- /dev/null
+++ b/id/server/moa-id-commons/src/main/resources/statistic.logging.beans.xml
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans profile="advancedLogOn"
+ 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="statisticLogDataSource" class="org.apache.commons.dbcp2.BasicDataSource" lazy-init="true" destroy-method="close">
+ <aop:scoped-proxy/>
+ <property name="driverClassName" value="${advancedlogging.hibernate.connection.driver_class}" />
+ <property name="url" value="${advancedlogging.hibernate.connection.url}"/>
+ <property name="username" value="${advancedlogging.hibernate.connection.username}" />
+ <property name="password" value="${advancedlogging.hibernate.connection.password}" />
+
+ <property name="connectionProperties" value="${advancedlogging.dbcp.connectionProperties}" />
+ <property name="initialSize" value="${advancedlogging.dbcp.initialSize}" />
+ <property name="maxTotal" value="${advancedlogging.dbcp.maxActive}" />
+ <property name="maxIdle" value="${advancedlogging.dbcp.maxIdle}" />
+ <property name="minIdle" value="${advancedlogging.dbcp.minIdle}" />
+ <!-- property name="maxWait" value="${moasession.dbcp.maxWaitMillis}" / -->
+ <property name="testOnBorrow" value="${advancedlogging.dbcp.testOnBorrow}" />
+ <property name="testOnReturn" value="${advancedlogging.dbcp.testOnReturn}" />
+ <property name="testWhileIdle" value="${advancedlogging.dbcp.testWhileIdle}" />
+ <property name="validationQuery" value="${advancedlogging.dbcp.validationQuery}" />
+ </bean>
+
+ <bean id="statisticLogSessionFactory" class="org.springframework.orm.hibernate4.LocalSessionFactoryBean">
+ <property name="dataSource" ref="statisticLogDataSource"/>
+ <property name="hibernateProperties">
+ <props>
+ <prop key="hibernate.dialect">${advancedlogging.hibernate.dialect}</prop>
+ <prop key="hibernate.show_sql">${advancedlogging.hibernate.show_sql}</prop>
+ <prop key="hibernate.hbm2ddl.auto">${advancedlogging.hibernate.hbm2ddl.auto}</prop>
+ <prop key="current_session_context_class">${advancedlogging.hibernate.current_session_context_class}</prop>
+ <prop key="hibernate.transaction.flush_before_completion">${advancedlogging.hibernate.transaction.flush_before_completion}</prop>
+ <prop key="hibernate.transaction.auto_close_session">${advancedlogging.hibernate.transaction.auto_close_session}</prop>
+ </props>
+ </property>
+ </bean>
+
+
+ <bean id="statisticLogDBUtils" class="at.gv.egovernment.moa.id.commons.db.StatisticLogDBUtils">
+ </bean>
+
+ <bean name="statisticLogTransactionManager" id="statisticLogTransactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">
+ <property name="entityManagerFactory" ref="statisticEntityManagerFactory" />
+ </bean>
+
+ <bean id="statisticJpaVendorAdapter" class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
+ <property name="showSql" value="${advancedlogging.hibernate.show_sql}" />
+ <property name="generateDdl" value="${advancedlogging.jpaVendorAdapter.generateDdl}" />
+ <property name="databasePlatform" value="${advancedlogging.hibernate.dialect}" />
+ </bean>
+
+ <bean name="statisticLog" id="statisticEntityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
+ <property name="dataSource" ref="statisticLogDataSource" />
+ <property name="jpaVendorAdapter" ref="statisticJpaVendorAdapter" />
+ <property name="packagesToScan" value="at.gv.egovernment.moa.id.commons.db.dao.statistic" />
+ <property name="persistenceUnitName" value="statistic" />
+ </bean>
+ <tx:annotation-driven transaction-manager="statisticLogTransactionManager"/>
+
+
+</beans> \ No newline at end of file