Commit Graph

1094 Commits

Author SHA1 Message Date
Michael Minella
aedf03fad0 BATCH-1966: Some minor cleanup 2013-03-04 14:08:19 -06:00
Dean de Bree
d1b84f3e2f Added ExecutionContextUserSupport to the ItemStream Support class
Changed child classes to use this shared object
Changed some classes that previously extended ExecutionContextUserSupport
to rather use the same common parent class as everything else.
Changes all for issue BATCH-1966
2013-03-04 09:15:16 -06:00
Michael Minella
b1bd3d3d1e BATCH-1847: Updated StepScope to not proxy abstract beans 2013-03-01 18:11:06 -06:00
Michael Minella
8155ded461 Fixing integration test due to change in Proxy's toString 2013-02-28 09:12:14 -06:00
Dean de Bree
1b9d477386 Cleaned up some interface references 2013-02-19 09:24:47 -06:00
Will Schipp
0a264f2d6b BATCH-1770 - added step BatchStatus.UNKNOWN to SimpleJobLauncher before
starting the job
2013-02-11 16:57:59 +00:00
Will Schipp
7e1e66d677 migration from EasyMock to Mockito 2013-02-10 14:30:57 +00:00
Dave Syer
607e98cd9b BATCH-1412: fix test ordering and concurrency bug 2013-02-05 17:39:12 +00:00
Michael Minella
557515df45 BATCH-1412: Implementing non-identifying job parameters 2013-02-05 17:39:12 +00:00
Michael Minella
47d07b0326 BATCH-1757: Fixed max calculation 2013-02-05 09:39:28 -06:00
Dave Syer
bea04ce186 More defensive StepScope schlepping in tests 2013-02-05 09:39:28 -06:00
Michael Minella
9d53631ce9 BATCH-1745: Fixed rebase issue 2013-01-22 13:25:40 -06:00
Michael Minella
4c9204759d BATCH-1745: Added test to verify restart behavior 2013-01-22 13:14:48 -06:00
Will Schipp
c6d7a4abd6 additional logic to support if already set by a tasklet - the step value
is ignored
2013-01-22 12:39:02 -06:00
Will Schipp
5e8c1b5684 test changes 2013-01-22 12:39:02 -06:00
Will Schipp
525699532e trial ignore 2013-01-22 12:39:02 -06:00
Will Schipp
8ae4cae14a renamed test and corresponding text context 2013-01-22 12:39:02 -06:00
Will Schipp
85c1d06a7d BATCH-1745 - removed excessive schema, added test and cleaned up schema
mappings
2013-01-22 12:39:02 -06:00
Dave Syer
bc9ee74a25 BATCH-1950: Patch up build
* Ensure bundlor is available and remove from sample
* Tidy dependencies in some poms
* Update some template.mf dependencies
* Add .travis.yml for automated builds independent of bamboo
2013-01-18 13:46:02 +00:00
Dave Syer
60af65c7ae BATCH-1951: remove proxyMode from @StepScope 2013-01-16 12:30:44 +00:00
Dave Syer
e2bbd398fd Defensively clear step context to prevent test failure 2013-01-15 10:27:32 +00:00
Michael Minella
014e5bf523 BATCH-1948: Formatting and javadoc fixes 2013-01-11 16:02:01 -06:00
Dave Syer
43bfc0769e BATCH-1948: Add @StepScope and associated tests 2013-01-11 15:34:05 -06:00
Michael Minella
aadc5ee39e BATCH-1949: Updated for autoproxy check 2013-01-11 15:01:51 -06:00
Michael Minella
f88e8b6ff1 BATCH-1667: Update to update the StepExecution as the listener is being processed 2013-01-10 16:39:00 +00:00
Michael Minella
5205c43e7d BATCH-1943: Added ChunkContext to all ChunkListener calls 2013-01-09 09:29:05 -06:00
Michael Minella
e8bde07a73 BATCH-1714: Added ChunkListener#afterFailedChunk(ChunkContext context) 2013-01-04 13:02:58 -06:00
Chris Schaefer
a6ab68bbbb BATCH-1940: Replace org.springframework.batch.support.JdbcTestUtils with org.springframework.test.jdbc.JdbcTestUtils 2012-12-31 08:35:06 -06:00
Michael Minella
96c818e86f BATCH-1915: Reformatting 2012-12-31 08:10:08 -06:00
Chris Schaefer
a583c3a421 BATCH-1915: Change minimum compiler level to 1.6 and use @Override everywhere 2012-12-27 17:45:28 -05:00
Michael Minella
75ee3e0bb4 BATCH-1911 - Fixed merge conflicts and schema version issue 2012-12-17 16:31:06 -06:00
Stéphane Nicoll
8abd2ec69f StepRegistry is now a first-class (optional) component:
- MapJobRegistry no longer implements StepRegistry
- DefaultJobLoader updates the stepRegistry when it is available
- Added more tests to cover the cases where the step registry is not available
2012-12-17 16:13:57 -06:00
Stéphane Nicoll
2870628c85 registering twice the same jobName on the step registry is not allowed (consistency with JobRegistry) 2012-12-17 16:11:50 -06:00
Stéphane Nicoll
00ee45854e Added the concept of a StepRegistry that tracks the Step instance attached to a Job.
- Added a simple MapStepRegistry that keeps track of the step in a simple map per job
- MapJobRegistry implements StepRegistry as well using the delegate pattern
- DefaultJobLoader makes sure to initialize both registries now. Auto-detects that the JobRegistry implements StepRegistry
- JobSupport now implements StepLocator so that such job can be loaded by the DefaultJobLoader
- Also registering any "detached" step available for a particular job to that job if that wasn't done yet. Since a partition handler may link to any step by name, the step registry must be filled with any step that are available in the context of a job. If each job is located in its own application context, this is just fine. If more than one job is defined in the same context, the step registry may be able to return a step that is not related to that job but it shouldn't hurt as this happens only if a component is explicitly asking to execute a step by name for a particular job.
2012-12-17 16:11:50 -06:00
Dave Syer
25cd6d6826 BATCH-1918: First effort at @EnableBatchProcessing
Example:

    @Configuration
    @EnableBatchProcessing
    public class RetrySampleConfiguration {

      @Autowired
      private JobBuilderFactory jobs;

      @Autowired
      private StepBuilderFactory steps;

      @Bean
      public Job retrySample() throws Exception {
        return jobs.get("retrySample").start(step()).build();
      }

      @Bean
      protected Step step() throws Exception {
        return steps.get("step").<Trade, Object> chunk(1).reader(reader()).writer(writer()).faultTolerant()
          .retry(Exception.class).retryLimit(3).build();
      }

      @Bean
      protected ItemReader<Trade> reader() {
        GeneratingTradeItemReader reader = new GeneratingTradeItemReader();
        reader.setLimit(10);
        return reader;
      }

      @Bean
      protected ItemWriter<Object> writer() {
        return new RetrySampleItemWriter<Object>();
      }

    }
2012-12-17 14:17:48 -06:00
Michael Minella
b2d1dcbfdb BATCH-1923: Fixed javadoc errors 2012-12-17 13:42:48 -06:00
Dave Syer
7b42d2c2af BATCH-1923: add stop() methods to FlowBuilder 2012-12-17 10:33:34 +00:00
Dave Syer
e9bcc10646 BATCH-1871: Add flow and job builders 2012-12-06 13:58:49 +00:00
Dave Syer
663571ec95 BATCH-1913: fix StepBuilderHelper to be more friendly to caller 2012-12-05 14:02:10 +00:00
Dave Syer
07cce7a7e4 BATCH-1913: add javadocs and some more convenience methods 2012-12-05 11:28:00 +00:00
Dave Syer
f63f67c65a BATCH-1913: Add step builders 2012-12-04 18:12:20 +00:00
Michael Minella
b33b2e3e97 BATCH-1780: Updated use of StepListenerFailedException
* Removed second constructor
* Updated code to log exception from the listener method more clearly
* Updated logging to report application error
2012-10-22 14:46:02 -05:00
Michael Minella
f00a0076d6 BATCH-1684: Forcing the use of ISO-8859-1 encoding for persistence 2012-10-09 10:12:27 -05:00
Michael Minella
f7d2e683ca BATCH-1684: Updated the conversion of the output stream to String 2012-10-09 09:09:50 -05:00
Michael Minella
92e4615a9b BATCH-1684: Added close to unit test 2012-10-08 14:52:47 -05:00
Michael Minella
64ca2608ad BATCH-1684 - Allow serializer to be injected into JobRepository
* Updated the job-repository tag to allow for a serializer and deserializer to be injected
* Updated the XStreamExecutionContextStringSerializer to implement Serializer and Deserializer
* Replaced the ExecutionContextStringSerializer with the ExecutionContextSerializer interface
* Updated the XSD and parser to accept the injection of an implementation of the ExecutionContextSerializer from the job-repository tag
* Updated the JdbcExecutionContextDao to use injected ExecutionContextSerializer implementation

Reference: https://jira.springsource.org/browse/BATCH-1684
2012-10-08 14:53:46 -04:00
Michael Minella
326da17239 Merge pull request #49 from chrisjs/BATCH-1666
BATCH-1666: Add abort(long executionId) convenience method to JobOperato...
2012-10-02 12:23:34 -07:00
Chris Schaefer
4b68ed3aac BATCH-1666: Add abort(long executionId) convenience method to JobOperator 2012-10-02 15:14:53 -04:00
Michael Minella
cae48ac962 Merge pull request #45 from tvaughan77/BATCH-1694
BATCH-1694 Third time is a charm.
2012-10-02 10:28:46 -07:00
Michael Minella
e827990f08 BATCH-1895: Updated to use spring-retry 2012-10-02 10:06:44 -05:00