Uploaded image for project: 'Spring Batch'
  1. Spring Batch
  2. BATCH-869

End Time of a step or a job always null when read in a StepExecutionListener or a JobExecutionListener

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: 1.1.2
    • Fix Version/s: 2.0.0.M3
    • Component/s: Core
    • Labels:
      None

      Description

      Hello,

      When using the method stepExecution.getEndTime() in a StepExecutionListener or the method JobExecution.getStartTime() in a JobExecutionListener, the End Time is null.

      For the StepExecutionListener, I think it comes from the fact that all the registered listeners are called before the setEndTime() method().

      The setEndTime is called on the finally block of public final void execute(StepExecution stepExecution) on line 211 and the registerd listeners are called on line 181 : exitStatus = exitStatus.and(getCompositeListener().afterStep(stepExecution));

        Attachments

          Activity

            People

            • Assignee:
              robert.kasanicky Robert Kasanicky
              Reporter:
              lbo Laurent Bonnet
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 0.25d
                0.25d
                Remaining:
                Remaining Estimate - 0.25d
                0.25d
                Logged:
                Time Spent - Not Specified
                Not Specified