IN PROGRESS - issue BATCH-262: Hibernate Job blocks on flush

http://jira.springframework.org/browse/BATCH-262

Move session factory to parent context
This commit is contained in:
dsyer
2007-12-21 14:36:24 +00:00
parent 01f64f013f
commit c456d3b306
5 changed files with 112 additions and 93 deletions

View File

@@ -15,8 +15,22 @@
<property name="password" value="${batch.jdbc.password}" />
</bean>
<bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager" lazy-init="true">
<bean id="sessionFactory"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource" ref="dataSource" />
<property name="mappingLocations" value="classpath*:/*.hbm.xml"/>
<property name="hibernateProperties">
<value>
<![CDATA[
hibernate.show_sql=true
hibernate.format_sql=true
]]>
</value>
</property>
</bean>
<bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager" lazy-init="true">
<property name="sessionFactory" ref="sessionFactory" />
</bean>
<!-- Use this to set additional properties on beans at run time -->
@@ -66,4 +80,6 @@
<property name="incrementerName" value="BATCH_PARTITION_EXECUTION_SEQ" />
</bean>
<import resource="alt-data-source-context.xml" />
</beans>