1 <?xml version="1.0" encoding="UTF-8"?>
2 <beans xmlns="http://www.springframework.org/schema/beans"
3 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4 xmlns:aop="http://www.springframework.org/schema/aop"
5 xmlns:context="http://www.springframework.org/schema/context"
6 xmlns:tx="http://www.springframework.org/schema/tx"
8 http://www.springframework.org/schema/beans
9 http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
10 http://www.springframework.org/schema/aop
11 http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
12 http://www.springframework.org/schema/context
13 http://www.springframework.org/schema/context/spring-context-3.0.xsd
14 http://www.springframework.org/schema/tx
15 http://www.springframework.org/schema/tx/spring-tx-3.0.xsd">
17 <!-- <bean id="simanDataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
18 <property name="jndiName" value="jdbc/ibatis"/>
21 <!-- <bean id="simanDatasource"
22 class="org.springframework.jdbc.datasource.DriverManagerDataSource">
23 <property name="driverClassName"
24 value="${connection.driver_class}" />
25 <property name="url" value="${connection.url}" />
26 <property name="username" value="${connection.username}" />
27 <property name="password" value="${connection.password}" />
31 <context:property-placeholder
32 location="classpath:siman.properties,classpath:jdbc.properties"
33 ignore-unresolvable="true" />
35 <bean id="simanDatasource"
36 class="org.springframework.jdbc.datasource.SingleConnectionDataSource">
37 <property name="driverClassName"
38 value="${connection.driver_class}" />
39 <property name="url" value="${connection.url}" />
40 <property name="username" value="${connection.username}" />
41 <property name="password" value="${connection.password}" />
42 <property name="suppressClose" value="true" />
43 <property name="autoCommit" value="false" />
46 <bean id="p6spySimanDatasource"
47 class="com.p6spy.engine.spy.P6DataSource">
49 <ref local="simanDatasource" />
54 <bean id="hibernateProperties"
55 class="org.springframework.beans.factory.config.PropertiesFactoryBean">
56 <property name="properties">
58 <!-- normal properties -->
61 <!-- hibernate.config should be defined somewhere in the spring.properties layers -->
62 <property name="locations">
64 <value>classpath:${hibernate.config.file}</value>
69 <bean id="simanSessionFactory"
70 class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
71 <property name="dataSource" ref="simanDatasource" />
72 <property name="mappingResources">
75 org/splat/dal/bo/kernel/Persistent.hbm.xml
77 <value>org/splat/dal/bo/kernel/Any.hbm.xml</value>
78 <value>org/splat/dal/bo/kernel/Entity.hbm.xml</value>
79 <value>org/splat/dal/bo/kernel/Attribute.hbm.xml</value>
80 <value>org/splat/dal/bo/kernel/Relation.hbm.xml</value>
82 org/splat/dal/bo/kernel/TextAttribute.hbm.xml
84 <value>org/splat/dal/bo/kernel/User.hbm.xml</value>
87 org/splat/dal/bo/som/ProjectElement.hbm.xml
89 <value>org/splat/dal/bo/som/Study.hbm.xml</value>
90 <value>org/splat/dal/bo/som/Scenario.hbm.xml</value>
91 <value>org/splat/dal/bo/som/Attributes.hbm.xml</value>
92 <value>org/splat/dal/bo/som/Relations.hbm.xml</value>
93 <value>org/splat/dal/bo/som/File.hbm.xml</value>
94 <value>org/splat/dal/bo/som/Document.hbm.xml</value>
95 <value>org/splat/dal/bo/som/Publication.hbm.xml</value>
97 org/splat/dal/bo/som/ValidationCycle.hbm.xml
99 <value>org/splat/dal/bo/som/Timestamp.hbm.xml</value>
101 org/splat/dal/bo/som/SimulationContext.hbm.xml
104 org/splat/dal/bo/som/KnowledgeElement.hbm.xml
106 <value>org/splat/dal/bo/som/IDBuilder.hbm.xml</value>
109 <!-- hibernate.connection.driver_class=com.p6spy.engine.spy.P6SpyDriver -->
111 <property name="hibernateProperties">
112 <ref local="hibernateProperties" />
114 <!-- The following property is used temporary to be able to manage transactions manually. -->
115 <!-- TODO: use annotations to mark transaction methods
116 instead of programmatic transaction management -->
117 <property name="exposeTransactionAwareSessionFactory">
123 class="org.springframework.orm.hibernate3.HibernateTransactionManager">
124 <property name="sessionFactory" ref="simanSessionFactory" />
127 <tx:annotation-driven transaction-manager="txManager" />
129 <!-- TODO: Replace database by services and DAOs -->
130 <bean id="database" class="org.splat.dal.dao.som.Database">
131 <property name="sessionFactory" ref="simanSessionFactory" />
132 <property name="indexService" ref="indexService" />
133 <property name="repositoryService" ref="repositoryService" />