Commit Graph

307 Commits

Author SHA1 Message Date
Henning Poettker
93fd2c9a3f Keep heap lean during remote partition polling
Resolves #4598
2024-05-21 23:18:09 +02:00
Mahmoud Ben Hassine
c451e6be90 Add native runtime hints for remote partitioning types
Resolves #4564
2024-03-25 11:29:19 +01:00
Henning Poettker
89e0a0cd86 Deprecate overrides of StepBuilderHelper#repository for removal 2023-11-21 23:19:03 +01:00
ParadiseCHOI
48925f0db4 Remove unnecessary expressions in AsyncItemWriter
Issue #4009
2023-09-14 11:34:07 +02:00
Shaoqiang Lu
1add2830f5 Auto-detect the class/interface to be mocked
Issue #4426
2023-08-03 09:51:59 +02:00
Mahmoud Ben Hassine
52064c0541 Code cleanup
- Inline variables
- Remove unused variables
- Remove redundant array creation
- Remove redundant `@SuppressWarnings`
- Remove unnecessary exceptions from throws list
- Remove redundant initializers
- Use List.subList().clear() where appropriate
- Use try-with-resources where needed
- Use pattern variables where appropriate
2023-07-12 23:25:18 +02:00
Mahmoud Ben Hassine
4763480c57 Fix compiler warnings
- Add `@Nullable` where needed
- Suppress warnings where appropriate
- Add generic type definitions
2023-07-12 20:55:18 +02:00
Mahmoud Ben Hassine
f4c663c452 Fix JobLaunchingGatewayParserTests
The default value of sendTimeout in MessagingTemplate
was changed from -1 to 30000 in SI 6.1

Related to https://github.com/spring-projects/spring-integration/pull/8580
2023-07-06 12:05:16 +02:00
Mahmoud Ben Hassine
2ba3785adc Upgrade Spring dependencies to latest snapshots 2023-07-06 10:07:45 +02:00
Mahmoud Ben Hassine
f82c16b825 Fix javadoc errors and warnings
Resolves #1624
2023-07-06 06:46:26 +02:00
Mahmoud Ben Hassine
d6904ba43b Add/Update deprecation notice 2023-07-05 08:37:01 +02:00
Mahmoud Ben Hassine
0a1cdb095f Mark fields as final where appropriate 2023-07-05 08:03:48 +02:00
Mahmoud Ben Hassine
241e37e672 Remove concatenation with empty string 2023-07-05 08:03:47 +02:00
Mahmoud Ben Hassine
b5e7269847 Remove unnecessary return statements 2023-07-04 21:17:42 +02:00
Mahmoud Ben Hassine
5c8cb7663f Make inner classes static 2023-07-04 21:03:55 +02:00
Mahmoud Ben Hassine
167f3c427d Remove usage of raw parametrized types 2023-07-04 19:03:18 +02:00
Mahmoud Ben Hassine
cf9cc62a81 Refactor tests in spring-batch-integration
- Remove unused resources
- Fix logging libraries conflicts
- Merge duplicate data source configuration
2023-06-27 15:26:12 +02:00
Mahmoud Ben Hassine
ee30af4789 Remove redundant "extends Object" 2023-06-22 11:17:13 +02:00
Mahmoud Ben Hassine
93d911e100 Use lambdas and method references where appropriate 2023-06-12 16:43:46 +02:00
Mahmoud Ben Hassine
0bfe31e569 Remove stack traces from tests 2023-06-07 15:54:19 +02:00
Mahmoud Ben Hassine
7f80b7230b Remove System.err.println from tests 2023-06-07 15:47:56 +02:00
Mahmoud Ben Hassine
98c426ca4f Remove System.out.println from tests 2023-06-07 15:47:56 +02:00
Mahmoud Ben Hassine
92159cbc2b Use diamond operator where appropriate 2023-06-05 13:48:49 +02:00
Mahmoud Ben Hassine
0dc5b63469 Replace identical catch sections with multi-catch blocks 2023-06-05 13:30:23 +02:00
Mahmoud Ben Hassine
c25cd55901 Upgrade spring-javaformat maven plugin to version 0.0.39 2023-06-05 11:11:48 +02:00
Mahmoud Ben Hassine
972951a40a Remove unused imports and apply imports code style 2023-04-11 16:28:36 +02:00
Henning Poettker
e61065ab00 Reduce use of deprecated APIs 2023-03-29 15:34:48 +02:00
Mahmoud Ben Hassine
dbdbf787e6 Update Javadocs 2023-03-21 17:51:53 +01:00
Henning Poettker
93800c6bae Improve step execution polling and retrieval
Resolves #3790

---
Ported from c68da18 without the JSR related bits
2023-02-22 10:10:11 +01:00
Mahmoud Ben Hassine
558ad29f5b Remove version suffix from XSD schema
This is to be consistent with other XSDs from the portfolio
where the file with the latest XSD is not suffixed with a version.
2023-02-20 22:53:18 +01:00
Mahmoud Ben Hassine
40109584bf Add missing AOT hints for Spring Batch integration module
Resolves #4307
2023-02-20 11:10:03 +01:00
Taeik Lim
15f3637ac8 Polish code indent in Javadocs 2023-02-13 13:42:52 +01:00
Danilo Piazzalunga
fc0ec01ff8 Throw IllegalStateException from afterPropertiesSet
Consistently use Assert.state in the afterPropertiesSet()
methods to throw IllegalStateException instead of
IllegalArgumentException when some properties are missing
and/or invalid.

Resolves #2244
2022-11-23 12:22:26 +01:00
Mahmoud Ben Hassine
b9d6e26d61 Open ChunkMessageChannelItemWriter for extension
Resolves #952
2022-11-23 10:51:26 +01:00
Mahmoud Ben Hassine
596ee705c8 Refine contribution #3932
* Add default methods in interfaces
* Update tests/Javadoc
* Optimize imports
* Apply code style formatting
2022-11-23 08:08:23 +01:00
Parikshit Dutta
5a35b03300 Add getJobInstance method in JobExplorer/JobRepository
Resolves #3930
2022-11-23 07:44:24 +01:00
Mahmoud Ben Hassine
2edd4006d2 Change the return type of counting methods in various DAOs from int to long
This is required for job repository/explorer implementations
that use the Long type to count records in the database.

Resolves #4227
2022-11-08 22:06:16 +01:00
Mahmoud Ben Hassine
219fd7f2e2 Deprecate DelegateStep 2022-10-12 18:50:13 +02:00
Mahmoud Ben Hassine
2660f2bb27 Add support to use any type as a job parameter
This commit also changes the way job parameters
are parsed and persisted.

NB: This commit should ideally have been split
into two change sets. But the changes are tightly
related that is was not possible to separate them.

Related to:

* https://github.com/spring-projects/spring-batch/issues/3960
* https://github.com/spring-projects/spring-batch/issues/2122
* https://github.com/spring-projects/spring-batch/issues/1035
* https://github.com/spring-projects/spring-batch/issues/1983
2022-10-04 20:35:50 +02:00
Mahmoud Ben Hassine
39b8279831 Fix incorrect reference to SimpleJdbcTemplate in reference documentation
Resolves #4197
2022-09-22 07:11:33 +02:00
Mahmoud Ben Hassine
40b4be3c14 Add transaction support in JobExplorerFactoryBean
This commit adds support to create a transactional
proxy around the JobExplorer created by the
JobExplorerFactoryBean.

Resolves #1307
2022-09-21 03:28:59 +02:00
Mahmoud Ben Hassine
0a71cb7d93 Fix Javadoc of RemoteChunkingManagerStepBuilder 2022-09-21 02:43:42 +02:00
Mahmoud Ben Hassine
48e437ae17 Revisit the configuration code of EnableBatchProcessing
Before this commit, the configuration of infrastructure beans
was confusing and not straightforward to customize. This commit
changes the way Batch infrastructure beans are configured.
The most important changes are:

* EnableBatchProcessing now provides new attributes to
configure properties of infrastructure beans
* Bean registration is now done programmatically with a
BeanDefinitionRegistrar instead of importing a class with
statically annotated bean definition methods
* Bean are now resolved from the application context directly
instead of being resolved from a BatchConfigurer
* Both a data source and a transaction manager are now
required to be defined in the application context
* A new configuration class called DefaultBatchConfiguration
with default infrastructure bean definitions is now provided
and can be extended to customize the default configuration

Resolves #3942
2022-09-20 12:24:10 +02:00
Mahmoud Ben Hassine
f39f07075a Improve Step/Job builder APIs to guide users to set mandatory properties
Before this commit, the user had to manually set the job repository and transaction
manager on `JobBuilder` and `StepBuilder` instances with a chained call to
`.repository(jobRepository)` and `.transactionManager(transactionManager)`.
This is error prone and can lead to runtime errors if these properties are not set.

This commit introduces new APIs to guide the user to set these properties at
builder creation time.

Resolves #4192
2022-09-17 22:31:12 +02:00
Mahmoud Ben Hassine
7c8fb172a7 Move the transaction manager configuration to AbstractTaskletStepBuilder
Before this commit, the transaction manager was configurable
at the StepBuilder level, which is inconsistent with the XML
config style in addition to be not needed for most step types.

This commit moves the configuration of the transaction manager
from the StepBuilder down to the AbstractTaskletStepBuilder,
which is the level where the transaction manager is needed.

Resolves #4130
2022-09-08 11:35:14 +02:00
Mahmoud Ben Hassine
fe40370f39 Refine contribution #4167
The documentation generation change introduced
in #4167 seems to scan more files than previously
WRT checking the code formatting style.

This commit fixes the formatting of the files
that do not conform to the Spring style.
2022-08-21 09:52:35 +02:00
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
ae5ffd273a Migrate Spring Batch Integration to JUnit Jupiter 2022-08-02 18:24:15 +02:00