BATCH-1954: Updated documentation to reflect changes for 2.2.0

This commit is contained in:
Michael Minella
2013-04-04 09:36:25 -05:00
parent 0a1ae0b92c
commit b2d8689813
4 changed files with 137 additions and 13 deletions

View File

@@ -27,6 +27,7 @@ import java.util.Map;
import java.util.Map.Entry;
import java.util.Properties;
import org.springframework.batch.core.JobInstance;
import org.springframework.batch.core.JobParameter;
import org.springframework.batch.core.JobParameter.ParameterType;
import org.springframework.batch.core.JobParameters;
@@ -35,7 +36,9 @@ import org.springframework.util.StringUtils;
/**
* Converter for {@link JobParameters} instances using a simple naming
* convention for property keys. Key names ending with "(<type>)" where
* convention for property keys. Key names that are prefixed with a - are
* considered non-identifying and will not contribute to the identity of a
* {@link JobInstance}. Key names ending with "(<type>)" where
* type is one of string, date, long are converted to the corresponding type.
* The default type is string. E.g.
*
@@ -48,7 +51,7 @@ import org.springframework.util.StringUtils;
* strategies, augmented if necessary by the custom editors provided.
*
* <br/>
*
*
* If you need to be able to parse and format local-specific dates and numbers,
* you can inject formatters ({@link #setDateFormat(DateFormat)} and
* {@link #setNumberFormat(NumberFormat)}).

View File

@@ -2,6 +2,8 @@ Spring Batch 2.2.0.M1 Release Notes
* Bug
* {{{https://jira.springframework.org/browse/BATCH-1697}[BATCH-1697]}} - TaskletStep not marked as FAILED when FlatFileItemWriter fails to append footer
* {{{https://jira.springframework.org/browse/BATCH-1745}[BATCH-1745]}} - XSD inconsistency: allow-start-if-complete is not allowed on non-tasklet step
* {{{https://jira.springframework.org/browse/BATCH-1773}[BATCH-1773]}} - Step-scoped annotation based listener is not called
@@ -10,6 +12,8 @@ Spring Batch 2.2.0.M1 Release Notes
* {{{https://jira.springframework.org/browse/BATCH-1780}[BATCH-1780]}} - Code exception is masked by a batch exception
* {{{https://jira.springframework.org/browse/BATCH-1795}[BATCH-1795]}} - ExponentialBackOffPolicy and BackOffContext
* {{{https://jira.springframework.org/browse/BATCH-1799}[BATCH-1799]}} - Exception in flush of file output ItemWriters does not abort a step/job
* {{{https://jira.springframework.org/browse/BATCH-1903}[BATCH-1903]}} - SQL compatibility breakage with HSQL
@@ -18,6 +22,8 @@ Spring Batch 2.2.0.M1 Release Notes
* {{{https://jira.springframework.org/browse/BATCH-1920}[BATCH-1920]}} - Add sample for new AMQPItemReader & Writer
* {{{https://jira.springframework.org/browse/BATCH-1948}[BATCH-1948]}} - StepScope doesn't work properly with proxyTargetClass=true in @Bean definitions
* {{{https://jira.springframework.org/browse/BATCH-1950}[BATCH-1950]}} - Fix bootstrap process
* Improvement
@@ -26,6 +32,8 @@ Spring Batch 2.2.0.M1 Release Notes
* {{{https://jira.springframework.org/browse/BATCH-1691}[BATCH-1691]}} - Allow to define groupBy for SqlPaginingQueryProviderFactoryBean
* {{{https://jira.springframework.org/browse/BATCH-1718}[BATCH-1718]}} - CompositeRetryPolicy by default is pessimistic
* {{{https://jira.springframework.org/browse/BATCH-1854}[BATCH-1854]}} - Create marker interface to be used by MultiResourceItemReader to inject the resource an item was read from.
* {{{https://jira.springframework.org/browse/BATCH-1889}[BATCH-1889]}} - SqlFire support
@@ -36,6 +44,8 @@ Spring Batch 2.2.0.M1 Release Notes
* {{{https://jira.springframework.org/browse/BATCH-1666}[BATCH-1666]}} - Add abort(long executionId) convenience method to JobOperator
* {{{https://jira.springframework.org/browse/BATCH-1667}[BATCH-1667]}} - StepExecutionListener ExitStatus not persisted and not accessible for other listeners
* {{{https://jira.springframework.org/browse/BATCH-1684}[BATCH-1684]}} - Allow serializer to be injected into JobRepository (ExecutionContextDao)
* {{{https://jira.springframework.org/browse/BATCH-1694}[BATCH-1694]}} - Add StepLocatorStepFactoryBean
@@ -48,6 +58,10 @@ Spring Batch 2.2.0.M1 Release Notes
* {{{https://jira.springframework.org/browse/BATCH-1911}[BATCH-1911]}} - Provide a Step registry to be able to locate a step by its name on (namely) remote nodes
* {{{https://jira.springframework.org/browse/BATCH-1912}[BATCH-1912]}} - Provide a base PartitionHandler so that other implementations can benefit from a shared base implementation
* {{{https://jira.springframework.org/browse/BATCH-1918}[BATCH-1918]}} - @Configuration support for batch (e.g. @EnableBatchProcessing)
* {{{https://jira.springframework.org/browse/BATCH-1935}[BATCH-1935]}} - Add quick start maven archetype
* Task
@@ -58,6 +72,10 @@ Spring Batch 2.2.0.M1 Release Notes
* Refactoring
* {{{https://jira.springframework.org/browse/BATCH-1895}[BATCH-1895]}} - Remove batch retry and depend on spring-retry.
* {{{https://jira.springframework.org/browse/BATCH-1897}[BATCH-1897]}} - Remove ant files from batch.
* {{{https://jira.springframework.org/browse/BATCH-1915}[BATCH-1915]}} - Change minimum compiler level to 1.6 and use @Override everywhere
* {{{https://jira.springframework.org/browse/BATCH-1940}[BATCH-1940]}} - Replace org.springframework.batch.support.JdbcTestUtils with org.springframework.test.jdbc.JdbcTestUtils

View File

@@ -0,0 +1,74 @@
Spring Batch 2.2.0.RC1 Release Notes
* Bug
* {{{https://jira.springframework.org/browse/BATCH-1676}[BATCH-1676]}} - Inconsistencies in XSD and documentation for Listeners within Step
* {{{https://jira.springframework.org/browse/BATCH-1720}[BATCH-1720]}} - Remote steps should not be consulted for isAllowedStartIfComplete() etc.
* {{{https://jira.springframework.org/browse/BATCH-1788}[BATCH-1788]}} - Update chapter 4.5.6 on aborting jobs in documentation
* {{{https://jira.springframework.org/browse/BATCH-1847}[BATCH-1847]}} - scope="step" inheritance from parent bean definitions causes odd effects
* {{{https://jira.springframework.org/browse/BATCH-1856}[BATCH-1856]}} - ExtendedConnectionDataSourceProxy compilation error in JDK 7
* {{{https://jira.springframework.org/browse/BATCH-1908}[BATCH-1908]}} - Inefficient storage of StepExecutionContexts when using partitioning
* {{{https://jira.springframework.org/browse/BATCH-1924}[BATCH-1924]}} - Restarting a stopped job in COMPLETED state prevents progress
* {{{https://jira.springframework.org/browse/BATCH-1951}[BATCH-1951]}} - StepScoped proxies not being created with proxyMode=TARGET_CLASS
* {{{https://jira.springframework.org/browse/BATCH-1952}[BATCH-1952]}} - Missing Import in spring-batch-infrastructure.jar
* {{{https://jira.springframework.org/browse/BATCH-1757}[BATCH-1757]}} - MinMaxPartitioner sets incorrect max value
* {{{https://jira.springframework.org/browse/BATCH-1959}[BATCH-1959]}} - Problem with FlatFileItemWriter restart using multi-byte encoding
* {{{https://jira.springframework.org/browse/BATCH-1960}[BATCH-1960]}} - drop table not consistent across supported dbs
* {{{https://jira.springframework.org/browse/BATCH-1972}[BATCH-1972]}} - StaxEventItemReader fails when restarted at end of file
* {{{https://jira.springframework.org/browse/BATCH-1975}[BATCH-1975]}} - StaxEventItemWriter namespace added to elements after restart
* Improvement
* {{{https://jira.springframework.org/browse/BATCH-1723}[BATCH-1723]}} - Change JobParameters to use wrapper types for getLong and getDouble
* {{{https://jira.springframework.org/browse/BATCH-1770}[BATCH-1770]}} - Checking for UNKNOWN step status could be performed before the JobExecution is launched
* {{{https://jira.springframework.org/browse/BATCH-1906}[BATCH-1906]}} - add support to access an item's line number
* {{{https://jira.springframework.org/browse/BATCH-1928}[BATCH-1928]}} - Convert deprecated classes from the org.springframework.jdbc.core.simple package in samples
* {{{https://jira.springframework.org/browse/BATCH-1955}[BATCH-1955]}} - Remove requirement to inject ItemSqlParameterSourceProvider into JdbcBatchItemWriter
* {{{https://jira.springframework.org/browse/BATCH-1957}[BATCH-1957]}} - Add StaxEventItemWriter deleteIfEmpty property
* {{{https://jira.springframework.org/browse/BATCH-1958}[BATCH-1958]}} - Fix typo in samples apt index
* New Feature
* {{{https://jira.springframework.org/browse/BATCH-1412}[BATCH-1412]}} - Allow a Job to accept JobParameters that do not contribute to its identity
* {{{https://jira.springframework.org/browse/BATCH-1728}[BATCH-1728]}} - Add support for Spring Data (readers and writers)
* {{{https://jira.springframework.org/browse/BATCH-1934}[BATCH-1934]}} - Update spring-batch docs for AmqpItemReader / Writers and use of SQLFire as a db option
* {{{https://jira.springframework.org/browse/BATCH-1964}[BATCH-1964]}} - Optional Transaction in JpaPagingItemReader
* Task
* {{{https://jira.springframework.org/browse/BATCH-1954}[BATCH-1954]}} - Update documentation for 2.2.0
* {{{https://jira.springframework.org/browse/BATCH-1968}[BATCH-1968]}} - Upgrade to hsqldb 2.2.9
* {{{https://jira.springframework.org/browse/BATCH-1977}[BATCH-1977]}} - Create a migration from old schema to new schema
* Refactoring
* {{{https://jira.springframework.org/browse/BATCH-1939}[BATCH-1939]}} - Minor cleanups to AMQP sample
* {{{https://jira.springframework.org/browse/BATCH-1947}[BATCH-1947]}} - Replace org.easymock.classextension.EasyMock with org.easymock.EasyMock
* {{{https://jira.springframework.org/browse/BATCH-1966}[BATCH-1966]}} - Use abstract classes to inherit behaviors

View File

@@ -72,8 +72,9 @@
batch job. A <classname>Job</classname> is an entity that encapsulates an
entire batch process. As is common with other Spring projects, a
<classname>Job</classname> will be wired together via an XML configuration
file. This file may be referred to as the "job configuration". However,
<classname>Job</classname> is just the top of an overall hierarchy:</para>
file or Java based configuration. This configuration may be referred to as
the "job configuration". However, <classname>Job</classname> is just the
top of an overall hierarchy:</para>
<mediaobject>
<imageobject role="html">
@@ -137,7 +138,7 @@
executions (<classname>JobExecution</classname> is discussed in more
detail below) and only one <classname>JobInstance</classname>
corresponding to a particular <classname>Job</classname> and
<classname>JobParameters</classname> can be running at a given
identifying <classname>JobParameter</classname>s can be running at a given
time.</para>
<para>The definition of a <classname>JobInstance</classname> has
@@ -188,11 +189,17 @@
one that was started with a job parameter of 01-01-2008 and another that
was started with a parameter of 01-02-2008. Thus, the contract can be
defined as: <classname>JobInstance</classname> =
<classname>Job</classname> + <classname>JobParameters</classname>. This
<classname>Job</classname> + identifying <classname>JobParameters</classname>. This
allows a developer to effectively control how a
<classname>JobInstance</classname> is defined, since they control what
parameters are passed in.</para>
</section>
<note>
<para>Not all job parameters are required to contribute to the identification
of a <classname>JobInstance</classname>. By default they do, however the framework
allows the submission of a <classname>Job</classname> with parameters that do
not contribute to the identity of a <classname>JobInstance</classname> as well.</para>
</note>
<section id="domainJobExecution">
<title id="jobExecution">JobExecution</title>
@@ -205,7 +212,7 @@
successfully. Using the EndOfDay <classname>Job</classname> described
above as an example, consider a <classname>JobInstance</classname> for
01-01-2008 that failed the first time it was run. If it is run again
with the same job parameters as the first run (01-01-2008), a new
with the same identifying job parameters as the first run (01-01-2008), a new
<classname>JobExecution</classname> will be created. However, there will
still be only one <classname>JobInstance</classname>.</para>
@@ -324,18 +331,20 @@
</table>
<table>
<title>BATCH_JOB_PARAMS</title>
<title>BATCH_JOB_EXECUTION_PARAMS</title>
<tgroup cols="4">
<tbody>
<row>
<entry>JOB_INST_ID</entry>
<entry>JOB_EXECUTION_ID</entry>
<entry>TYPE_CD</entry>
<entry>KEY_NAME</entry>
<entry>DATE_VAL</entry>
<entry>IDENTIFYING</entry>
</row>
<row>
@@ -346,6 +355,8 @@
<entry>schedule.Date</entry>
<entry>2008-01-01</entry>
<entry>TRUE</entry>
</row>
</tbody>
</tgroup>
@@ -436,18 +447,20 @@
</table>
<table>
<title>BATCH_JOB_PARAMS</title>
<title>BATCH_JOB_EXECUTION_PARAMS</title>
<tgroup cols="4">
<tbody>
<row>
<entry>JOB_INST_ID</entry>
<entry>JOB_EXECUTION_ID</entry>
<entry>TYPE_CD</entry>
<entry>KEY_NAME</entry>
<entry>DATE_VAL</entry>
<entry>IDENTIFYING</entry>
</row>
<row>
@@ -458,6 +471,8 @@
<entry>schedule.Date</entry>
<entry>2008-01-01 00:00:00</entry>
<entry>TRUE</entry>
</row>
<row>
@@ -467,7 +482,21 @@
<entry>schedule.Date</entry>
<entry>2008-01-01 00:00:00</entry>
<entry>TRUE</entry>
</row>
<row>
<entry>3</entry>
<entry>DATE</entry>
<entry>schedule.Date</entry>
<entry>2008-01-02 00:00:00</entry>
<entry>TRUE</entry>
</row>
</tbody>
</tgroup>
@@ -1017,9 +1046,9 @@ ExecutionContext ecJob = jobExecution.getExecutionContext();
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://www.springframework.org/schema/beans/spring-beans.xsd
<emphasis role="bold">http://www.springframework.org/schema/batch
http://www.springframework.org/schema/batch/spring-batch-2.0.xsd</emphasis>"&gt;
http://www.springframework.org/schema/batch/spring-batch-2.2.xsd</emphasis>"&gt;
&lt;job id="ioSampleJob"&gt;
&lt;step id="step1"&gt;