--------------Original Comment History----------------------------
Comment from = cf126330 on 2014-02-10 20:37:06 +0000
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.
Originally opened as bug 5776 by cf126330
--------------Original Comment History---------------------------- Comment from = cf126330 on 2014-02-10 20:37:06 +0000
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(); ... }