BATCH-627: Fixed in-memory job repository section on the documentation, and added a new section about the factory bean.
This commit is contained in:
@@ -470,26 +470,32 @@
|
||||
may be that you just don't need to persist status for a particular
|
||||
job. Spring batch provides a solution:</para>
|
||||
|
||||
<programlisting> <bean id="jobRepository" class="org.springframework.batch.core.repository.support.SimpleJobRepository">
|
||||
<constructor-arg ref="mapJobInstanceDao" />
|
||||
<constructor-arg ref="mapJobExecutionDao" />
|
||||
<constructor-arg ref="mapJtepExecutionDao" />
|
||||
</bean>
|
||||
<programlisting> <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" /></programlisting>
|
||||
<bean id="mapStepExecutionDao"
|
||||
class="org.springframework.batch.core.repository.dao.MapStepExecutionDao" /> </programlisting>
|
||||
|
||||
<para>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.</para>
|
||||
|
||||
<para>There is also a separate FactoryBean for the in-memory
|
||||
<classname>JobRepository</classname>, which reduces the amount of
|
||||
configuration required:</para>
|
||||
|
||||
<programlisting> <bean id="jobRepository" class="org.springframework.batch.core.repository.support.MapJobRepositoryFactoryBean" /></programlisting>
|
||||
|
||||
<section>
|
||||
<title>Transaction Configuration For the JobRepository</title>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user