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/26 00:29:17 UTC

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

     [ https://issues.apache.org/jira/browse/BATCHEE-28?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Struberg resolved BATCHEE-28.
----------------------------------

       Resolution: Fixed
    Fix Version/s: 0.2-incubating

> @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
>            Assignee: Mark Struberg
>             Fix For: 0.2-incubating
>
>
> 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)