+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
+
+<!-- This is the Spring configuration to define the database-related stuff for the
+ all persistence tests. -->
+<beans>
+
+ <bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
+ <property name="dataSource">
+ <ref bean="dataSource"/>
+ </property>
+ <property name="hibernateProperties">
+ <props>
+ <prop key="hibernate.dialect">${hibernate.dialect}</prop>
+ <prop key="hibernate.cache.provider_class">${hibernate.cache.provider}</prop>
+ <prop key="hibernate.show_sql">${hibernate.show_sql}</prop>
+ <prop key="hibernate.cache.use_query_cache">${hibernate.cache.use_query_cache}</prop>
+ </props>
+ </property>
+ <property name="schemaUpdate">
+ <value>${hibernate.schemaupdate}</value>
+ </property>
+ <property name="mappingResources"><ref bean="hibernateMappingFiles"/></property>
+ </bean>
+
+ <bean id="transactionManager"
+ class="org.springframework.orm.hibernate3.HibernateTransactionManager">
+ <property name="sessionFactory">
+ <ref local="sessionFactory"/>
+ </property>
+ </bean>
+
+ <!-- Hibernate template used within test code for addition
+ Hibernate-specific stuff -->
+ <bean id="org.springframework.orm.hibernate3.HibernateTemplate"
+ class="org.springframework.orm.hibernate3.HibernateTemplate">
+ <property name="sessionFactory">
+ <ref bean="sessionFactory"/>
+ </property>
+ </bean>
+</beans>