argos/dmp-backend/src/main/webapp/WEB-INF/applicationContext.xml

101 lines
5.8 KiB
XML

<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"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd">
<context:property-placeholder location="classpath*:**/dmp.properties" />
<tx:annotation-driven transaction-manager="transactionManager" proxy-target-class="true"/>
<bean class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor" />
<bean id="jpaDialect" class="org.springframework.orm.jpa.vendor.HibernateJpaDialect" />
<!-- <bean id="remoteFileRepositoryHostname" class="java.lang.String" /> -->
<bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">
<property name="entityManagerFactory" ref="emf" />
<property name="jpaDialect" ref="jpaDialect" />
</bean>
<bean id="springApplicationContext" class="dao.SpringJpaDaoFactory" />
<bean id="databaseColumnType" class="typedefinition.PostgreSQLDatabaseColumnType" />
<bean id="emf" class="org.springframework.orm.jpa.LocalEntityManagerFactoryBean">
<property name="persistenceUnitName" value="DMPBackendPersistence" />
<property name="jpaProperties">
<props>
<prop key="javax.persistence.jdbc.driver">${persistence.jdbc.driver}</prop>
<prop key="javax.persistence.jdbc.url">${persistence.jdbc.url}</prop>
<prop key="hibernate.connection.username">${persistence.dbusername}</prop>
<prop key="hibernate.connection.password">${persistence.dbpassword}</prop>
<prop key="hibernate.show_sql">${persistence.hibernate.show_sql}</prop>
<prop key="hibernate.hbm2ddl.auto">${persistence.hibernate.hbm2dll}</prop>
<prop key="hibernate.dialect">${persistence.hibernate.dialect}</prop>
<prop key="hibernate.jdbc.batch_size">${persistence.hibernate.jdbc.batch_size}</prop>
<prop key="hibernate.order_inserts">${persistence.hibernate.order_inserts}</prop>
<prop key="hibernate.order_updates">${persistence.hibernate.order_updates}</prop>
<prop key="hibernate.jdbc.batch_versioned_data">${persistence.hibernate.batch_versioned_data}</prop>
<prop key="hibernate.connection.handling_mode">${persistence.hibernate.jdbc.batch_versioned_data}</prop>
<prop key="hibernate.connection.release_mode">on_close</prop>
<prop key="hibernate.connection.provider_class">${persistence.hibernate.connectionpool.provider_class}</prop>
<prop key="hibernate.c3p0.min_size">${persistence.hibernate.connectionpool.c3p0.min_size}</prop>
<prop key="hibernate.c3p0.max_size">${persistence.hibernate.connectionpool.c3p0.max_size}</prop>
<prop key="hibernate.c3p0.timeout">0</prop>
<!-- <prop key="hibernate.c3p0.timeout">${persistence.hibernate.connectionpool.c3p0.timeout}</prop> -->
<prop key="hibernate.c3p0.max_statements">${persistence.hibernate.connectionpool.c3p0.max_statements}</prop>
<prop key="hibernate.c3p0.acquire_retry_attempts">${persistence.hibernate.connectionpool.c3p0.acquire_retry_attempts}</prop>
<prop key="hibernate.c3p0.acquire_retry_delay">${persistence.hibernate.connectionpool.c3p0.acquire_retry_delay}</prop>
<prop key="hibernate.c3p0.idle_test_period">${persistence.hibernate.connectionpool.c3p0.idle_test_period}</prop>
<prop key="hibernate.c3p0.break_after_acquire_failure">${persistence.hibernate.connectionpool.c3p0.break_after_acquire_failure}</prop>
<prop key="hibernate.c3p0.idle_connection_test_period">${persistence.hibernate.connectionpool.c3p0.idle_connection_test_period}</prop>
<prop key="hibernate.c3p0.test_connection_on_checkin">${persistence.hibernate.connectionpool.c3p0.test_connection_on_checkin}</prop>
<prop key="hibernate.c3p0.test_connection_on_checkout">${persistence.hibernate.connectionpool.c3p0.test_connection_on_checkout}</prop>
<prop key="hibernate.c3p0.preferred_test_query">${persistence.hibernate.connectionpool.c3p0.preferred_test_query}</prop>
</props>
</property>
</bean>
<bean id="organisationDao" class="dao.entities.OrganisationDaoImpl" />
<bean id="dataRepositoryDao" class="dao.entities.DataRepositoryDaoImpl" />
<bean id="datasetDao" class="dao.entities.DatasetDaoImpl" />
<bean id="datasetProfileDao" class="dao.entities.DatasetProfileDaoImpl" />
<bean id="datasetProfileRulesetDao" class="dao.entities.DatasetProfileRulesetDaoImpl" />
<bean id="datasetProfileViewstyleDao" class="dao.entities.DatasetProfileViewstyleDaoImpl" />
<bean id="datasetRegistryDao" class="dao.entities.DatasetRegistryDaoImpl" />
<bean id="datasetServiceDao" class="dao.entities.DatasetServiceDaoImpl" />
<bean id="dMPDao" class="dao.entities.DMPDaoImpl" />
<bean id="dMPProfileDao" class="dao.entities.DMPProfileDaoImpl" />
<bean id="dMPResearcherDao" class="dao.entities.DMPResearcherDaoImpl" />
<bean id="projectDao" class="dao.entities.ProjectDaoImpl" />
<bean id="registryDao" class="dao.entities.RegistryDaoImpl" />
<bean id="researcherDao" class="dao.entities.ResearcherDaoImpl" />
<bean id="serviceDao" class="dao.entities.ServiceDaoImpl" />
<context:annotation-config />
<context:component-scan base-package="entities" />
<context:component-scan base-package="dao" />
<context:component-scan base-package="core" />
<context:component-scan base-package="rest" />
<!-- <context:component-scan base-package="controller" /> -->
</beans>