InterviewSolution
Saved Bookmarks
| 1. |
How Can I Make An Item Reader Thread Safe In Spring Batch? |
|
Answer» You can synchronize the read() METHOD. REMEMBER that you will LOSE restartability, so best practice is to mark the step as not restartable and to be SAFE (and efficient) you can also set saveState=false on the reader. You can synchronize the read() method. Remember that you will lose restartability, so best practice is to mark the step as not restartable and to be safe (and efficient) you can also set saveState=false on the reader. |
|