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

JobExecution instance returned by StepExecution does not contain JobInstance or JobInstanceId

    Details

      Description

      The step execution returned from the SimpleJobExplorer does not return a job execution instance with any reference to the job instance. Both getJobInstance() and getJobInstanceId() return null. The constructor called for creating the job execution is calling the JobExecution(Long id) constructor which according to the comments within the source should only be used for transient instances.

      I am not sure if this is a defect or if this is by design.

      It would be helpful if the Javadocs noted that the StepExecution returned by the SimpleJobExplorer.getStepExecution(Long jobExecutionId, Long stepExecutionId) only includes a transient instance of the JobExecution. To obtain an non-transient instance one should use SimpleJobExplorer.getJobExecution(Long jobExecutionId).

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              jmoore_aus Joshua Moore
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: