Commit Graph

1094 Commits

Author SHA1 Message Date
Gerald Quintana
ffc896ebbc BATCH-2282: SplitBuilder shouldn't add empty state in flow 2015-02-05 16:56:29 -06:00
Michael Minella
bd644108f7 JsrJobOperator now implements ApplicationContextAware 2015-01-02 14:22:57 -06:00
thebignet
c662914896 Added unit test to verify JobScope works when using both @EnableBatchProcessing and XML namespace 2015-01-02 12:39:31 -06:00
Michael Minella
fecbe075d4 Added ability for SystemCommandTasklet to be stopped
Prior to this commit, the SystemCommandTasklet is able to be stopped
only by an external process calling directly into it or updating the
instance of the StepExecution it holds onto.  This update allows the
tasklet to poll the job repository for stop requests in a similar way
chunk based processing does.

BATCH-2331
2014-12-31 12:10:47 -06:00
Michael Minella
92e551e05d Add ability to override JSR-352 baseContext.xml
While existing functionality provided the ability to override the
components provided in the baseContext.xml (as required for JSR-352
functionality) at a job by job level, this commit allows a user to
specify a base context for all of the JSR-352 based jobs within a JVM.
To set the location of the custom base context, a JVM property
JSR-352-BASE-CONTEXT should be set.

BATCH-2290
2014-12-30 16:16:02 -06:00
Michael Minella
c10469367f Fixed manual wiring of JsrJobOperator
While the JSR-352 provides only one way to access the JobOperator
(BatchRuntime.getJobOperator()), it is useful for testing and embedding
to be able to wire your own JsrJobOperator instance.  This commit
addresses previous issues with using the constructor that provided that
functionality.

Note: This is a breaking change in that there is a new parameter on the
non-default constructor (adding a PlatformTransactionManager reference).
Users using the JsrJobOperator through the BatchRuntime as previously
mentioned should not be impacted.  Since this is the *only* method
perscribed by the JSR to consume that class, it is not expected to have
a large impact.

This fix partially addresses BATCH-2290.
2014-12-22 16:57:16 -06:00
Michael Minella
7683700662 Filter out duplicate ApplicationContextAwareProcessors in parent/child
contexts scenarios

AbstractApplicationContextFactory, when configuring a child context,
copies all of the BeanPostProcessors from the parent to the child.
Normally this is a good thing.  However, in the case of teh
ApplicationContextAwareProcessor, the child context ends up with two
instances, one for the parent context and one for the child context.
This brings two issues to light:
  1. Unknown which context is being injected - On beans implementing
ApplicationContextAware, it can't be determined which context (the
parent or the child) will be injected since both BPPs will be called in
an indeterimant order.
 2. Errors occur with ApplicationObjectSupport - If the child context
contains a bean that extends ApplicationObjectSupport, when the second
ApplicationContextAwareProcessor is called, the bean will throw an
exception since it is only allowed to be initialized with one
application context.

This fix adds additional logic to remove the
ApplicationContextAwareProcessor from the parent context before adding
all the BPPs to the child.

This fix addresses BATCH-2319.
2014-11-05 16:34:51 -06:00
Chris Schaefer
8b26504db1 BATCH-2242: Stopping a job in STARTING state throws OptimisticLockingFailureException 2014-10-17 11:40:38 -05:00
Michael Minella
8b22a6e98d Ignoring tests that I had unignored 2014-09-24 09:34:10 -05:00
Michael Minella
5b056e8126 Handle scenario where scanned item is filtered out
BATCH-2302 documents a scenario where an item throws an exception in a
fault tollerant step in the write, then in the process, throws an
exception as well.  This leads to an infinite loop.  To address this,
prior to attempting to write items during scanning we need to validate
that the there are items to be written (we were not which was causing a
NoSuchElementException when we did inputs.next().

This commit also removes an eronous System.out left in the
CoreNamespaceUtils.
2014-09-23 14:12:48 -05:00
Michael Minella
a2f2df0b17 Conditionally add custom scopes when using XML configuration
When using a combination of Java configuration and the XML namespace
configuration, prior to this commit, we would add the batch custom
scopes twice which lead to issues.  This commit gives priority to the
custom scopes provided by the java configuration.  If you've used
@EnableBatchProcessing and have configured batch components using the
batch namespace, the custom scopes that come with the java config will
take precidence.

This commit addresses Jira BATCH-2266
2014-09-22 13:48:28 -05:00
Michael Minella
04b339b8f4 Add BeanCreationException to list of standard failure exceptions
Without this change, when passing an invalid job parameter to a bean
that is created internally by Spring Batch will cause a
BeanCreationException that is essentially ignored.  Due to it being
ignored, an infinite loop occurs in processing.
2014-09-16 11:01:30 -05:00
Chris Schaefer
47eba434d8 BATCH-1863: The batch namespace can not be used with allowBeanDefinitionOverriding=false 2014-09-15 15:05:26 -05:00
Chris Schaefer
587680ba56 XD-1027: Create script-based batch ItemProcessor 2014-07-18 11:55:17 -05:00
Michael Minella
8f8600c14d BATCH-2253: Added automatic registraiton of Job Scope to java config and
added support for a @JobScope annotation.
2014-07-18 11:55:17 -05:00
Michael Minella
752fe55e88 BATCH-2257: Added process skip count and filter count to the aggregate 2014-07-18 11:55:17 -05:00
Chris Schaefer
0f5a7af1a3 Final attempt at fixing test failure on build machine. Works as expected in a cloned plan 2014-07-18 11:55:17 -05:00
Chris Schaefer
1f8cc9a557 Re-ignore.. apparently not the appropriate fix.. 2014-07-18 11:55:17 -05:00
Chris Schaefer
3b36c132d5 Remove @Ignore from test, fix build system issue 2014-07-18 11:55:17 -05:00
Chris Schaefer
cfe2bfb60d Temporarily ignore test until build issue is fixed 2014-07-18 11:55:17 -05:00
Michael Minella
751e7162a5 BATCH-2250: Added @FixMethodOrder(MethodSorters.JVM) to override new default method sorting by JUnit 4.11 2014-07-18 11:55:17 -05:00
Chris Schaefer
1ff1e6c7d0 BATCH-2242: Stopping a job in STARTING state throws OptimisticLockingFailureException 2014-07-18 11:55:17 -05:00
Michael Minella
6b6118263b BATCH-2247: Added creation of a JobExplorer by default to address the inability to create a Map based JobExplorer using java config 2014-07-18 11:55:16 -05:00
Michael Minella
e3e16f864b XD-1390: Updated SimpleJobRepository to return StepExecutions from previous run so UNKNOWN check will apply 2014-05-27 11:06:18 -05:00
Michael Minella
88f73791fb XD-1622: Add tasklet and step type to Step's ExecutionContext for XD usage 2014-05-23 15:47:23 -05:00
Michael Minella
936d966712 Added tests to address more situations as well as cleaned up logic a bit 2014-05-22 11:31:41 -05:00
Thomas Bosch
cc6be985ad Allow multiple configs (xmls, java-files, packages) to be loaded in
ApplicationContextFactory
2014-05-22 11:30:15 -05:00
Michael Minella
9affdaf04f BATCH-2212: Updated CommandLineJobRunner to better communicate exceptions 2014-05-21 17:49:30 -05:00
Michael Minella
3dc4c2906e Renamed JobExplorer#getJobInstancesByName to JobExplorer#findJobInstancesByName 2014-05-20 10:22:38 -05:00
Michael Minella
39bb979a51 BATCH-2233: Moved JsrTestUtils to a location that is actually published with the release 2014-05-15 14:54:26 -05:00
Michael Minella
e7a4e348a5 BATCH-2229 & BATCH-2218: Removed OSGi related metadata and Maven POMs 2014-05-12 15:32:02 -05:00
Chris Schaefer
57f409e0f1 update copyright dates, fix test method typo, xml cleanup, add varg - for BATCH-2227 2014-05-07 12:29:49 -04:00
Thomas Bosch
90aca9c98b BATCH-2227: Allow multiple configs (xmls, java-files, packages) to be
loaded in ApplicationContextFactory
2014-05-07 12:29:08 -04:00
Michael Minella
6d94ae9031 Updated hsqldb urls to use MVCC mode 2014-05-05 15:08:05 -05:00
Chris Schaefer
3a1f6a27d6 Add wildcard search functionality from BATCH-1797 to MapJobInstanceDao and tests 2014-05-05 15:00:37 -04:00
willschipp
aef4db98b8 BATCH-1797 - implementation of SQL 'wildcard' search in JobInstanceDao 2014-05-05 15:00:37 -04:00
Michael Minella
6913f5c022 Updated Spring Retry to 1.1.0.RC1 2014-05-02 13:04:31 -05:00
Chris Schaefer
bd01760466 add test case for BATCH-2025 2014-05-01 19:32:36 -04:00
Michael Minella
54b3fe0b3a BATCH-2144: Removed OSGi ApplicationContextFactory 2014-04-25 09:36:49 -05:00
Gunnar Hillert
f1d71a06f4 BATCH-2144 Convert Spring Batch to use Gradle
* Use Gradle 1.11
* Remove SpringSource references
* Update JavaDoc overview
* Update Jacoco conf + Add license/manifest files
* Addresses also BATCH-2187
* Update a number of unit tests to not be ignored

Jira: https://jira.springsource.org/browse/BATCH-2144
2014-04-24 12:16:17 -05:00
Michael Minella
19618f48f9 BATCH-2204: Updated StepParserStepFactoryBean to set the buffered flag correctly when building a fault tolerant step 2014-04-21 17:59:17 -05:00
Michael Minella
ff84e1fc8e BATCH-1786: Added type to AbstractJobExplorerFactoryBean so that a cast isn't required on getObject() 2014-04-21 17:57:30 -05:00
Michael Minella
3dc2ea3cb0 BATCH-2016: Added new flag to indicate if the step is being executed on
a restart.  If it is, the transition will be followed.  If not, we'll
look to see if we should be looking for somewhere else to restart.
2014-04-21 17:48:45 -05:00
Michael Minella
e4b2a0bf7d BATCH-2185: Updated to support annotation based listener configuration via javaconfig 2014-04-21 17:46:33 -05:00
Darren Gorman
8bfc0d2ab8 Removed serialisable check on ExecutionContext entries
The serialisation/deserialisation implementation is injectable, so it does not make sense to enforce the presence of this interface
2014-04-11 16:33:35 -05:00
Michael Minella
74992367a2 BATCH-2188: Refactored package.html to package-info.java and added package-info.java to all packages that needed one 2014-04-02 16:23:09 -05:00
jpraet
b26d272d43 cleanup 2014-04-02 14:35:53 -04:00
Michael Minella
24852e3cf8 Added wait in JsrJobOperatorTests#testApplicationContextClosingAfterJobSuccessful to give application context a chance to shut down before re-running the job 2014-04-02 10:49:09 -05:00
Chris Schaefer
152abb11bd Allow property injection into any artifact rather than just JSR interface impls.
* Remove isBatchArtifact check
* Reduce BatchArtifact.BatchArtifactType into BatchArtifactType
* Import JSR JSL definition from Spring config loaded by JsrJobOperator, update test
  for property injection into Tasklet and cleanup pre-parsing checks
2014-03-31 22:01:32 -04:00
Michael Minella
88477193b4 BATCH-2194: Reference documentation for Spring Batch's JSR-352 implementation 2014-03-26 10:12:10 -05:00