scaling-demos | Demos of the various methods of scaling Spring Batch
kandi X-RAY | scaling-demos Summary
kandi X-RAY | scaling-demos Summary
Demos of the various methods of scaling Spring Batch
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Start asynchronous job
- Add transaction processor
- Create asynch item writer
- The AsyncItem processor
- The parallel steps job
- Create a transaction job
- Spring transaction reader
- Step1 step1
- Create a multithreaded job
- Step 1
- Create a transaction reader for an input file
- Read resource item reader
- Delegate to read transaction
- Determine deployment handler
- Unmarshals a date string
- Marshals a date
- Starts the demo
- The main method
- Step1
- Main entry point for the chunking application
- The main application
scaling-demos Key Features
scaling-demos Examples and Code Snippets
Community Discussions
Trending Discussions on scaling-demos
QUESTION
I'm trying to implement a simple spring batch job
The goal is perform a select query on DB using JpaItemReader and process All itens in a Async way
I following this example -> https://github.com/mminella/scaling-demos/blob/master/single-jvm-demos/src/main/java/io/spring/batch/scalingdemos/asyncprocessor/AsyncProcessorJobApplication.java
If I run this code in a single thread and it works fine
But when I add Async process, looks like the job change the state to COMPLETED without wait for execution of Process()
May I possible miss something in this script?
Here is the Result of Console:
...ANSWER
Answered 2019-Nov-07 at 11:23But when I add Async process, looks like the job change the state to COMPLETED
It looks like you have executed the job the first time with a regular processor (here the step was executed and completed) and then run the same job after adding the async processor (here it sees the step as completed hence the message Step already complete or not restartable, so no action to execute
).
You can set the allowStartIfComplete
flag on the step definition if you want to re-run it even if it's complete:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install scaling-demos
You can use scaling-demos like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the scaling-demos component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page