]> git.argeo.org Git - gpl/argeo-slc.git/blob - runtime/org.argeo.slc.support.hibernate/src/test/resources/org/argeo/slc/hibernate/applicationContext.xml
Adapt to new Commons structure
[gpl/argeo-slc.git] / runtime / org.argeo.slc.support.hibernate / src / test / resources / org / argeo / slc / hibernate / applicationContext.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3
4 Copyright (C) 2007-2012 Mathieu Baudier
5
6 Licensed under the Apache License, Version 2.0 (the "License");
7 you may not use this file except in compliance with the License.
8 You may obtain a copy of the License at
9
10 http://www.apache.org/licenses/LICENSE-2.0
11
12 Unless required by applicable law or agreed to in writing, software
13 distributed under the License is distributed on an "AS IS" BASIS,
14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 See the License for the specific language governing permissions and
16 limitations under the License.
17
18 -->
19 <beans xmlns="http://www.springframework.org/schema/beans"
20 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
21 xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
22
23 <import resource="classpath:/org/argeo/slc/hibernate/spring.xml" />
24 <!--
25
26 <bean id="sessionFactory"
27 parent="slcTemplates.sessionFactory.hibernateBasic"> <property
28 name="dataSource" ref="dataSource" /> <property
29 name="hibernateProperties"> <value><![CDATA[
30 hibernate.dialect=org.hibernate.dialect.HSQLDialect
31 hibernate.hbm2ddl.auto=create
32 hibernate.current_session_context_class=thread ]]></value> </property>
33 </bean> <bean id="dataSource"
34 class="org.springframework.jdbc.datasource.SingleConnectionDataSource"
35 destroy-method="destroy" lazy-init="true"> <property
36 name="driverClassName" value="org.hsqldb.jdbcDriver" /> <property
37 name="url" value="jdbc:hsqldb:mem:test" /> <property name="username"
38 value="sa" /> <property name="password" value="" /> <property
39 name="suppressClose" value="true" /> </bean>
40 -->
41
42 <bean id="sessionFactory" parent="slcTemplates.sessionFactory.hibernateBasic">
43 <property name="dataSource" ref="dataSource" />
44 <property name="hibernateProperties">
45 <value><![CDATA[
46 hibernate.dialect=org.hibernate.dialect.H2Dialect
47 hibernate.hbm2ddl.auto=create
48 hibernate.current_session_context_class=thread
49 hibernate.jdbc.batch_size=20
50 ]]></value>
51 </property>
52 </bean>
53
54 <bean id="dataSource"
55 class="org.springframework.jdbc.datasource.SingleConnectionDataSource"
56 destroy-method="destroy" lazy-init="true">
57 <property name="driverClassName" value="org.h2.Driver" />
58 <property name="url" value="jdbc:h2:mem:test" />
59 <property name="username" value="sa" />
60 <property name="password" value="" />
61 <property name="suppressClose" value="true" />
62 </bean>
63
64 <bean id="testResultDao" parent="slcTemplates.dao.testResultDao">
65 <property name="sessionFactory" ref="sessionFactory" />
66 </bean>
67 <bean id="testResultCollectionDao" parent="slcTemplates.dao.testResultCollectionDao">
68 <property name="sessionFactory" ref="sessionFactory" />
69 </bean>
70
71 <bean id="slcExecutionDao" parent="slcTemplates.dao.slcExecutionDao">
72 <property name="sessionFactory" ref="sessionFactory" />
73 </bean>
74 </beans>