Commit Graph

1178 Commits

Author SHA1 Message Date
Mahmoud Ben Hassine
a30aaac4be Improve generic type handling in RepositoryItemReader 2022-07-17 08:18:20 +02:00
Mahmoud Ben Hassine
5ba363c8ab Remove RepositoryMethodReference from RepositoryItemReaderBuilder
This class and its usage have been reported to be confusing and
causing context startup failures without real added value.

This commit removes that class to simplify the creation
of a RepositoryItemReader through its builder.

Resolves #793
2022-07-17 06:58:29 +02:00
Mahmoud Ben Hassine
5a69b6b28b Upgrade Hibernate to version 6.1.1.Final 2022-07-13 18:42:39 +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
df8dac19df Change default encoding to UTF-8 in file-based readers and writers
This commit overrides the fix in #3910 by using UTF-8
as default encoding in file-based item readers and writers.

Issue #1154
2022-05-17 20:07:03 +02:00
Mahmoud Ben Hassine
5bce15288a Change Resource to WritableResource in file-based item writers
Resolves #756
2022-05-09 11:03:22 +02:00
Mahmoud Ben Hassine
6dad2a2d81 Fix NPE in MongoItemReader when sorting is not specified through the builder
Resolves #4082
2022-05-05 15:57:51 +02:00
Drummond Dawson
15e18e5fcd Add constructors with var args/Lists
For classes that have a setter for a List<T> field,
create Constructors that take List<T> and var args of T.

Issue #686
2022-03-21 17:16:24 +01:00
Mahmoud Ben Hassine
968a5b5b2e Refine contribution #595
- Update versions of jdbc driver and docker image
- Update Javadocs
- Remove JOB_CONFIGURATION_LOCATION from DDL schema
- Remove unused resources
2022-03-18 17:45:36 +01:00
Jonathan Bregler
9388abb589 Integrate SAP Hana as supported Spring Batch database
This commit adds SAP HANA as a supported Spring Batch database, enabling
developers to seamlessly move their existing Spring Batch projects to SAP HANA
or easily starting new Spring Batch projects on SAP HANA.

This commit contains the following changes:

- Add SAP HANA to the DatabaseType enum
- Add HanaPagingQueryProvider and tests
- Add properties files for SAP HANA

Issue #2515
2022-03-18 16:52:50 +01:00
Edgar Asatryan
2e68451cf3 Check arguments of MongoItemReader#setSort
Issue #4014
2022-02-23 12:29:21 +01:00
me
212b3ce950 change parameterValues check -> CollectionUtils.isEmpty
Resolves #4021
2022-02-22 14:08:25 +01:00
Henning Poettker
d23d4f9dde Adapt H2PagingQueryProvider for H2 v2.x
Issue #4047
2022-01-18 16:10:00 +01:00
Mahmoud Ben Hassine
e5c752b4b8 Remove JSR-352 implementation
Resolves #3894
2021-12-13 09:57:48 +01:00
Mahmoud Ben Hassine
5dc17b190e Upgrade dependencies to major versions for Spring Batch 5
* Upgrade to Jakarta EE 9
* Upgrade to Spring Framework 6
* Upgrade to Spring Integration 6
* Upgrade to Spring Data 3
* Upgrade to Spring AMQP 3
* Upgrade to Spring for Apache Kafka 3

LDIF support is still in progress waiting for the next
major version of Spring LDAP.

Closes #4027
Closes #3656
2021-11-22 12:16:49 +01:00
Mahmoud Ben Hassine
2a9904bae1 Add version in deprecation note in SqlPagingQueryUtils 2021-11-03 15:37:57 +01:00
Henning Pöttker
78ddf44730 Fix multi-threaded empty read for JdbcPagingItemReader
On empty input, the JdbcPagingItemReader cannot derive
a start value for the sort key to be used in further
queries. For multi-threaded steps, it is thus necessary
to prevent the reader from trying to read further pages
if the first page is empty.

Issue #3898
2021-09-24 10:08:48 +02:00
Mahmoud Ben Hassine
21118caf4f Fix Javadoc unclosed tag 2021-09-21 14:52:37 +02:00
Mahmoud Ben Hassine
fe911c8456 Update SQLServer DDL script to use sequences instead of tables
Emulating sequences with tables causes deadlocks when running
multiple jobs at the same time. Sequences have been supported
in SQL Server since version 2012.

This commit replaces the usage of tables to emulate sequences
with real sequences. It also adds a new incrementer that is
based on sequences instead of tables.

Resolves #1448
2021-09-17 20:25:13 +02:00
Mahmoud Ben Hassine
e8bbde10e5 Remove unused imports 2021-09-12 22:23:56 +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
36b1d0af3c Remove unused parameter in SqlPagingQueryUtils#generateLimitGroupedSqlQuery 2021-09-09 21:01:54 +02:00
Glenn Renfro
6c619b9f94 FlatFileItemWriter now uses charset to determine default encoding
It now matches the encoding scheme of FlatFileItemReader

Resolves #1154
2021-09-09 15:03:58 +02:00
Rémi Kaeffer
a6d68138ff Fix double "the" typo everywhere in source code 2021-09-03 19:07:19 +02:00
Henning Pöttker
9f4127fb1d Fix HippyMethodInvoker by not considering unsuitable candidates
Resolves #3794
2021-09-03 14:43:54 +02:00
Mahmoud Ben Hassine
e2c0b891c8 Deprecate support for Neo4j
This commit deprecates support for Neo4j
in favor of the spring-batch-neo4j extension

Resolves #3956
2021-09-02 13:19:53 +02:00
Ilya Samartsev
595abff170 Fix NPE in sql exception translation
Resolves #3968
2021-08-18 20:06:41 +02:00
Mahmoud Ben Hassine
bb3809cf55 Remove deprecated APIs
Resolves #3836
2021-08-17 21:14:53 +02:00
Mahmoud Ben Hassine
f995c83b16 Extract count key as constant in ResourcesItemReader 2021-08-12 22:12:00 +02:00
Mahmoud Ben Hassine
f83ba20173 Remove usage of reflection to call session.close in HibernateItemReaderHelper 2021-08-12 21:59:55 +02:00
Mahmoud Ben Hassine
27e11b52f9 Remove usage of deprecated APIs
Resolves #3838
2021-08-12 15:51:02 +02:00
Mahmoud Ben Hassine
31899d5fc3 Remove usage of deprecated APIs
Issue #3838
2021-08-11 20:23:12 +02:00
Henning Pöttker
64c09c523e Replaces deprecated interfaces
Replaces the deprecated
- type InstantiationAwareBeanPostProcessorAdapter
- type GenericTypeResolver
- method StringUtils::isEmpty
- field BigDecimal::ROUND_HALF_UP

Issue #3838
2021-08-11 15:20:18 +02:00
Henning Pöttker
7242f8fe77 Replace deprecated TransactionSynchronizationAdapter
Issue #3838
2021-08-10 15:28:02 +02:00
Philippe Marschall
f15edd414a Fix some raw types 2021-08-10 12:41:19 +02:00
Henning Pöttker
8258325413 Refactor deprecated method extractDatabaseMetaData
Issue #3838
2021-08-09 18:22:35 +02:00
Mahmoud Ben Hassine
66c33372a6 Remove unused logger in MongoItemReader 2021-08-05 21:17:26 +02:00
abielewicz
f4e14ddf66 Change the order in which datum writer is selected
Due to GenericRecord being checked before SpecificRecordBase,
GenericDatumWriter was used incorrectly for types that extend
SpecificRecordBase.

Resolves #3859
2021-05-18 17:46:31 +02:00
이동욱
4b8331d724 Replace ArrayList with LinkedList in ListItemReader
Issue #3782
2021-05-18 10:30:20 +02:00
Parikshit Dutta
d76c083b04 Updated verifyCursorPosition default to true in JdbcCursorItemReaderBuilder
Issue #3893
2021-05-12 14:51:00 +02:00
Marten Deinum
11bac7c4e1 Reduce the toCharArray overhead
Both the PatternMatcher and JdbcParameterUtils use String.toCharArray for
processing. This will create a new char[] which needs to be collected. The
same code has been rewritten to use String.charAt to reduce the overhead.

Additionally unneeded object creation in the PatternMatcher has been removed
as well, to reduce further objects needed to be gc'ed.
2021-03-17 18:25:18 +01:00
Marten Deinum
e9bdcc6d66 Better sizes for StringBuilder
StringBuilder by default has a size of 16, however there
are some places that already create larger strings already.
For efficiency and garbage reduction it would be better to have
larger sizes to begin with.
2021-03-17 15:50:38 +01: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
Niels Ferguson
63b6dea514 Fix incorrect usage of StringBuilder#append in TransactionAwareBufferedWriter
Issue #3745
2021-03-10 10:13:24 +01:00
Mahmoud Ben Hassine
a15496805b Add timeout when flushing items to Kafka in KafkaItemWriter
Issue #3773
2021-03-09 14:48:25 +01:00
Mahmoud Ben Hassine
572a302725 Refine contribution #3827
* Update year in licence headers
* Update Javadoc
* Add `this` keyword where appropriate
2021-03-09 14:07:15 +01:00
Jacob Botuck
c886a60b4d KafkaItemWriter.write should not return until items are confirmed to have been written
Issue #3773
2021-03-09 14:04:19 +01:00
Mahmoud Ben Hassine
7b2d7d1993 Refine af14a2e471
* Make default constructors call other constructors with default values
* Fix formatting
* Update year in license headers
2021-02-23 15:56:51 +01:00
Marten Deinum
af14a2e471 Provide constructors for injection
Currently when reading/writing JSON and using the reader/marshaller provided
and you want a custom Gson or ObjectMapper instance it still creates the not
needed instance. Move the construction to a constructor and provide a constructor
to directly pass in the pre-configured Gson or ObjectMapper instance.

The same approach is used in Spring itself where Gson or ObjectMapper instances
can be passed in.
2021-02-23 15:39:53 +01:00
Mahmoud Ben Hassine
fa26246d80 Fix Javadoc errors 2021-02-02 13:43:24 +01:00