Commit Graph

5169 Commits

Author SHA1 Message Date
Mahmoud Ben Hassine
79f3a67883 BATCH-2397: fix parameters handling in MethodInvokingTaskletAdapter
When a tasklet is declared with xml using the shortcut version, the
MethodInvokingTaskletAdapter that is created automatically does not
address passing parameters expected by Tasklet#execute (which is
incorrect since the documentation of the schema attribute "method"
says the bean should define a method with the same signature).

This commit fixes parameters passing when using the shortcut version.

Resolves BATCH-2397
2018-01-26 13:15:20 -06:00
Jay Bryant
0d9f4ce6f1 New toggle implementation
I made a new implementation of the XML/Java toggle (and added a third choice for having both available).

Changes to make a dynamic ToC work with content selection toggles

Various asciidoc and JavaScript changes to make the dynamic ToC (tocbot) work with the content toggle (XML or Java in this case but also more options in other projects).
2018-01-26 11:52:51 -06:00
Mahmoud Ben Hassine
54f3a5c837 BATCH-2465: add note about the importance to have a unique key constraint on the sortKey 2018-01-25 17:29:56 -06:00
Mahmoud Ben Hassine
8af6841fa6 BATCH-2672: add method to set the encoding in the FlatFileItemReaderBuilder 2018-01-25 15:05:04 +01:00
Mahmoud Ben Hassine
c78701a871 BATCH-2663: re-initialize filter count when scanning a chunk
Before this commit, the filter count of the contribution was applied
for each item of a scanned chunk. For example, with a chunk of 30,
if the filter count is 10 and an item is skipped during write, then the
filter count is equal to 210 (10 + 20 * 10).

If this commit is applied, the filter count will be re-initialized when
scanning the chunk.

Resolves BATCH-2663
2018-01-24 15:09:07 -06:00
Mahmoud Ben Hassine
d81ab76823 BATCH-2667: update warning message to be more explicit
Before this commit, when a job execution is stopped from a different
JVM than the one running the job, a warning says that the job cannot
be found. This was confusing to some users since the job can be found
in the database (but is actually not defined in the job registry of
the application context of the second JVM).

After this commit is applied, the warning will be more explicit to
inform the user that the job cannot be found in the job registry
(to not be confused with the database)

Resolves BATCH-2667
2018-01-19 21:24:06 +01:00
Mahmoud Ben Hassine
020d0519ac BATCH-2669: Fix code examples in "Configuring and Running a Job" section
of the documentation
2018-01-12 11:03:58 -06:00
Mahmoud Ben Hassine
390786dc90 Fix dead links in CONTRIBUTING.md 2018-01-12 10:40:42 -06:00
Mahmoud Ben Hassine
658aa69c6b Fix typos in README.md 2018-01-11 10:33:30 -06:00
Mahmoud Ben Hassine
a0773cac9b BATCH-2668: Fixed failing test on CET timezone
In order to convert a String value to a Date, The `DefaultConversionService`
uses the constructor `java.util.Date(java.lang.String)` behind the scene
(from `org.springframework.core.convert.support.ObjectToObjectConverter.convert`).

This constructor throws a `java.lang.IllegalArgumentException` for values in
CET timezone, for example: "Thu Jan 04 09:05:50 CET 2018".

This commit updates the failing test to use a fixed timezone (UTC).

Resolves BATCH-2668
2018-01-11 08:07:54 -06:00
Mahmoud Ben Hassine
c61809e158 BATCH-2662: Fix syntax highlighting of Java example in 1.1.1 section
of the documentation
2018-01-08 13:52:40 +01:00
Arthur Portas
19160b4296 BATCH-2519: Fix TYPO
JIRA: https://jira.spring.io/browse/BATCH-2519

    * TYPO  `Posion` correction
2017-12-26 16:49:12 +00:00
Spring Buildmaster
890e7d13ab [artifactory-release] Next development version 2017-12-01 17:40:08 +00:00
Michael Minella
8ccb16c6d1 Reset version to retry release 2017-12-01 11:08:55 -06:00
Michael Minella
81107ec6a6 Updated Spring Integration version 2017-12-01 11:07:33 -06:00
Spring Buildmaster
8ddcc57024 [artifactory-release] Next development version 2017-12-01 16:50:24 +00:00
Michael Minella
1f23394992 Removed incorrect parens 2017-12-01 07:21:29 -06:00
Michael Minella
7211947553 Polish 2017-12-01 06:49:16 -06:00
Philippe Marschall
73ca73688d BATCH-2417 Drop JAXP 1.3 support
Spring 4 requires JDK 6 which includes JAXP 1.4. In Spring 4
`org.springframework.util.xml.StaxUtils` is public and directly
delegates to `javax.xml.transform.stax.StAXSource`. This means that
`org.springframework.batch.item.xml.StaxUtils#hasSpring30StaxSupport`
will always be true. Therefore a lot of code an be simplified by
calling the constructors directly instead of through reflection.

 - remove reflection no longer needed in Spring 4
 - move methods only used in tests to custom test class

Issue: BATCH-2417
2017-12-01 06:31:37 -06:00
Michael Minella
7a3a72f5ca Updated copyright date 2017-11-30 15:28:12 -06:00
Alexis Hafner
3a3404412c BATCH-2543 New method on DefaultBatchConfigurer 2017-11-30 15:20:01 -06:00
Michael Minella
40db8a770f Polish 2017-11-30 15:01:02 -06:00
Michael Minella
1c9c30c10d Polish 2017-11-30 12:13:38 -06:00
Guillaume DARMONT
dca726af16 Added AbstractCursorItemReader.connectionAutoCommit to allow override of cursor connection autoCommit value
autoCommit value is restored after connection use.
2017-11-30 10:55:58 -06:00
Takaaki Iida
cae2cabdce BATCH-2567: Allow to access MongoItemWriter.template from a subclass
JIRA: https://jira.spring.io/browse/BATCH-2567
2017-11-30 10:14:23 -06:00
Michael Minella
b2f91ae395 Added builder method for new Query option on the MongoItemReader 2017-11-29 11:16:10 -06:00
Michael Minella
6e0df991b6 Polish 2017-11-27 18:01:26 -06:00
Takaaki Iida
6d88d1f3d2 BATCH-2568: MongoItemReader should support Query object by default
JIRA: https://jira.spring.io/browse/BATCH-2568
2017-11-27 17:12:15 -06:00
Olivier Bourgain
62a580f52d Revert the behavior of DelimitedLineTokenizer to pre-4
DelimitedLineTokenizer was refactored to improve its performance but its behavior was also slightly changed.
When the input is an empty csv string with double quotes, e.g. the java
String line = "\"\""; the tokenizer returns the same String, whereas
before it was returning an empty string.

This is due to the condition checking for quotes to remove not stripping
the double quotes from the empty csv string (because its length is 2 and
the code check for strictly greater than 2).
The previous code is there 973fe44d6c/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/transform/DelimitedLineTokenizer.java (L202)  and checking for
double quotes at the start and end of the string without special
handling for the empty string.

At test is also added to ensure this won't break again.

Resolves BATCH-2657
2017-11-27 16:43:01 -06:00
Glenn Renfro
31c7e8f83f Converted adoc to use both XML and Java config 2017-11-27 13:32:23 -06:00
Michael Minella
f61679b55f Added updates for properties files as well 2017-11-27 12:06:29 -06:00
Glenn Renfro
ab0533399c Removed log4j 1.x dependencies and fixed a test.
Resolves BATCH-2656
2017-11-27 11:11:22 -06:00
Michael Minella
8fa5929a44 Updated documentation to outline skip behaviour of RepositoryItemReader
This commit addresses via documentation the issues with using a paging
algorithm for the RepositoryItemReader.

Resolves BATCH-2589
2017-11-27 10:55:57 -06:00
Michael Minella
8a223e35c6 Fixed javadoc for JobOperator#abandon
The javadoc in the `JobOperator#abandon` indicated that a JobExecution
marked as `ABANDONED` can be restarted (it cannot).

Resolves BATCH-2654
2017-11-22 09:19:03 -06:00
Michael Minella
e47bcbdc9f Updated versions before release 2017-11-02 14:12:29 -05:00
René Keller
8402f10242 Add support for DB2AS400 database
Add support for DB2AS400 to DefaultDataFieldMaxValueIncrementerFactory.
Apparently, DB2AS400 is using the same syntax for sequence value
retrieval as standard DB2.

resolves BATCH-2525
2017-11-02 13:21:42 -05:00
Eduardo Jolo
509be945fc Set the StepExecution ExitStatus in the JobStep doExecute 2017-11-02 12:56:09 -05:00
Michael Minella
fa286dc1e9 Refactored JobExecution for performance
In order to make the Map based JobRepository threadsafe, the
JobExecutino was modified to use a `CopyOnWriteArraySet` for the
collection backing the child `StepExecution` collection.  However, this
collection option has bad performance characteristics when used with
large collections.  When using partitioning, it can be common to have a
large number of `StepExecution` instances to add which drastically hurts
start up time.

This commit remove the use of the `CopyOnWriteArraySet` for the
`JobExecution#stepExecutions` and replaces it with a `LinkedHashSet`
wrapped via `Collection.synchronizedSet`.

Resolves BATCH-2384
2017-11-02 12:38:35 -05:00
Daniel Heinrich
9322fe6fae BATCH-2455 unifie listener ordering
Why:
Listeners should be called in normal order before some event
(i.e. read, write) and after that event in reverse order.

Side effects:
The ordering of Chunk and ItemReader Listeners is changed and will
change some behaviors of users. This change is still neccesary because
it is not only the correct and obviouse way, but also prevents new
users to hack around this problem.
2017-11-02 10:29:09 -05:00
Michael Minella
e5fe6a5de6 Updated DefaultBatchConfigurer to not overwrite when autowiring
This commit prevents autowiring from overwriting a value set for the
`DataSource` if it has already been set.

Resolves BATCH-2636
2017-11-02 09:58:11 -05:00
Michael Minella
70a5ec24c5 Added a builder for the StoredProcedureItemReader
This commit adds a builder for the StoredProcedureItemReader

Resolves BATCH-2646
2017-11-01 12:35:20 -05:00
Michael Minella
00a16b41b8 Remove checked exception from FlatFileItemReaderBuilder#build
A checked exception from this method is rather invasive so this commit
refactors it to throw a RuntimeException instead.

Resolves BATCH-2649
2017-10-31 16:12:37 -05:00
Michael Minella
3869885993 Added java configuration examples to common-patterns.adoc
This commit added java based configuration examples to the common
patterns documentation page.
2017-10-31 15:46:13 -05:00
Michael Minella
6f5d80065b Added java config examples for testing.adoc
This commit adds two small tweaks to the testing.adoc that demonstrates
how to import java based configuration into a unit test (instead of
importing XML based configurations).
2017-10-31 11:07:18 -05:00
Michael Minella
22ecd3b629 Added java configuration for the retry.adoc 2017-10-30 16:59:21 -05:00
Michael Minella
a256a83e7b Added java config examples for repeat.adoc 2017-10-30 15:48:12 -05:00
Jay Bryant
ead18f76ba Editing pass for spring-batch-integration.adoc
I improved readability and consistency and fixed sentence errors. No questions in this one.

Applied code review changes to PR
2017-10-30 16:29:46 -04:00
Michael Minella
48e300d2d8 Polish 2017-10-30 13:47:21 -05:00
Chris Kirk
c3814cc27d Updated to have java config examples
This commit updates the scalability.adoc to have java configuration examples for all but the last snip in the doc.
2017-10-30 13:47:13 -05:00
Jay Bryant
38d6e7d496 90-character pass for step.adoc
I removed extraneous white space from non-code lines and arranged the non-code lines to be as close to 90 characters as possible. I also edited the new content.

Applied code review changes
2017-10-30 13:48:53 -04:00