Bug 5776

Summary: Support StepContext.getJobContext() method
Product: jbatch Reporter: cf126330
Component: SPECAssignee: ScottKurz
Status: NEW ---    
Severity: enhancement CC: issues
Priority: P5    
Version: 1   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard: future

Description cf126330 2014-02-10 20:37:06 UTC
JobContext may contain contextual data a step artifact needs. Currently the only way for a batch artifact to obtain StepContext or JobContext is through injection. So if both stepContext and jobContext are needed, there will be 2 field injections.  It will be nice to be able to retrive JobContext from StepContext on-demand.

@Inject StepContext stepContext;

public Object readItem() {
  if(needToAccessJobContext)
     JobContext jobContext = stepContext.getJobContext();
...
}