diff options
author | Christian Maierhofer <cmaierhofer@iaik.tugraz.at> | 2016-06-29 11:18:55 +0200 |
---|---|---|
committer | Christian Maierhofer <cmaierhofer@iaik.tugraz.at> | 2016-06-29 11:18:55 +0200 |
commit | 7ef57c3ceb296f06aa76ba3e6d3499b3a2772aff (patch) | |
tree | d39951674642c0e2381dfa36084ae9e412440e05 /id/server/moa-id-commons/src/main/resources | |
parent | ad156aaec0e4e8cd97a6eee6aa96e9d5700d0b4f (diff) | |
download | moa-id-spss-7ef57c3ceb296f06aa76ba3e6d3499b3a2772aff.tar.gz moa-id-spss-7ef57c3ceb296f06aa76ba3e6d3499b3a2772aff.tar.bz2 moa-id-spss-7ef57c3ceb296f06aa76ba3e6d3499b3a2772aff.zip |
using annotations for hibernate configuration now
Diffstat (limited to 'id/server/moa-id-commons/src/main/resources')
-rw-r--r-- | id/server/moa-id-commons/src/main/resources/statistic.logging.beans.xml | 12 |
1 files changed, 7 insertions, 5 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 index fc8edf44e..5f80c6439 100644 --- 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 @@ -11,8 +11,8 @@ 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:annotation-config></context:annotation-config> + <tx:annotation-driven transaction-manager="statisticLogTransactionManager"/> <bean id="statisticLogDataSource" class="org.apache.commons.dbcp2.BasicDataSource" lazy-init="true" destroy-method="close"> <aop:scoped-proxy/> @@ -35,7 +35,9 @@ <bean id="statisticLogSessionFactory" class="org.springframework.orm.hibernate4.LocalSessionFactoryBean"> <property name="dataSource" ref="statisticLogDataSource"/> + <property name="packagesToScan" value="at.gv.egovernment.moa.id.commons.db.dao.statistic" /> <property name="hibernateProperties"> + <props> <prop key="hibernate.dialect">${advancedlogging.hibernate.dialect}</prop> <prop key="hibernate.show_sql">${advancedlogging.hibernate.show_sql}</prop> @@ -52,7 +54,7 @@ </bean> <bean name="statisticLogTransactionManager" id="statisticLogTransactionManager" class="org.springframework.orm.jpa.JpaTransactionManager"> - <property name="entityManagerFactory" ref="statisticEntityManagerFactory" /> + <property name="entityManagerFactory" ref="statistic" /> </bean> <bean id="statisticJpaVendorAdapter" class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter"> @@ -61,13 +63,13 @@ <property name="databasePlatform" value="${advancedlogging.hibernate.dialect}" /> </bean> - <bean name="statisticLog" id="statisticEntityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"> + <bean name="statistic" id="statistic" 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 |