Skip to content

End Time of a step or a job always null when read in a StepExecutionListener or a JobExecutionListener [BATCH-869] #2710

Closed
@spring-projects-issues

Description

@spring-projects-issues

Laurent Bonnet opened BATCH-869 and commented

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));


Affects: 1.1.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    in: corestatus: declinedFeatures that we don't intend to implement or Bug reports that are invalid or missing enough detailstype: enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions