From fa2cbf2cc0453ad188ade9c9402fb205f6938254 Mon Sep 17 00:00:00 2001 From: dsyer Date: Sun, 8 Mar 2009 08:56:43 +0000 Subject: [PATCH] Add comments about non-standard JobRepository --- src/site/docbook/reference/job.xml | 42 ++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/src/site/docbook/reference/job.xml b/src/site/docbook/reference/job.xml index 76315e30b..f01430a00 100644 --- a/src/site/docbook/reference/job.xml +++ b/src/site/docbook/reference/job.xml @@ -320,6 +320,48 @@ <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. + + + +
+ Non-standard Database Types in a Repository + + If you are using a database platform that is not in the + list of supported platforms, you may be able to use one of the + supported types, if the SQL variant is close enough. To do this + you can use the + raw JobRepositoryFactoryBean instead of + the namespace shortcut and use it to set the database type to + the closest match: + + + + + +]]> + + (The JobRepositoryFactoryBean tries + to auto-detect the database type from + the DataSource if it is not specified.) + The major differences between platforms are mainly accounted for + by the strategy for incrementing primary keys, so often it might + be necessary to override + the incrementerFactory as well (using one fo + the standard implementations from the Spring Framework). + + If even that doesn't work, or you are not using an RDBMS, + then the only option may be to implement the + various Dao interfaces that + the SimpleJobRepository depends on and + wire one up manually in the normal Spring way. +