]> git.argeo.org Git - gpl/argeo-slc.git/blob - runtime/org.argeo.slc.support.hibernate/src/test/resources/org/argeo/slc/hibernate/applicationContext.xml
09a4796e809e848c7b2cf354c6cd4ef71068e3e7
[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) 2010 Mathieu Baudier <mbaudier@argeo.org>
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
20 <beans xmlns="http://www.springframework.org/schema/beans"
21 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
22 xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
23
24 <import resource="classpath:/org/argeo/slc/hibernate/spring.xml" />
25
26 <bean id="sessionFactory" parent="slcTemplates.sessionFactory.hibernateBasic">
27 <property name="dataSource" ref="dataSource" />
28 <property name="hibernateProperties">
29 <value><![CDATA[
30 hibernate.dialect=org.hibernate.dialect.HSQLDialect
31 hibernate.hbm2ddl.auto=create
32 hibernate.current_session_context_class=thread
33 ]]></value>
34 </property>
35 </bean>
36
37 <bean id="dataSource"
38 class="org.springframework.jdbc.datasource.SingleConnectionDataSource"
39 destroy-method="destroy" lazy-init="true">
40 <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
41 <property name="url" value="jdbc:hsqldb:mem:test" />
42 <property name="username" value="sa" />
43 <property name="password" value="" />
44 <property name="suppressClose" value="true" />
45 </bean>
46
47
48
49 <bean id="testResultDao" parent="slcTemplates.dao.testResultDao">
50 <property name="sessionFactory" ref="sessionFactory" />
51 </bean>
52 <bean id="testResultCollectionDao" parent="slcTemplates.dao.testResultCollectionDao">
53 <property name="sessionFactory" ref="sessionFactory" />
54 </bean>
55
56 <bean id="slcExecutionDao" parent="slcTemplates.dao.slcExecutionDao">
57 <property name="sessionFactory" ref="sessionFactory" />
58 </bean>
59 </beans>