-
Sep 16th, 2011, 09:31 AM
#1
Reading a file currently being written
Hey,
I have a component A which appends lines at the end of a text file, during one hour. I have a job with one step. The steps consists of reading to this file line after line (I use FlatFileItemReader), processing the lines and writing them to a database. I don't want my batch application to wait one hour before to start reading. When the step starts, the FlatFileItemReader is created and initialized (step scope), and at this moment, I want the step to start reading the already written lines.
Is it possible?
Thanks
-
Sep 26th, 2011, 02:26 AM
#2
Any idea? My question is simple, is the FlatFileItemReader adapted for reading a file currently being written? Is there a problem of locking? I've done some tests with my application and sometimes I get a FlatFileParseException, and if i look at the line that has been read, it is incomplete.
(I precise that only new lines are appended to the file, i think in this case the situation is simpler).
Thanks
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