aboutsummaryrefslogtreecommitdiff
path: root/id/server/idserverlib
diff options
context:
space:
mode:
authorChristian Maierhofer <cmaierhofer@iaik.tugraz.at>2016-06-29 11:18:55 +0200
committerChristian Maierhofer <cmaierhofer@iaik.tugraz.at>2016-06-29 11:18:55 +0200
commit7ef57c3ceb296f06aa76ba3e6d3499b3a2772aff (patch)
treed39951674642c0e2381dfa36084ae9e412440e05 /id/server/idserverlib
parentad156aaec0e4e8cd97a6eee6aa96e9d5700d0b4f (diff)
downloadmoa-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/idserverlib')
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/advancedlogging/StatisticLogger.java1
-rw-r--r--id/server/idserverlib/src/main/resources/session.common.beans.xml22
-rw-r--r--id/server/idserverlib/src/main/resources/session.db.beans.xml20
3 files changed, 20 insertions, 23 deletions
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/advancedlogging/StatisticLogger.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/advancedlogging/StatisticLogger.java
index d15d80efc..34bdd350b 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/advancedlogging/StatisticLogger.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/advancedlogging/StatisticLogger.java
@@ -62,7 +62,6 @@ import at.gv.egovernment.moa.logging.Logger;
import at.gv.egovernment.moa.util.MiscUtil;
@Service("StatisticLogger")
-@Profile("advancedLogOn")
public class StatisticLogger implements IStatisticLogger{
private static final String GENERIC_LOCALBKU = ":3496/https-security-layer-request";
diff --git a/id/server/idserverlib/src/main/resources/session.common.beans.xml b/id/server/idserverlib/src/main/resources/session.common.beans.xml
index e63e87ae1..defa47ec0 100644
--- a/id/server/idserverlib/src/main/resources/session.common.beans.xml
+++ b/id/server/idserverlib/src/main/resources/session.common.beans.xml
@@ -33,7 +33,7 @@
<property name="validationQuery" value="${moasession.dbcp.validationQuery}" />
</bean>
- <bean id="sessionFactory" class="org.springframework.orm.hibernate4.LocalSessionFactoryBean">
+ <bean id="sessionSessionFactory" class="org.springframework.orm.hibernate4.LocalSessionFactoryBean">
<property name="dataSource" ref="sessionDataSource"/>
<property name="packagesToScan" value="at.gv.egovernment.moa.id.commons.db.dao.session" />
<property name="hibernateProperties">
@@ -48,9 +48,27 @@
</property>
</bean>
+ <!-- MYSQL Conector -->
+ <tx:annotation-driven transaction-manager="sessionTransactionManager"/>
+
+ <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="packagesToScan" value="at.gv.egovernment.moa.id.commons.db.dao.session" />
+ <property name="persistenceUnitName" value="session" />
+ </bean>
+
+ <bean name="sessionTransactionManager" id="sessionTransactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">
+ <property name="entityManagerFactory" ref="session" />
+ </bean>
<bean id="moaSessionDBUtils" class="at.gv.egovernment.moa.id.commons.db.MOASessionDBUtils">
</bean>
-
</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
index 47aa9fde9..5ed390ffe 100644
--- a/id/server/idserverlib/src/main/resources/session.db.beans.xml
+++ b/id/server/idserverlib/src/main/resources/session.db.beans.xml
@@ -17,24 +17,4 @@
class="at.gv.egovernment.moa.id.storage.DBTransactionStorage"
/>
- <!-- MYSQL Conector -->
- <tx:annotation-driven transaction-manager="sessionTransactionManager"/>
-
- <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="packagesToScan" value="at.gv.egovernment.moa.id.commons.db.dao.session" />
- <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