]> SALOME platform Git repositories - tools/siman.git/blob - Workspace/Siman-Common/src/test/spring/ut-datasourceContext.xml
Salome HOME
VPV implementation of the new checking algorithm and the unit test (getNewDocumentId())
[tools/siman.git] / Workspace / Siman-Common / src / test / spring / ut-datasourceContext.xml
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"
7         xsi:schemaLocation="
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">
16
17         <!--    <bean id="simanDataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
18                 <property name="jndiName" value="jdbc/ibatis"/>
19                 </bean> -->
20
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}" />
28         </bean>
29
30         <!--    <bean id="simanDatasource"
31                 class="org.springframework.jdbc.datasource.SingleConnectionDataSource">
32                 <property name="driverClassName"
33                 value="${connection.driver_class}" />
34                 <property name="url" value="${connection.url}" />
35                 <property name="username" value="${connection.username}" />
36                 <property name="password" value="${connection.password}" />
37                 <property name="suppressClose" value="true" />
38                 <property name="autoCommit" value="false" />
39                 </bean>-->
40
41         <bean id="hibernateProperties"
42                 class="org.springframework.beans.factory.config.PropertiesFactoryBean">
43                 <property name="properties">
44                         <props>
45                                 <!-- normal properties -->
46                         </props>
47                 </property>
48                 <!-- hibernate.config should be defined somewhere in the spring.properties layers -->
49                 <property name="locations">
50                         <list>
51                                 <value>classpath:test/${hibernate.config.file}</value>
52                         </list>
53                 </property>
54         </bean>
55
56         <bean id="simanSessionFactory"
57                 class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
58                 <property name="dataSource" ref="simanDatasource" />
59                 <property name="mappingResources">
60                         <list>
61                                 <value>
62                                         org/splat/dal/bo/kernel/Persistent.hbm.xml
63                                 </value>
64                                 <value>org/splat/dal/bo/kernel/Any.hbm.xml</value>
65                                 <value>org/splat/dal/bo/kernel/Entity.hbm.xml</value>
66                                 <value>org/splat/dal/bo/kernel/Attribute.hbm.xml</value>
67                                 <value>org/splat/dal/bo/kernel/Relation.hbm.xml</value>
68                                 <value>
69                                         org/splat/dal/bo/kernel/TextAttribute.hbm.xml
70                                 </value>
71                                 <value>org/splat/dal/bo/kernel/User.hbm.xml</value>
72
73                                 <value>
74                                         org/splat/dal/bo/som/ProjectElement.hbm.xml
75                                 </value>
76                                 <value>org/splat/dal/bo/som/Study.hbm.xml</value>
77                                 <value>org/splat/dal/bo/som/Scenario.hbm.xml</value>
78                                 <value>org/splat/dal/bo/som/Attributes.hbm.xml</value>
79                                 <value>org/splat/dal/bo/som/Relations.hbm.xml</value>
80                                 <value>org/splat/dal/bo/som/File.hbm.xml</value>
81                                 <value>org/splat/dal/bo/som/Document.hbm.xml</value>
82                                 <value>org/splat/dal/bo/som/Publication.hbm.xml</value>
83                                 <value>
84                                         org/splat/dal/bo/som/ValidationCycle.hbm.xml
85                                 </value>
86                                 <value>org/splat/dal/bo/som/Timestamp.hbm.xml</value>
87                                 <value>
88                                         org/splat/dal/bo/som/SimulationContext.hbm.xml
89                                 </value>
90                                 <value>
91                                         org/splat/dal/bo/som/KnowledgeElement.hbm.xml
92                                 </value>
93                                 <value>org/splat/dal/bo/som/IDBuilder.hbm.xml</value>
94                         </list>
95                 </property>
96
97                 <property name="hibernateProperties">
98                         <ref local="hibernateProperties" />
99                 </property>
100                 <!-- The following property is used temporary to be able to manage transactions manually. -->
101                 <!-- TODO: use annotations to mark transaction methods 
102                         instead of programmatic transaction management  -->
103                 <!--         <property name="exposeTransactionAwareSessionFactory">
104                         <value>false</value>
105                         </property>-->
106                 <!--         <property name="configurationClass" value="org.hibernate.cfg.AnnotationConfiguration" />-->
107         </bean>
108
109         <bean id="txManager"
110                 class="org.springframework.orm.hibernate3.HibernateTransactionManager">
111                 <property name="sessionFactory" ref="simanSessionFactory" />
112                 <property name="nestedTransactionAllowed" value="true" />
113         </bean>
114
115         <tx:annotation-driven transaction-manager="txManager" />
116
117 </beans>