Commit Graph

1013 Commits

Author SHA1 Message Date
Michael Minella
440e234c58 BATCH-2149: Updated unit tests to demonstrate functionality 2013-12-30 12:06:43 -06:00
Michael Minella
1730206d76 Renamed unit test so it will be executed in the build 2013-12-30 12:06:43 -06:00
Michael Minella
9ec3a4facb BATCH-2149: Updated test to validate both the simple and fault tolerant use cases 2013-12-30 12:06:43 -06:00
Michael Minella
0e2edd295f Added new EndState to support JSR behavior for setting the JobExecution#exitStatus 2013-12-18 13:19:42 -06:00
Chris Schaefer
d76209df10 Prevent NPE when checking for a re-runnable continued flow, remove usage of
state transition comparator in FlowParser, ensure custom exit code is set at
job level.

Fixes TCK test testDeciderExitStatusIsSetOnJobContext, contributes but does
not fix decider transition tests that include restart.
2013-12-18 10:36:50 -05:00
Michael Minella
3e5597717e Refactored setting of completion policy to not overwrite JSR defaults 2013-12-17 14:30:36 -06:00
Michael Minella
2f63bd0664 Updated to call PartitionCollector regardless of if the partition completes successfully 2013-12-16 15:40:36 -06:00
Michael Minella
b9b23e639d Updated the JsrStepExecutionSplitter to provide a copy of the JobExecution per partition 2013-12-16 14:07:44 -06:00
Michael Minella
b5d48df0cf Added cleanup code around tests so that StepScope registration was
cleaned up.
2013-12-16 12:09:08 -06:00
Michael Minella
241d9f101f BATCH-1701: Implementation of JobScope
* Updated Job and Step scopes to use common class introduced by jpraet
* Updated Job and Step Synchronization Managers to use common class
 introduced by jpraet
* Updated JobScope related code to not be concerned with Spring 2.5
 (which is what batch was on when the PR was opened).
2013-12-16 09:21:27 -06:00
jpraet
2436d84210 BATCH-1701: Introduce job scope 2013-12-13 16:44:15 -06:00
Chris Schaefer
e5fc0665cc Remove property resolution through the original bean factory post processor and move resolution to
occur during XML pre-processing. JSR-352 allows for property replacement and expressions to be present
on any element and the preprocessing provides the ability to load a well formed XML document into the
context with the intended values already present.
2013-12-13 17:02:19 -05:00
Michael Minella
54a5be9eb2 Added the implementation of a post processor to lazily init partition
related artifacts
* Added BeanFactoryPostProcessor
* Fixed StepContext creation (now creates one per thread)
* Fixed StepContext exit status processing (now keeps track of being set
 manualy or not
* Created new Flow implementation to handle JSR-352 state transitions
* Updated flow parsing to not default to completed if no other
 transitions are provided
2013-12-13 13:11:55 -06:00
Michael Minella
b985c52b4d Refactored CheckpointAlgorithmAdapter to be stateful 2013-12-12 14:36:21 -06:00
Michael Minella
7553c383cd Refactored to use the JSR's JobOperator to launch test job 2013-12-09 12:56:57 -06:00
Chris Schaefer
6b4ff3a566 Remove unique transition pattern check per JSR requirements. Transitions are ordered based on their ordering in the job defintion XML document, so for example having an end and stop transition both with a pattern of "foo" is valid. 2013-12-07 13:59:29 -05:00
Michael Minella
78cf001e9e Refactored the JsrJobOperator to start and restart jobs asynchronously
by default.
* Refactored the JsrJobOperator to use SimpleAsyncTaskExecutor by
 default
* Introduced a JobContextFactory to provide a JobContext per thread.
* Updated stop logic to correctly handle stopping jobs running on
 another thread.
2013-12-06 11:37:10 -06:00
Michael Minella
e7319c66f8 BATCH-2122: Updated so that offset would be correctly handled at chunk borders 2013-11-22 16:18:46 -06:00
Sanghyuk Jung
bfd6d8d355 BATCH-2096: 'chunk-completion-policy' or 'commit-interval' with '#{jobParameters[...]}' is ignored when 'retry-limit' exists.
* Added a call for a completionPolicy  when creating FaultTolerantStep
* Added an assertion for the chunkCompletionPolicy in the unit test.

JIRA: https://jira.springsource.org/browse/BATCH-2096
2013-11-22 15:40:45 -06:00
Chris Schaefer
1ef21104ac Fixes for TCK tests: testDeciderNextNormal, testDeciderNextSpecial, testFlowTransitionToDecision, testFlowTransitionToStep, testFlowTransitionToStepOutOfScope, testFlowTransitionWithinFlow, testOneArtifactIsJobAndStepListener, testSimpleFlow, testStartLimitVariation1, testStepInFlowStepExecution
Tests blocked by TCK issues: testOneArtifactIsJobAndStepListener, testStartLimitVariation1

* Expose job level properties to step artifacts and update tests
* Make JobParameterResolvingBeanFactoryPostProcessor HIGHEST_PRECEDENCE to avoid other BFPP's creating bean defs first
* General cleanup and renaming
* Register a bean definition for the JobContext prior to refreshing the beanfactory so it becomes injectable. Set properties and the jobExecution on the JobContext bean after they are initalized.
* Only step scope non-step scoped listeners
* Parse flow elements and transitions
2013-11-20 17:29:34 -06:00
Chris Schaefer
416033299f BATCH-2134: Spring Batch 3.0.0.M2 failed to build in Windows environment 2013-11-19 13:53:29 -05:00
Michael Minella
fb7582a54f BATCH-2003: Updated per code review comments 2013-11-19 10:13:32 -06:00
Michael Minella
102f614874 BATCH-2003: Implemented:
* Basic partitioning support per JSR-352
* Parameter injection at the partition level
* PartitionCollector/PartitionAnalyzer functionality
* PartitionReducer functionality
2013-11-12 17:26:27 -06:00
Chris Schaefer
2eda8c2aeb Catch BeanCreationException on start/start of a job in JsrJobOperator, rethrowing it as a JobStartException 2013-10-24 12:49:51 -04:00
jpraet
2d0e0c22ac BATCH-2053: Allow overriding step scope proxy-target-class flag on bean
level with aop:scoped-proxy
2013-10-16 10:38:21 -05:00
Chris Schaefer
e53533e9e3 BATCH-2005: Implement JSR RetryListener along side Spring Batch's RetryListener 2013-10-15 08:43:14 -05:00
Chris Schaefer
df53ea12b3 BATCH-2095: Change JSR version of Split to execute flows in separate threads. 2013-10-02 15:30:46 -04:00
Chris Schaefer
34f9fa7341 General cleanup etc around properties and substitution
* Move pre-context init of JobParameters support out of ThreadLocalClassloaderBeanPostProcessor
* General cleanup in BatchPropertyBeanPostProcessor, move artifact type checking into classifer class, minor naming updates
* Refactor BatchPropertyContext to use different data structures for different types of properties and provide named accessors
* Remove path based artifact scoping support
* Make sure expressions are parsed when resolving properties directly from XML
* Update property tests
* Move registration of jobProperties bean into the JsrNamespaceUtils
2013-09-26 12:38:23 -04:00
Chris Schaefer
e1f6de38e0 BATCH-2002: Initial support for complex conditional replacements 2013-09-09 16:28:46 -07:00
Chris Schaefer
65d2df652a Add ability to set a custom TaskExecutor impl, remove unused namespaces from JSR bootstrap XML files 2013-09-09 16:00:01 -07:00
Chris Schaefer
8580756857 Update to allow restart parameters to override previous parameters in JsrJobOperator and add test case 2013-09-09 15:28:14 -07:00
Chris Schaefer
7f1130c9a2 Fix TCK test JobOperatorTests.testJobOperatorRestartJobAlreadyAbandoned
* On restart if a previous JobExecution has a status of ABANDONED, throw a JobRestartException
* Ensure any previous JobParameters are merged with new parameters when creating a new job execution on restart
2013-09-04 23:00:18 -04:00
Michael Minella
c4231c4cc8 Fixed no executions returned check and added a unit test 2013-09-04 20:39:23 -05:00
Michael Minella
fba258c8e5 BATCH-2089: Added ability to remap ExitStatus 2013-09-04 12:08:40 -04:00
Chris Schaefer
10e58baf80 BATCH-2001: fix up property scoping, add support for resolving jobParameter references outside of step scope 2013-08-30 14:45:52 -05:00
Michael Minella
3947a0ef49 For JSR-352, removed the restriction of not being able to abnadon a completed job 2013-08-23 14:00:59 -05:00
Michael Minella
2a3bb817c0 Updated to remove run id from job parameters when using JSR 2013-08-23 11:04:31 -05:00
Michael Minella
b2b54921ae Added code to default item count to 10 when not provided in JSR DSL 2013-08-22 21:45:32 -05:00
Michael Minella
3201923299 BATCH-2072: Removed DecisionAdapter and replaced it with a DecisionStep and related classes 2013-08-22 13:48:34 -04:00
Chris Schaefer
3f85c34f00 BATCH-2002: JSR Property Substitution Language 2013-08-21 23:37:32 -04:00
Michael Minella
960166510e Fixed leaking of Job level properties into the StepContext 2013-08-16 11:19:48 -05:00
Michael Minella
656ca5855d Fixed exception behavior on JsrJobOperator#getJobInstanceCount 2013-08-15 17:02:27 -05:00
Michael Minella
d06ebaedc3 BATCH-2071: Implementation of JSR-352's requirement for loading batch artifacts via the thread local classloader
* Added a BeanFactoryPostProcessor to add bean definitions for batch artifacts referenced only by class name
* Updated the BatchPropertyBeanPostProcessor to address scope targets
* Moved the registration of the various post processors to a new JsrNamespaceUtils (similar to how they are handled with the core namespace)
2013-08-15 10:39:44 -05:00
Michael Minella
3f381ddb89 BATCH-2072: Implemented wrapper for JSR-352 Decider 2013-08-12 22:48:02 -05:00
Michael Minella
b8479493bd BATCH-2062: Added ChunkProcessor implementations to support JSR-352's chunking pattern
* Added the JsrChunkProvider implementation - a no-op ChunkProvider implementation to be used by the ChunkOrientedTasklet
* Added the JsrChunkProcessor - A simple implementation of a ChunkProcessor that handles the JSR-352 chunking pattern (read and process loop with a single write per chunk).
* Added the JsrFaultTolerantChunkProcessor - A ChunkProcessor that implements chunking the way JSR-352 requires as well as adding skip/retry functionality.
* Added builders to support the above functionality.
2013-08-09 18:05:40 -05:00
Chris Schaefer
c6fabd72a6 BATCH-2001 JSR Property support. 2013-08-09 14:59:38 -05:00
Tobias Flohre
4d9b75359d BATCH-2077 Java Config: Register listeners just once 2013-08-09 16:16:37 +02:00
Michael Minella
35c9e2ea89 BATCH-2006: Completed implementation of JobContext and StepContext
* Implemented the interfaces per the JSR-352 spec
* Added a ne StepContextFactoryBean used to add the StepContext (one per step) into the step scope to be available for injection by batch artifacts.
* Updated the StepParser to utilize the new StepContextFactoryBean.
2013-08-05 11:35:54 -05:00
Michael Minella
aa0559b4ab BATCH-2008: Completed implementaiton of JSR-352 JobInstance, JobExecution and StepExecution
* Spring Batch's native JobInstance now implements the JSR's JobInstance interface.
* SB's JobExecution can be wrapped by a JSR's JobExecution.
* SB's StepExecution can be wrappedy by a JSR's StepExecution.
* A new JsrFlowJob and JsrFlowExecutor have been introduced to correctly handle the promotion of ExitStatuses during step execution.
* The JsrJobOperator has been fixed to correctly retrieve StepExecutions (previously was not returning fully hydrated verions).
2013-08-05 11:14:50 -05:00
Michael Minella
c014f223f1 Updated BatchletAdapter to call Batchlet.stop() when apropriate 2013-08-05 10:54:36 -05:00