From f75bc3f376cadd0432435da70a3003a0725309c9 Mon Sep 17 00:00:00 2001 From: lucasward Date: Wed, 18 Jun 2008 22:53:39 +0000 Subject: [PATCH] BATCH-627: Fixed in-memory job repository section on the documentation, and added a new section about the factory bean. --- docs/src/site/docbook/reference/execution.xml | 28 +++++++++++-------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/docs/src/site/docbook/reference/execution.xml b/docs/src/site/docbook/reference/execution.xml index b43a307a1..d0e5c3b25 100644 --- a/docs/src/site/docbook/reference/execution.xml +++ b/docs/src/site/docbook/reference/execution.xml @@ -470,26 +470,32 @@ may be that you just don't need to persist status for a particular job. Spring batch provides a solution: - <bean id="jobRepository" class="org.springframework.batch.core.repository.support.SimpleJobRepository"> - <constructor-arg ref="mapJobInstanceDao" /> - <constructor-arg ref="mapJobExecutionDao" /> - <constructor-arg ref="mapJtepExecutionDao" /> - </bean> + <bean id="simpleJobRepository" class="org.springframework.batch.core.repository.support.SimpleJobRepository"> + <constructor-arg ref="mapJobInstanceDao" /> + <constructor-arg ref="mapJobExecutionDao" /> + <constructor-arg ref="mapStepExecutionDao" /> + </bean> - <bean id="mapJobInstanceDao" - class="org.springframework.batch.execution.repository.dao.MapJobInstanceDao" /> + <bean id="mapJobInstanceDao" + class="org.springframework.batch.core.repository.dao.MapJobInstanceDao" /> - <bean id="mapJobExecutionDao" - class="org.springframework.batch.execution.repository.dao.MapJobExecutionDao" /> + <bean id="mapJobExecutionDao" + class="org.springframework.batch.core.repository.dao.MapJobExecutionDao" /> - <bean id="mapStepExecutionDao" - class="org.springframework.batch.execution.repository.dao.MapStepExecutionDao" /> + <bean id="mapStepExecutionDao" + class="org.springframework.batch.core.repository.dao.MapStepExecutionDao" /> The Map* DAO implementations store the batch artifacts in a transactional map. So, the repository and DAOs may still be used normally, and are transactionally sound, but their contents will be lost when the class is destroyed. + There is also a separate FactoryBean for the in-memory + JobRepository, which reduces the amount of + configuration required: + + <bean id="jobRepository" class="org.springframework.batch.core.repository.support.MapJobRepositoryFactoryBean" /> +
Transaction Configuration For the JobRepository