From 5c4f5906b823e486e45f894b821d852e1c5ee26b Mon Sep 17 00:00:00 2001 From: dsyer Date: Wed, 8 Apr 2009 12:48:37 +0000 Subject: [PATCH] BATCH-1192: updated docos to show transaction manager being used with MapJobRepositoryFactoryBean. --- src/site/docbook/reference/job.xml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/site/docbook/reference/job.xml b/src/site/docbook/reference/job.xml index e6d60a931..b709bb330 100644 --- a/src/site/docbook/reference/job.xml +++ b/src/site/docbook/reference/job.xml @@ -370,14 +370,26 @@ this reason, Spring batch provides an in-memory Map version of the job respository: - <bean id="jobRepository" - class="org.springframework.batch.core.repository.support.MapJobRepositoryFactoryBean" /> + + + +]]> Note that the in-memory repository is volatile and so does not allow restart between JVM instances. It also cannot guarantee that two job instances with the same parameters are launched simultaneously. So use the database version of the repository wherever you need quality of service. + + However it does require a transaction manager to be + defined because there are rollback semantics within the + repository, and because the business logic might still be + transactional (e.g. RDBMS access). For testing purposes many + people find + the ResourcelessTransactionManager + useful. +