Commit Graph

4914 Commits

Author SHA1 Message Date
jpraet
61638d52bd BATCH-2311 JobLauncher allows restart of job_execution with status
UNKNOWN

* additionally prevent restart of step executions with status STARTING,
STARTED or STOPPING
* additionally prevent restart of job executions with status UNKNOWN or
STOPPING
2015-06-09 10:06:15 -05:00
Christian Ramseier
77be8b97b4 use current classloader to get the proxied repository 2015-06-08 16:29:51 -05:00
Michael Minella
7be035cd3d Fixed NPE in integration test 2015-05-20 22:31:30 -05:00
Michael Minella
6b688fa2b5 Polishing BATCH-2387 2015-05-19 12:34:27 -05:00
Matthew Ouyang
dfe01f766c add new SynchronizedItemStreamReader
Decorator for an ItemStreamReader
2015-05-19 12:10:22 -05:00
Seo Kyung-Seok
834d8ee627 BATCH-2205:
MethodInvokingTaskletAdaper does not support primitive arguments.
 - Improvement of
AbstractMethodInvokingDelegator.targetClassDeclaresTargetMethod()
2015-05-18 16:22:35 -05:00
Michael Minella
55ca2bc895 Changed MySql engines to all be InnoDB
InnoDB is the only option for transactional tables in MySql.  This
change makes all the table definitions consistent (there previously were
a few that were MyISAM).

BATCH-2373
2015-05-15 16:13:00 -05:00
Michael Minella
ab80c33a2a MultiResourceItemReader executes all or none of the ItemStream methods
If no resources are found to be passed to the delegate ItemStream,
ItemStream#open is not called.  This commit updates the close side to
not call the delegate's close method if the open was not called.

BATCH-2378
2015-05-15 15:15:25 -05:00
Michael Minella
02cfe20225 Refactored to keep column aliases in certain conditions
The solution for BATCH-2079 was too agressive in that it removed table
references from columns in places that ended up in where clauses.  Since
SQL does not support the use of column aliases in where clauses, the
table references are needed.  This fix should address adding the aliases
back where needed, while keeping them out in the windowing paging query
use cases where they were problematic.

BATCH-2360
2015-05-15 14:11:31 -05:00
Michael Minella
c8f8be3b8e Added additional tests around *Aware callbacks in GenericApplicatioNContextFactory BATCH-2358 2015-05-15 11:39:47 -05:00
Michael Minella
2e8e7f67be Added documentation to communicate limitations of when using the
AsyncItemProcessor.

BATCH-2371
2015-05-14 23:27:59 -05:00
sparsick
fa01295ce6 BATCH-2359: fix for the problem that job arguments defined after an empty line are ignored 2015-04-15 09:49:59 -04:00
Michael Minella
37e7ad61b7 Updates to continue debugging 2015-04-14 14:10:51 -04:00
Michael Minella
d42692cc7a Debugging statements for broken unit test (test only fails in CI environment) 2015-04-14 13:53:05 -04:00
Jason Pell
2cdadea4b3 BATCH-2353 update sql server ddl to support ANSI NULL Default = false 2015-04-08 16:43:17 -05:00
Michael Minella
84fc0c3f7c Reset page and item count on RepositoryItemReader#close()
When closing the RepositoryItemReader, this commit now resets the
current item index and page index to be 0 so that it can be reused
imediately (instead of requiring the reader be step scoped for the reset
to occur).

BATCH-2365
2015-03-31 15:19:34 -05:00
Michael Minella
7c60b055c3 Removed dependency on ParameterizedRowMapper
To support Spring Framework 4.2 which removes ParameterizedRowMapper,
all references to that were switched to RowMapper.  As of Spring 3, the
interfaces are identicle so this should cause no backward compatability
issues.

BATCH-2369
2015-03-31 14:08:38 -05:00
Michael Minella
4c72e0407f Updated afterPropertiesSet checks to verify that fragmentRooteElementNames is not empty BATCH-2352 2015-03-06 13:06:26 -06:00
Michael Minella
8b32462072 Clear context to job name mapping when clearing contexts BATCH-2347 2015-03-06 11:54:44 -06:00
Michael Minella
acbe718d78 Fixed image reference BATCH-2340 2015-03-06 11:43:15 -06:00
Michael Minella
e3b7782a1a Fixed example code BATCH-2339 2015-03-06 10:21:37 -06:00
Michael Minella
256da94a74 Added javadoc discussing transactionality of the ItemWriteListener BATCH-2336 2015-03-06 10:15:29 -06:00
Michael Minella
5fdcc4d272 Added setter for properties in the Neo4JItemReader 2015-02-19 17:24:25 -06:00
Michael Minella
4839102ed5 Refactored AbstractJsrTestCase to expose JobOperator instance 2015-02-19 13:06:51 -06:00
Michael Minella
15e7c3bc1e BATCH-2093: Exposed DefaultBatchConfigurer#createJobLauncher for extension 2015-02-06 10:41:51 -06:00
Gerald Quintana
ffc896ebbc BATCH-2282: SplitBuilder shouldn't add empty state in flow 2015-02-05 16:56:29 -06:00
jpraet
d7fe0ab8ed BATCH-2328: PagingQueryProvider implementations should add parenthesis
around where clause
2015-02-05 12:34:42 -06:00
Michael Minella
1720807c11 Fixed SplitBuilder to behave as documentation perscribes.
This commit includes the parent builder's current state from a
SplitBuilder in the actual split.  The documentation is also updated to
note that a user should either create a flow with transitions or a flow
that splits, not both and use composition to create more complex flows.

BATCH-2346
2015-02-05 12:11:33 -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
snekse
858e10383d Removing references to AbstractJobTests which has been deprecated in favor of JobLauncherTestUtils 2014-12-30 17:13:15 -06:00
Andy Wilkinson
3e5e871163 Make use of current working dir explicit for compatibility with H2 1.4
H2 1.4 requires that file paths that are relative to the current
working directory declare this explicitly, i.e. the path
file:/some-dir must now be file:./some-dir.

This commit updates DatabaseTypeIntegrationTests to meet the
above-described requirement, thereby allowing the tests to pass when
run against H2 1.4.x.
2014-12-30 16:50:57 -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
066c59a390 Add job repository polling option to MessageChannelPartitionHandler
When using remote partitioning, each slave worker persists it's current
status in the same job repsository that the master uses.  Because of
this, there is no hard need for the master to wait for each worker to
send a formal response once it's work is complete.  Instead, the master
(at the cost of polling a db periodically) can determine if the workers
are done by looking up each partition's status in the job repository.
This commit removes the requirement for a reply channel and implements
the polling of the job repository to determine if the workers are done.

BATCH-2332
2014-12-23 16:29:41 -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
34fc9a0660 Changed repository references from http to https 2014-11-20 09:45:15 -06:00
Michael Minella
f39fc4b524 Add reflection check for Spring 4.1 in Mail Writer tests
As part of the Spring Framework 4.1 updates, the send methods on both
MailSender#send and JavaMailSender#send were converted from taking an
array to vargs.  This commit adds a reflection check to determine which
version of Spring it's being built against and uses the apropriate
mocking checks in these tests based on that check.
2014-11-10 12:57:36 -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
Michael Minella
a066647149 Change prefetch on jms tests to 0 and add @DirtiesContext to tests
With the upgrade to ActiveMQ 5.9.0 as part of Spring IO, ActiveMQ's
prefetch behavior changed.  With each call to
JmsTemplate#receiveAndConvert, the template creates a new consumer.  In
these tests, the first call created a consumer which prefetched all the
test messages on the queue, leaving them unavailable for the second
consumer the JmsTemplate created.  By setting prefetch to 0, the
messages are now available for the subsequent
JmsTemplate#receiveAndConvert calls.  This addresses BATCH-2248.
2014-10-27 17:16:49 -05:00
Michael Minella
090e6f2039 BATCH-2248: Fixes for Ldif reader tests 2014-10-17 11:40:38 -05:00
Chris Schaefer
8b26504db1 BATCH-2242: Stopping a job in STARTING state throws OptimisticLockingFailureException 2014-10-17 11:40:38 -05:00
Michael Minella
b8238908df Updated sequence initalization insert to be idempotent
BATCH-2159 provides a tweak to the insert statement used for
initializing the sequence tables used in the job repository database so
that they don't error if run multiple times as well as don't insert
multiple rows.
2014-10-17 11:12:12 -05:00
Michael Minella
2ae6388c12 Fixes the RepositoryItemReader ignoring explicitly set currentItemCount
If the user explicitly sets the currentItemCount value on a
RepositoryItemReader, prior to this commit, it is ignored.  this commit
addresses this by moving the current counter up to the correct value
when that value is set.  This fix addresses BATCH-2274.

This commit also addresses a number of compiler warnings around javadoc.
2014-10-16 17:20:48 -05:00
Michael Minella
f865eb0135 Add explicit call to afterPropertiesSet to a Flow when using Java config
When using java config, the call to SimpleFlow#afterPropertiesSet is not
called in all cases as noted in BATCH-2291.  This commit updates the
builder to explicitly make the call, and updates the SimpleFlow to be
idempotent for calls to afterPropertiesSet.
2014-10-15 14:36:13 -05:00
Michael Minella
8b22a6e98d Ignoring tests that I had unignored 2014-09-24 09:34:10 -05:00
Michael Minella
00abd5e262 Update javadoc to remove javadoc warnings 2014-09-23 14:28:43 -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
aee9dc2f6f Update stopped flag to volitile in SystemCommandTasklet
The SystemCommandTasklet checks a flag to determine if another thread
has requested that it be stopped.  Since this flag will be set via
another thread than the executing thread, it needs to be declared
volitile so that it's state is propigated across threads correctly.  The
documentation for StoppableTasklet has also been upadted to call out
that scenario.

This commit addresses Jira BATCH-2271
2014-09-22 15:39:17 -05:00
Michael Minella
1857743712 Fixed configuration of sort keys in JdbcPagingItemReader
The JdbcPagingItemReader allows the configuration of multiple sort keys.
If a user configures one of those columns with a table alias, it causes
issues.  This update strips the aliases off of the sort keys.
2014-09-22 14:58:28 -05:00