TASKPM/libreplan-business/src/main/resources/libreplan-business-spring-config.xml

152 lines
6.6 KiB
XML
Raw Normal View History

2009-04-14 17:51:03 +02:00
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-4.3.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.3.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-4.3.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.3.xsd">
<aop:aspectj-autoproxy/>
<!-- Data source -->
<bean id="dataSource" class="org.springframework.jndi.JndiObjectFactoryBean"
p:jndiName="${dataSource.jndiName}" p:resourceRef="true" />
<!-- Letting Spring do automatically exception translation -->
<bean class="org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor"/>
<!-- Hibernate Session Factory -->
2009-04-14 17:51:03 +02:00
<bean id="sessionFactory"
class="org.springframework.orm.hibernate5.LocalSessionFactoryBean"
p:dataSource-ref="dataSource"
p:configLocation="classpath:/libreplan-business-hibernate.cfg.xml">
2009-04-14 17:51:03 +02:00
<property name="mappingResources">
<list>
<value>
org/libreplan/business/advance/entities/Advance.hbm.xml
</value>
<value>
org/libreplan/business/resources/entities/Resources.hbm.xml
</value>
<value>
org/libreplan/business/orders/entities/Orders.hbm.xml
</value>
<value>
org/libreplan/business/templates/entities/Templates.hbm.xml
</value>
<value>
org/libreplan/business/planner/entities/Tasks.hbm.xml
</value>
<value>
org/libreplan/business/planner/entities/ResourceAllocations.hbm.xml
</value>
<value>
org/libreplan/business/workreports/entities/WorkReports.hbm.xml
</value>
<value>
org/libreplan/business/calendars/entities/Calendars.hbm.xml
</value>
<value>
org/libreplan/business/labels/entities/Labels.hbm.xml
</value>
<value>
org/libreplan/business/requirements/entities/Requirements.hbm.xml
</value>
<value>
org/libreplan/business/common/entities/Configuration.hbm.xml
</value>
<value>
org/libreplan/business/materials/entities/Materials.hbm.xml
</value>
<value>
org/libreplan/business/users/entities/Users.hbm.xml
</value>
<value>
org/libreplan/business/costcategories/entities/CostCategories.hbm.xml
</value>
<value>
org/libreplan/business/qualityforms/entities/QualityForms.hbm.xml
</value>
<value>
org/libreplan/business/common/entities/EntitySequence.hbm.xml
</value>
<value>
org/libreplan/business/externalcompanies/entities/ExternalCompanies.hbm.xml
</value>
<value>
org/libreplan/business/planner/entities/AdvanceConsolidations.hbm.xml
</value>
<value>
org/libreplan/business/planner/entities/SubcontractorCommunication.hbm.xml
</value>
<value>
org/libreplan/business/scenarios/entities/Scenarios.hbm.xml
</value>
<value>
org/libreplan/business/expensesheets/entities/ExpenseSheets.hbm.xml
</value>
<value>
org/libreplan/business/common/entities/Connector.hbm.xml
</value>
<value>
org/libreplan/business/common/entities/JobSchedulerConfiguration.hbm.xml
</value>
<value>
org/libreplan/business/email/entities/Email.hbm.xml
</value>
2015-12-04 15:39:56 +02:00
<value>
org/libreplan/business/logs/entities/Logs.hbm.xml
</value>
<value>
org/libreplan/business/common/entities/Limits.hbm.xml
</value>
</list>
2009-04-14 17:51:03 +02:00
</property>
</bean>
2009-04-14 17:51:03 +02:00
<!-- Spring Transaction manager -->
<bean id="transactionManager"
class="org.springframework.orm.hibernate5.HibernateTransactionManager"
p:sessionFactory-ref="sessionFactory" />
<!-- Enable configuration of transactional behavior based on annotations -->
<tx:annotation-driven transaction-manager="transactionManager" />
<!-- For enabling annotation-based configuration (in particular, required for Autowired annotation) -->
<context:annotation-config />
<context:component-scan base-package="org.libreplan.business" />
<bean id="registry" class="org.libreplan.business.common.Registry" factory-method="getInstance" />
<bean id="criterionRequirementOrderElementHandler"
class="org.libreplan.business.orders.entities.CriterionRequirementOrderElementHandler"
factory-method="getInstance" />
<bean id="versionInformation"
class="org.libreplan.business.common.VersionInformation"
factory-method="getInstance"
lazy-init="false">
<property name="projectVersion" value="${project.version}"/>
</bean>
<bean id="configuration"
class="org.libreplan.business.common.Configuration"
factory-method="getInstance"
lazy-init="false">
<property name="defaultPasswordsControl" value="${default.passwordsControl}"/>
<property name="exampleUsersDisabled" value="${default.exampleUsersDisabled}"/>
<property name="emailSendingEnabled" value="${default.emailSendingEnabled}"/>
2016-12-12 16:38:56 +02:00
<property name="deleteAllProjectsButtonDisabled" value="${default.deleteAllProjectsButtonDisabled}"/>
</bean>
<bean id="scenarioManager" class="org.libreplan.business.scenarios.OnlyMainScenarioAwareManager"/>
2009-04-14 17:51:03 +02:00
</beans>