Spring Batch
  1. Spring Batch
  2. BATCH-493

Provide saveState flag in FlatFileItemWriter (and other reader/writers if not available)

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.0.0.rc1
    • Fix Version/s: 1.0.0
    • Component/s: Infrastructure
    • Labels:
      None

      Description

      My problem is if my reader doesn't restore data, it reads the first record one second time when I restart my job that is not complete and then the flat file has the front lines in double.
      For more details, see : http://forum.springframework.org/showthread.php?t=51333

      More, FlatFileItemWriter.restart.count is always = 0. Is this normal?

      Thanks in advance.

        Activity

        Hide
        Dave Syer added a comment -

        The JdbcCursorItemReader allows me to set the saveState flag. If I set it to false I say that I always want to start from the beginning of the input data on restart. But the FlatFileItemWriter (and possibly others) do not have this flag, so they blithely assume they are being restarted when they are not. It should just be a question of making sure we provide a uniform approach (all out of the box readers and writers have the flag if it makes sense).

        Show
        Dave Syer added a comment - The JdbcCursorItemReader allows me to set the saveState flag. If I set it to false I say that I always want to start from the beginning of the input data on restart. But the FlatFileItemWriter (and possibly others) do not have this flag, so they blithely assume they are being restarted when they are not. It should just be a question of making sure we provide a uniform approach (all out of the box readers and writers have the flag if it makes sense).
        Hide
        Dave Syer added a comment -

        Assume closed as resolved and released

        Show
        Dave Syer added a comment - Assume closed as resolved and released

          People

          • Assignee:
            Dave Syer
            Reporter:
            sandrine
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 1h
              1h
              Remaining:
              Remaining Estimate - 1h
              1h
              Logged:
              Time Spent - Not Specified
              Not Specified