Dec 17th, 2012, 10:47 PM
jdbcCursorItemReader for multiple job instances
I have 5 threads in a web container scheduled to listen to DB for any requests for job execution. Job execution requests come from a UI interface. If there a two simultaneous requests to execute a job but for different criteria, these two jobs are executed simultaneously but two different threads.
I would like to know if this is a problem, as jdbcCursorItemReader is not thread safe, will both the threads mess with the single cursor from the reader. Because, if I run a single job it runs fine. But if I schedule two jobs at the same time I get, Error Log: [Unexpected cursor position change.]
What is a best way to handle this? Can somebody help me?
Last edited by dgiridhar; Dec 17th, 2012 at 10:51 PM.