Uploaded image for project: 'Spring XD'
  1. Spring XD
  2. XD-3188

FileDeletionListener resolves resources once

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: Major
    • Resolution: Complete
    • Affects Version/s: 1.2 GA
    • Fix Version/s: 1.2.1, 2.0 M1
    • Component/s: Batch
    • Labels:
      None
    • Story Points:
      1
    • Rank (Obsolete):
      9223372036854775807
    • Acceptance Criteria:
      Hide

      Verify that the filejdbc job deletes the import files after multiple executions.

      Show
      Verify that the filejdbc job deletes the import files after multiple executions.
    • Sprint:
      Sprint 52

      Description

      In the filejdbc job, there is the option to delete the imported files. This functionality is created using a listener called the FileDeletionStepExecutionListener. When you run the job the first time with the --deleteFiles=true, everything works as expected. The second time you run the job, the files are not deleted.

      I believe the issue here is that since the FileDeletionStepExecutionListener is a singleton, the resources are resolved only once (the first time the job runs) and so it works the first time, but if the job is run again later and new files match the expression, they are not picked up. I believe the fix is to make the FileDeletionStepExecutionListener used in this job step scoped.

        Attachments

          Activity

            People

            Assignee:
            mminella Michael Minella
            Reporter:
            mminella Michael Minella
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: