You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@batchee.apache.org by "Mark Struberg (JIRA)" <ji...@apache.org> on 2014/04/16 10:36:18 UTC

[jira] [Created] (BATCHEE-28) @Inject JobContext only works during loadArtifact

Mark Struberg created BATCHEE-28:
------------------------------------

             Summary: @Inject JobContext only works during loadArtifact
                 Key: BATCHEE-28
                 URL: https://issues.apache.org/jira/browse/BATCHEE-28
             Project: BatchEE
          Issue Type: Bug
          Components: jbatch-core
    Affects Versions: 0.1-incubating
            Reporter: Mark Struberg


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.



--
This message was sent by Atlassian JIRA
(v6.2#6252)