2009-04-14 17:51:03 +02:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
|
|
|
|
|
|
<beans xmlns="http://www.springframework.org/schema/beans"
|
2009-05-14 19:19:59 +02:00
|
|
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
|
2010-03-16 12:30:21 +01:00
|
|
|
xmlns:aop="http://www.springframework.org/schema/aop"
|
2009-05-14 19:19:59 +02:00
|
|
|
xmlns:tx="http://www.springframework.org/schema/tx" xmlns:context="http://www.springframework.org/schema/context"
|
2009-04-14 17:51:03 +02:00
|
|
|
xsi:schemaLocation="
|
|
|
|
|
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
|
|
|
|
|
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
|
2010-03-16 12:30:21 +01:00
|
|
|
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
|
2009-04-14 17:51:03 +02:00
|
|
|
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd">
|
2009-05-14 19:19:59 +02:00
|
|
|
|
2010-03-16 12:30:21 +01:00
|
|
|
<aop:aspectj-autoproxy/>
|
|
|
|
|
|
2009-04-14 17:51:03 +02:00
|
|
|
<!-- Data source. -->
|
2009-05-14 19:19:59 +02:00
|
|
|
<bean id="dataSource" class="org.springframework.jndi.JndiObjectFactoryBean"
|
|
|
|
|
p:jndiName="${dataSource.jndiName}" p:resourceRef="true" />
|
|
|
|
|
|
2009-08-05 14:07:15 +02:00
|
|
|
<!-- Letting Spring do automatically exception translation -->
|
|
|
|
|
<bean class="org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor"/>
|
|
|
|
|
|
2011-10-28 08:17:54 +02:00
|
|
|
<bean id="hibernateDatabaseModificationsListener" class="org.libreplan.business.hibernate.notification.HibernateDatabaseModificationsListener" scope="singleton"/>
|
2010-09-09 01:14:29 +02:00
|
|
|
|
2009-04-14 17:51:03 +02:00
|
|
|
<!-- Hibernate Session Factory. -->
|
|
|
|
|
<bean id="sessionFactory"
|
2009-07-30 09:35:03 +02:00
|
|
|
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"
|
2011-10-28 08:17:54 +02:00
|
|
|
p:dataSource-ref="dataSource" p:configLocation="classpath:/libreplan-business-hibernate.cfg.xml">
|
2009-04-14 17:51:03 +02:00
|
|
|
<property name="mappingResources">
|
|
|
|
|
<list>
|
2009-07-30 09:35:03 +02:00
|
|
|
<value>
|
2011-10-28 08:17:54 +02:00
|
|
|
org/libreplan/business/advance/entities/Advance.hbm.xml
|
2009-07-30 09:35:03 +02:00
|
|
|
</value>
|
2009-05-14 19:19:59 +02:00
|
|
|
<value>
|
2011-10-28 08:17:54 +02:00
|
|
|
org/libreplan/business/resources/entities/Resources.hbm.xml
|
2009-05-14 19:19:59 +02:00
|
|
|
</value>
|
2009-05-28 20:19:12 +02:00
|
|
|
<value>
|
2011-10-28 08:17:54 +02:00
|
|
|
org/libreplan/business/orders/entities/Orders.hbm.xml
|
2009-05-28 20:19:12 +02:00
|
|
|
</value>
|
2010-01-03 17:18:27 +01:00
|
|
|
<value>
|
2011-10-28 08:17:54 +02:00
|
|
|
org/libreplan/business/templates/entities/Templates.hbm.xml
|
2010-01-03 17:18:27 +01:00
|
|
|
</value>
|
2009-07-07 21:37:11 +02:00
|
|
|
<value>
|
2011-10-28 08:17:54 +02:00
|
|
|
org/libreplan/business/planner/entities/Tasks.hbm.xml
|
2009-07-07 21:37:11 +02:00
|
|
|
</value>
|
2009-07-24 13:45:01 +02:00
|
|
|
<value>
|
2011-10-28 08:17:54 +02:00
|
|
|
org/libreplan/business/planner/entities/ResourceAllocations.hbm.xml
|
2009-07-24 13:45:01 +02:00
|
|
|
</value>
|
2009-07-15 12:22:41 +02:00
|
|
|
<value>
|
2011-10-28 08:17:54 +02:00
|
|
|
org/libreplan/business/workreports/entities/WorkReports.hbm.xml
|
2009-07-15 12:22:41 +02:00
|
|
|
</value>
|
2009-08-13 13:00:55 +02:00
|
|
|
<value>
|
2011-10-28 08:17:54 +02:00
|
|
|
org/libreplan/business/calendars/entities/Calendars.hbm.xml
|
2009-08-13 13:00:55 +02:00
|
|
|
</value>
|
2009-09-14 09:07:51 +02:00
|
|
|
<value>
|
2011-10-28 08:17:54 +02:00
|
|
|
org/libreplan/business/labels/entities/Labels.hbm.xml
|
2009-09-14 09:07:51 +02:00
|
|
|
</value>
|
2009-10-27 16:25:14 +01:00
|
|
|
<value>
|
2011-10-28 08:17:54 +02:00
|
|
|
org/libreplan/business/requirements/entities/Requirements.hbm.xml
|
2009-10-27 16:25:14 +01:00
|
|
|
</value>
|
2009-11-17 12:36:14 +01:00
|
|
|
<value>
|
2011-10-28 08:17:54 +02:00
|
|
|
org/libreplan/business/common/entities/Configuration.hbm.xml
|
2009-11-17 12:36:14 +01:00
|
|
|
</value>
|
2009-11-23 10:46:52 +01:00
|
|
|
<value>
|
2011-10-28 08:17:54 +02:00
|
|
|
org/libreplan/business/materials/entities/Materials.hbm.xml
|
2009-11-23 10:46:52 +01:00
|
|
|
</value>
|
2009-11-26 15:28:43 +01:00
|
|
|
<value>
|
2011-10-28 08:17:54 +02:00
|
|
|
org/libreplan/business/users/entities/Users.hbm.xml
|
2009-11-26 15:28:43 +01:00
|
|
|
</value>
|
2009-12-02 20:58:15 +01:00
|
|
|
<value>
|
2011-10-28 08:17:54 +02:00
|
|
|
org/libreplan/business/costcategories/entities/CostCategories.hbm.xml
|
2009-12-02 20:58:15 +01:00
|
|
|
</value>
|
2009-12-14 19:12:49 +01:00
|
|
|
<value>
|
2011-10-28 08:17:54 +02:00
|
|
|
org/libreplan/business/qualityforms/entities/QualityForms.hbm.xml
|
2009-12-14 19:12:49 +01:00
|
|
|
</value>
|
2010-10-13 19:30:26 +02:00
|
|
|
<value>
|
2011-10-28 08:17:54 +02:00
|
|
|
org/libreplan/business/common/entities/EntitySequence.hbm.xml
|
2010-10-13 19:30:26 +02:00
|
|
|
</value>
|
2010-01-04 15:58:20 +01:00
|
|
|
<value>
|
2011-10-28 08:17:54 +02:00
|
|
|
org/libreplan/business/externalcompanies/entities/ExternalCompanies.hbm.xml
|
2010-01-04 15:58:20 +01:00
|
|
|
</value>
|
2010-04-29 10:00:01 +02:00
|
|
|
<value>
|
2011-10-28 08:17:54 +02:00
|
|
|
org/libreplan/business/planner/entities/AdvanceConsolidations.hbm.xml
|
2010-04-29 10:00:01 +02:00
|
|
|
</value>
|
2011-11-15 09:50:17 +01:00
|
|
|
<value>
|
|
|
|
|
org/libreplan/business/planner/entities/SubcontractorComunication.hbm.xml
|
|
|
|
|
</value>
|
2010-03-17 10:01:29 +01:00
|
|
|
<value>
|
2011-10-28 08:17:54 +02:00
|
|
|
org/libreplan/business/scenarios/entities/Scenarios.hbm.xml
|
2010-03-17 10:01:29 +01:00
|
|
|
</value>
|
2009-07-30 09:35:03 +02:00
|
|
|
</list>
|
2009-04-14 17:51:03 +02:00
|
|
|
</property>
|
2010-09-09 01:14:29 +02:00
|
|
|
<property name="eventListeners">
|
|
|
|
|
<map>
|
|
|
|
|
<entry key="post-insert">
|
|
|
|
|
<ref bean="hibernateDatabaseModificationsListener"/>
|
|
|
|
|
</entry>
|
|
|
|
|
<entry key="post-delete">
|
|
|
|
|
<ref bean="hibernateDatabaseModificationsListener"/>
|
|
|
|
|
</entry>
|
|
|
|
|
<entry key="post-update">
|
|
|
|
|
<ref bean="hibernateDatabaseModificationsListener"/>
|
|
|
|
|
</entry>
|
|
|
|
|
</map>
|
|
|
|
|
</property>
|
2009-04-14 17:51:03 +02:00
|
|
|
</bean>
|
2009-05-14 19:19:59 +02:00
|
|
|
|
2009-04-14 17:51:03 +02:00
|
|
|
<!-- Spring Transaction manager -->
|
|
|
|
|
<bean id="transactionManager"
|
|
|
|
|
class="org.springframework.orm.hibernate3.HibernateTransactionManager"
|
2009-05-14 19:19:59 +02:00
|
|
|
p:sessionFactory-ref="sessionFactory" />
|
|
|
|
|
|
|
|
|
|
<!--
|
2009-07-30 09:35:03 +02:00
|
|
|
Enable configuration of transactional behavior based on annotations
|
2009-05-14 19:19:59 +02:00
|
|
|
-->
|
|
|
|
|
<tx:annotation-driven transaction-manager="transactionManager" />
|
|
|
|
|
|
|
|
|
|
<!--
|
2009-05-15 16:05:06 +02:00
|
|
|
For enabling annotation-based configuration (in particular, required
|
2011-07-12 19:09:22 +02:00
|
|
|
for Autowired annotation)
|
2009-05-14 19:19:59 +02:00
|
|
|
-->
|
|
|
|
|
<context:annotation-config />
|
|
|
|
|
|
2011-10-28 08:17:54 +02:00
|
|
|
<context:component-scan base-package="org.libreplan.business" />
|
2009-05-15 16:05:06 +02:00
|
|
|
|
2009-08-07 17:06:15 +02:00
|
|
|
<bean id="registry"
|
2011-10-28 08:17:54 +02:00
|
|
|
class="org.libreplan.business.common.Registry"
|
2009-08-07 17:06:15 +02:00
|
|
|
factory-method="getInstance" />
|
|
|
|
|
|
2010-02-22 12:02:14 +01:00
|
|
|
<bean id="CriterionRequirementOrderElementHandler"
|
2011-10-28 08:17:54 +02:00
|
|
|
class="org.libreplan.business.orders.entities.CriterionRequirementOrderElementHandler"
|
2009-11-09 18:31:35 +01:00
|
|
|
factory-method="getInstance" />
|
|
|
|
|
|
2011-07-01 09:46:36 +02:00
|
|
|
<bean id="versionInformation"
|
2011-10-28 08:17:54 +02:00
|
|
|
class="org.libreplan.business.common.VersionInformation"
|
2010-12-15 12:04:40 +01:00
|
|
|
factory-method="getInstance"
|
|
|
|
|
lazy-init="false">
|
|
|
|
|
<property name="projectVersion">
|
2011-07-01 09:46:36 +02:00
|
|
|
<value>${project.version}</value>
|
2010-12-15 12:04:40 +01:00
|
|
|
</property>
|
|
|
|
|
</bean>
|
|
|
|
|
|
2011-07-01 09:46:36 +02:00
|
|
|
<bean id="configuration"
|
2011-10-28 08:17:54 +02:00
|
|
|
class="org.libreplan.business.common.Configuration"
|
2011-01-31 14:30:02 +01:00
|
|
|
factory-method="getInstance"
|
|
|
|
|
lazy-init="false">
|
|
|
|
|
<property name="defaultPasswordsControl">
|
2011-02-27 18:09:53 +01:00
|
|
|
<value>${default.passwordsControl}</value>
|
2011-01-31 14:30:02 +01:00
|
|
|
</property>
|
|
|
|
|
</bean>
|
|
|
|
|
|
2010-04-07 17:28:14 +02:00
|
|
|
<bean id="scenarioManager"
|
2011-10-28 08:17:54 +02:00
|
|
|
class="org.libreplan.business.scenarios.OnlyMainScenarioAwareManager"
|
2010-04-07 17:28:14 +02:00
|
|
|
scope="singleton"/>
|
|
|
|
|
|
2009-04-14 17:51:03 +02:00
|
|
|
</beans>
|