Commit Graph

1094 Commits

Author SHA1 Message Date
Michael Minella
de7df9c1f1 BATCH-2048: Simplified the use fo a MapJobRepository by making the DataSource optional 2014-03-21 11:41:00 -05:00
Michael Minella
a8aa3f907b BATCH-1786: Added the type to the AbstractJobRepositoryFactoryBean's FactoryBean definition and depricated AbstractJobRepositoryFactoryBean#getJobRepository in favor of FactoryBean#getObject() 2014-03-18 16:30:47 -05:00
jpraet
08aa9eb589 BATCH-2178: allow injection of custom JdbcOperations implementation in
JobRepositoryFactoryBean and JobExplorerFactoryBean
2014-03-05 14:57:58 -06:00
Michael Minella
ac81a97d0d BATCH-2078: Close application contexts as batch jobs finish 2014-03-05 11:53:40 -06:00
Chris Schaefer
162d285a4d Call StepSynchronizationManager.close() in before method 2014-03-05 10:47:50 -05:00
Michael Minella
7eabb5e040 BATCH-2146: Renamed JSR specific artifacts to be prefixed so they are easily identifiable 2014-03-05 09:46:30 -05:00
Chris Schaefer
fe05e0daaf Updates from the JSR 352 v1.0 Maintenance Release 20140214 Draft 2
* Per added section 9.3.2 - do not automatically make job properties available
  to artifacts when using @BatchProperty. Job properties are only available to
  artifacts when using the jobProperties substitution mechanism.

* Update tests to reflect changes
2014-02-28 17:16:40 -06:00
Chris Schaefer
319c751432 BATCH-2127: Refactor JSR Properties for outside of parsing use cases
* Main cleanups in BatchPropertyContext/PropertyParser, get rid of BatchPropertyContextEntry
2014-02-28 17:16:40 -06:00
Michael Minella
43d1b6eafb BATCH-2045: Updated error message to identify that the XSD isn't compatable with the current version of Spring Batch 2014-02-28 13:36:43 -06:00
jpraet
ad5c7b29d2 add and fix unit tests related to BATCH-1980 2014-02-21 16:59:53 -06:00
Michael Minella
3510285c8b BATCH-2179: Updated to add unidentifying flag to properties as they are returned if applicable 2014-02-20 16:18:51 -06:00
Chris Schaefer
ef0823938c BATCH-2111: Java 8 / Upgrade to Spring 4
* Upgrade Spring framework to 4.0.2.RELEASE
* Upgrade maven compiler plugin to 3.1
* Use LinkedHashMap to preseve ordering in AbstractFlowParser (found when upgrading to JDK 8)
* Match on EnhancerBySpringCGLIB in StepScopeProxyTargetClassOverrideIntegrationTests (SPR-11398)
2014-02-20 12:53:32 -06:00
Michael Minella
f53ef655e4 BATCH-2175: Added the ability to inject lobType 2014-02-20 11:22:23 -06:00
Chris Schaefer
f87bf69dcf PartitionParserTests fixes
testFullPartitionConfigurationWithMapperSuppliedProperties
* remove assert on PartitionMapper.name as PropertyPartitionMapper is used and
  PartitionMapper.name does not get populated.

testFullPartitionConfigurationWithHardcodedProperties
* when run as part of the suite, the static fields name was populated by another test case.
  add explicit reference and hardcoded property to job def
2014-02-18 12:46:53 -05:00
Michael Minella
6211c95d42 Fixed the way default java.util.Properteis are handled on restarts 2014-02-13 10:55:58 -06:00
Chris Schaefer
a1ee097dd4 * During pre-parsing of XML look for references to the same bean and if multiple
matches found, create new bean definitions and update the reference in the preprocessed
XML to allow for unique instances.

* Use job scope for job level listeners

* Remove call to application context close in JsrJobOperator.restart

Fixes TCK tests:
--
testTransitionElementOnAttrValuesWithRestartJobParamOverrides
testChunkArtifactInstanceUniqueness
testOneArtifactIsJobAndStepListener
2014-02-12 17:11:06 -05:00
Michael Minella
1a6ba98fc4 Created a JSR-352 specific StepState to maintain in the Job's
ExecutionContext what the last step executed was.  This is needed for
restarts when the step to restart at is a DecisionStep.
2014-02-12 12:21:44 -06:00
Michael Minella
9317ab2565 BATCH-2112: Removed Spring Batch's SerializationUtils in favor of the Spring Core version 2014-02-12 11:23:03 -06:00
Michael Minella
0b5bad920b Updated per code review 2014-02-11 11:36:05 -06:00
Michael Minella
9a5f59f749 Updated to handle the transition between splits and decisions 2014-02-10 17:18:32 -06:00
Michael Minella
70875e946a Changed FlowParser to always include a transition for COMPLETED unless a next attribute is present 2014-02-06 13:03:45 -06:00
Michael Minella
b278239751 BATCH-2110: Updated batch to support Spring 4
* Refactored iBatis based readers and writers to not utilize
 SqlMapClientTemplate.
* Depricated all iBatis based readers and writers in favor of MyBatis's
 native Spring support.
* Updated XStream support to 1.4.4 and Jettison to 1.2 to be in
 alignment with Spring 4.
* Added the PooledEmbeddedDataSource to address the issue outlined in
 SPR-11372.
2014-02-06 11:34:33 -06:00
Michael Minella
3853088394 Updated to correctly handle state management on restarts per JSR-352
* Added a JSR-352 specific StepHandler implementation
(DefaultStepHandler)
* Added logic to DefaultFlow to correctly lookup where to restart a job
that was previously stopped.
2014-01-17 14:45:47 -06:00
Michael Minella
8f9783f0d4 Created JSR-352 specific SplitState to address resetting the JobExecution's ExitStatus after a split executes 2014-01-16 16:24:19 -06:00
Chris Schaefer
ea7a704299 Add failed transition if none exists when next attribute is used.
Fixes TCK test testStartLimitVariation1
2014-01-13 16:13:44 -05:00
Michael Minella
b0c9af5e8e Fixes for stopping a partitioned step
* StepState now implements StepLocator so that the step it wraps can return slave steps in the case of a partitioned step
* FlowJob and SimpleJob now look for a StepLocator as they look for steps
* The JSR-352 version of PartitionStep implements StepLocator
2014-01-08 13:51:49 -06:00
Michael Minella
62c541ee42 Implemented the restart functionality for a partitioned step
* Updated parsers to address the allowStartIfComplete flag on
 partitioned steps
* Updated factory beans to address the above flag and injecting a
 JobRepository reference where needed
* Updated how state is restored for a JSR-352 partitioned step
* Fixed the synchronization around the queue used for a
 PartitionCollecotr and PartitionAnalyzer works
2014-01-03 13:13:17 -06:00
Michael Minella
681c1dccd9 Changed the exception being thrown in the ChunkListenerAdatper from BatchRuntimeExcpetion to UncheckedTransactionException so it will be unwrapped by TaskletStep 2014-01-02 14:53:53 -06:00
Chris Schaefer
c46a134539 * Update copyright year
* Move addition of state transition for elements with a next transition to be last
* Move restartable check into run method on restart to avoid NPE in factory bean due to null JobExecution.
* Add tests

Transition shuffle fixes TCK test testInvokeJobWithUncaughtExceptionFailAndRestart, NPE fix contributes to other tests but does not fix completely.
2014-01-02 14:32:24 -05:00
Michael Minella
874b92d4b2 BATCH-2151: Clean up ChunkMonitor offset on chunk boundries 2013-12-30 12:06:43 -06:00
Tobias Flohre
6edc91fcea BATCH-2149 2013-12-30 12:06:43 -06:00
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