Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="UTF-8"?>
- <beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
- xmlns:tx="http://www.springframework.org/schema/tx" xmlns:jdbc="http://www.springframework.org/schema/jdbc"
- xsi:schemaLocation="
- http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-3.1.xsd
- http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
- http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.1.xsd
- http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd">
- <jdbc:embedded-database id="dataSource" type="H2">
- <jdbc:script location="classpath:scripts/create-data-model.sql"/>
- <jdbc:script location="classpath:scripts/fill-database.sql"/>
- </jdbc:embedded-database>
- <bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
- <property name="sessionFactory" ref="sessionFactory"/>
- </bean>
- <tx:annotation-driven/>
- <context:component-scan base-package="hillel.db_jpa" />
- <bean id="sessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
- <property name="dataSource" ref="dataSource"/>
- <property name="packagesToScan" value="hillel.db_jpa"/>
- <property name="hibernateProperties">
- <props>
- <prop key="hibernate.dialect">org.hibernate.dialect.H2Dialect</prop>
- <prop key="hibernate.max_fetch_depth">3</prop>
- <prop key="hibernate.jdbc.fetch_size">50</prop>
- <prop key="hibernate.jdbc.batch_size">10</prop>
- <prop key="hibernate.show_sql">false</prop>
- </props>
- </property>
- </bean>
- <context:annotation-config/>
- </beans>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement