Announcement Announcement Module
Collapse
No announcement yet.
Reading a file currently being written Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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

  • #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

    Comment

    Working...
    X