Commit Graph

130 Commits

Author SHA1 Message Date
Mahmoud Ben Hassine
e67c0069f1 Use the Chunk API consistently
This commit replaces the usage of List with Chunk
where appropriate. Summary of changes:

- The Chunk class was moved from the `org.springframework.batch.core.step.item` package to the `org.springframework.batch.item` package
- The signature of the method `ItemWriter#write(List)` was changed to `ItemWriter#write(Chunk)`
- All implementations of `ItemWriter` were updated to use the Chunk API instead of List
- All methods in the `ItemWriteListener` interface were updated to use the Chunk API instead of List
- All implementations of `ItemWriteListener` were updated to use the Chunk API instead of List
- The constructor of `ChunkRequest` was changed to accept a Chunk instead of a Collection of items
- The return type of `ChunkRequest#getItems()` was changed from List to Chunk

Resolves #3954
2022-08-19 13:40:09 +02:00
Mahmoud Ben Hassine
14b443bc64 Fix formatting 2022-08-10 11:38:58 +02:00
Mahmoud Ben Hassine
9211c2d211 Make MessageChannelPartitionHandler extend AbstractPartitionHandler 2022-08-03 10:52:36 +02:00
Henning Poettker
a393dc533d Replace deprecated IntegrationFlows 2022-07-20 18:28:34 +02:00
Taeik Lim
12bd08de07 Add package-info.java to integration 2022-07-15 23:52:11 +02:00
Mahmoud Ben Hassine
c4ad90b9b1 Apply spring-javaformat style for consistency with other projects
Resolves #4118
2022-05-25 23:06:48 +02:00
Mahmoud Ben Hassine
f85a662ebf Refine contribution #3934
* Add default methods in all listener interfaces
* Remove usage of newly deprecated support classes

Issue #3924
2021-09-10 22:05:02 +02:00
Mahmoud Ben Hassine
36b63ed283 Remove usage of master/slave terminology 2021-08-17 21:59:30 +02:00
Mahmoud Ben Hassine
bb3809cf55 Remove deprecated APIs
Resolves #3836
2021-08-17 21:14:53 +02:00
Marten Deinum
b7d144c10d Added isXXXEnabled for logging statements
Guarded the logging statements which do concatenation of strings
or calling toString on objects. When a log level isn't enabled
this still would produce garbage that would need to be collected.

Guarded all logging up to info, warn and error can be assumed to be
enabled on a production system.
2021-03-17 14:50:57 +01:00
Michael Minella
b708dfb025 Updates for GraalVM
This commit updates all places where Spring Batch uses an @Configuration
annotation to no proxy bean methods. This is needed for GraalVM support.
2020-09-08 21:54:24 +02:00
Mahmoud Ben Hassine
2306141826 Polish a7092a21e4 2019-09-17 17:06:44 +02:00
mikeldpl
a7092a21e4 Added @Nullable annotation to overriding methods.
Resolves BATCH-2839
2019-09-17 16:50:44 +02:00
Michael Minella
4b9554fcce Polish 2019-08-02 14:33:45 -05:00
Mahmoud Ben Hassine
3743894fa4 Replace "Master/Slave" with "Manager/Worker"
Resolves BATCH-2834
2019-08-02 13:13:54 -05:00
Spring Operator
d8fc58338d URL Cleanup
This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener).

# Fixed URLs

## Fixed Success
These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended.

* [ ] http://www.apache.org/licenses/ with 2 occurrences migrated to:
  https://www.apache.org/licenses/ ([https](https://www.apache.org/licenses/) result 200).
* [ ] http://www.apache.org/licenses/LICENSE-2.0 with 1796 occurrences migrated to:
  https://www.apache.org/licenses/LICENSE-2.0 ([https](https://www.apache.org/licenses/LICENSE-2.0) result 200).
2019-03-22 10:08:19 +01:00
Mahmoud Ben Hassine
76c34c7f72 fix build warnings 2018-11-29 15:17:01 +01:00
Drummond Dawson
3fe5fc3427 Replace explicit type with diamond operator in integration module 2018-11-06 21:23:43 +01:00
Mahmoud Ben Hassine
249fa2673e Fix typos 2018-10-02 22:40:56 +02:00
Mahmoud Ben Hassine
cb03c1c7ed Add JSR-305 annotations to public APIs
(Partially) Resolves BATCH-2688
2018-07-26 10:02:01 -05:00
Mahmoud Ben Hassine
d72cd67cad Make the outputChannel and messagingTemplate mutually exclusive
This commit changes the remote chunking and partitioning master step
builders to either accept an output channel or a messaging template
but not both.

See BATCH-2687
2018-07-12 17:31:15 +02:00
Mahmoud Ben Hassine
39676a45c4 Add builders to simplify remote partitioning setup
Resolves BATCH-2687

* use hard coded constants in docs
* change visibility of method `beanFactory` to public in builders
2018-07-11 17:07:40 -05:00
Mahmoud Ben Hassine
1f900ee83b Add a default constructor to StepExecutionRequest
Without a default constructor, a StepExecutionRequest instance cannot
be deserialized using Jackson. This commit adds a (private) default
constructor to fix the issue.

Resolves BATCH-2732
2018-07-05 15:34:19 -05:00
Michael Minella
98070e4a1c Polish and updated a test to validate the conditions 2018-05-25 16:46:32 -05:00
Mahmoud Ben Hassine
ee56a2320d Add builders for master/worker beans in remote chunking setup
This commit adds a new annotation `@EnableBatchIntegration` that makes
it possible to autowire two beans in the application context:

* RemoteChunkingMasterStepBuilderFactory: used to create a master step
* RemoteChunkingWorkerBuilder: used to create a worker integration flow

The goal of these new APIs is to simplify the setup of remote chunking
job by automatically configuring infrastructure beans.

Resolves BATCH-2686
2018-05-25 16:46:24 -05:00
Michael Minella
b180c75ce0 Housecleaning of build warnings 2017-09-15 15:58:22 -05:00
Michael Minella
263e978a1f Updated for various code warnings
This commit addresses a number of deprications and other code warnings.
There are still many more to address, but this is a start.
2017-05-02 12:48:03 -05:00
Michael Minella
32f723ba34 Upgraded to Spring Integration 5 2016-10-18 12:56:46 -05:00
Michael Minella
cfad543a63 Unwrap ExecutionException in the AsyncItemWriter
When using the `AsyncItemProcessor` and `AsyncItemWriter`, business
exceptions that occur during the process phase are hidden by an
`ExecutionException` that is returned wrapping the originally thrown
exception in the `AsyncItemWriter`.  In this commit, we now unwrap any
`ExecutionException` that is returned and throw the cause.  Debug
logging is also added to allow the logging of the original exception as
well.

Resolves BATCH-2386
2016-10-13 14:23:58 -05:00
Michael Minella
ad5348f32d Updated reply channel in the MessageChannePartitionHandler
When using the `MessageChannelPartitionHandler`, the reply channel is an
instance variable.  However, when the handle method is called, if a
reply channel is not injected, it will create a new one.  If multiple
jobs recycle the same instance of the partition handler, you may end up
having messages crossed/lost.  This PR removes the creation of the reply
channel for each call to the handle method and documents that this
comonent should be step scoped.

Resolves BATCH-2288
2016-10-13 12:42:39 -05:00
Michael Minella
b2e6b431dc Updated for Spring 5 baseline
The new Spring 5 baseline consists of Spring 5, Hibernate 5, and Java 8.
This commit addresses any changes to create a successful build of Spring
Batch under those guidances.  Further commits will be coming to address
Java 8 specifics as areas of the project are touched.

Resolves BATCH-2536
2016-09-30 12:34:45 -05:00
Michael Minella
f4c0530730 Upgraded dependency versions and minor polish 2016-08-09 13:19:14 -05:00
Philippe Marschall
3783345c55 BATCH-2412 Add guards around debug statements
In various places in the code base a debug message is constructed
unconditionally. This adds unnecessary overhead in the common case when
debug logging is off.

 - add guards around debug statements in non-test code

Issue: BATCH-2412
2015-08-05 12:04:44 -05:00
Amer Aljovic
716c9baff3 BATCH-2312 Implement ItemStream in AsyncItemWriter
This commit adds the feature of allowing a delegate ItemWriter to be an
ItemStreamWriter and have Spring Batch respect the ItemStream lifecycle
events without explicitly configuring the delegate as a stream.
2015-07-09 16:58:59 -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
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
2fec70d25e Add null check to AsyncItemWriter
The AsyncItemWriter is used in conjunction with the AsyncItemProcessor
to unwrap the Futures that are returned by that processor.
Traditionally when an ItemProcessor returns null, it's considered having
been filtered out and should not be passed to the ItemWriter.  In this
case, the AsyncItemWriter was not checking for nulls so they were being
passed to the delegate ItemWriter.  Most of the OOTB ItemWriters do not
perform a null check prior to doing the write so they were throwing NPEs
when using this paradigm.
2014-09-11 11:53:17 -05:00
Chris Schaefer
4f32f623f0 BATCH-2241 & BATCH-2243 - add namespace support for remote chunking 2014-09-03 01:10:47 -04:00
Michael Minella
deb4c6fb5b BATCH-2283: Updated MessageChannelPartitionHandler to return null when no partitions are specified 2014-08-06 14:52:02 -05:00
Michael Minella
e7a4e348a5 BATCH-2229 & BATCH-2218: Removed OSGi related metadata and Maven POMs 2014-05-12 15:32:02 -05:00
Michael Minella
f6b83167ac XD-1389: Added null check when receiving partitioned messages back to handle timeouts 2014-05-01 09:48:02 -05:00
Michael Minella
9d17a3d088 Updated Spring Batch Integration to use Spring Integration 4.0.0.RC1 2014-04-16 09:44:46 -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
Gary Russell
7954bbdf9d SPR 4.0.0.RELEASE and SI 4.0.0.M2 Compatibility
Updates to make spring-batch-integration compatible with these releases.
2014-01-07 14:07:28 -06:00
Gary Russell
5105f59dd1 Initial SF/SI 4
More
2014-01-07 14:07:28 -06:00
Michael Minella
aa099d226c BATCHADM-161: Tightened up tests and XML configurations 2014-01-07 13:35:12 -06:00
Gunnar Hillert
3909b75151 BATCHADM-161 - Add Job Launching Gateway
For reference see: https://jira.springsource.org/browse/BATCHADM-161

* Add XML Schema
* Add Namespace Handler
* Add Parser and Gateway classes
* Add tests
2014-01-07 13:35:12 -06:00
willschipp
f23dd64740 BATCHADM-137 - added optional setting of the replyChannel externally in
the messagechannelparitionhandler
2014-01-07 13:35:12 -06:00
Michael Minella
9c942734e6 BATCHADM-155: Updated to support Spring Batch 2.2.0 2014-01-07 13:35:12 -06:00
Dave Syer
57993c31af BATCHADM-102: Change MessageChannelPartitionHandler to not require a replyChannl 2014-01-07 13:33:50 -06:00