RESOLVED - issue BATCH-503: Not applying declarative transactions around repository causes unstable execution

This commit is contained in:
dsyer
2008-05-26 12:16:05 +00:00
parent 11b4e2a012
commit 7025ff4831
6 changed files with 380 additions and 35 deletions

View File

@@ -20,20 +20,8 @@
<bean id="jobRegistry" class="org.springframework.batch.core.configuration.support.MapJobRegistry" />
<aop:config>
<aop:advisor pointcut="execution(* org.springframework.batch.core..*Repository+.*(..))"
advice-ref="txAdvice" />
</aop:config>
<tx:advice id="txAdvice" transaction-manager="transactionManager">
<tx:attributes>
<tx:method name="create*" propagation="REQUIRES_NEW" isolation="SERIALIZABLE" />
<tx:method name="*" />
</tx:attributes>
</tx:advice>
<bean id="jobRepository" class="org.springframework.batch.core.repository.support.JobRepositoryFactoryBean"
p:databaseType="${environment}" p:dataSource-ref="dataSource" />
p:databaseType="${environment}" p:dataSource-ref="dataSource" p:transactionManager-ref="transactionManager"/>
<bean id="mapJobInstanceDao" lazy-init="true"
class="org.springframework.batch.core.repository.dao.MapJobInstanceDao" />