Uploaded image for project: 'BatchEE'
  1. BatchEE
  2. BATCHEE-28

@Inject JobContext only works during loadArtifact

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.1-incubating
    • 0.2-incubating
    • jbatch-core
    • 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.

      Attachments

        Activity

          People

            struberg Mark Struberg
            struberg Mark Struberg
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: