-
Feb 20th, 2009, 09:51 AM
#1
How to configure ItemReader to read data one at a time
Hi all
I've the following requirements, I just wanted to know if this is possible using the HibernateCursorItemReader or any custom ItemReader implementation
1. A quartz job which runs on a schedule, say every 30 mins.
2. This Job has to read from one row from a table based on a criteria [even if the criteria matches many rows, the query retrieves the least recent row] and process it and write it to a csv file. [ItemReader, ItemProcessor, ItemWriter]
3. I've configured all of these, but my issue is the job should terminate after it is done with the writing. The next job execution ha
But the ItemReader continues to read all the rows from the table and all rows are getting processed in a single execution.
Is there anyway to implement my kind of requirement?
-
Feb 20th, 2009, 10:18 AM
#2
Both the HibernateCursorItemReader and JdbcCursorItemReader work off of HQL and SQL queries respectively. I see now reason why you can't create a query for the cursor to use that restricts the data in the way you need. It sounds like you're just opening up the cursor on the whole table, which isn't what you want, just be more restrictive in your query.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules