Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
0.1-incubating
-
None
Description
Using @Inject JobContext and various other JBatch artifacts only works during the creation of the ItemReader, Processor and Writer, etc.
The ProxyFactory#INJECTION_CONTEXT is set only during #loadArtifact.
If an e.g. @StepScoped bean with a @Inject JobContext gets only accessed during the readItem() method (means after creating the ItemReader), the ThreadLocal is not set anymore and thus the injected JobContext in this contextual instance is null.