Spring Batch Admin
  1. Spring Batch Admin
  2. BATCHADM-81

AsyncItemProcessor. Can not use scope step. Scope 'step' is not active exception

    Details

    • Type: New Feature New Feature
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Complete
    • Affects Version/s: 1.2.0.M1
    • Fix Version/s: 1.2.0.RC1
    • Component/s: Integration
    • Labels:
      None
    • Environment:
      DEV

      Description

      I am trying to use AsyncItemProcessor to make Processor multithreaded. I am passing as a "delegate" my own service/bean. If I declare that bean in scope "step" I get an exception.

      1. aultoEvalJob.txt
        5 kB
        Tanya Koganov
      2. CSIInLineMarcRecordItemProcesor.txt
        16 kB
        Tanya Koganov

        Activity

        Hide
        Dave Syer added a comment -

        Will what work?

        Show
        Dave Syer added a comment - Will what work?
        Hide
        Tanya Koganov added a comment -

        I did not quite understood your comment:

        >>>This will work fine for single-threaded downstream processing

        This is what I would like to do. To have a job that will contain: Reader, Processor, Writer.

        Reader is sequential (single-threaded). Processor is AsyncItemProcessor. And Writer is org.springframework.batch.integration.async.AsyncItemWriter.

        Will this configuration work? Using org.springframework.batch.integration.async.AsyncItemWriter (after AsyncItemProcessor.), is it considered single-threaded downstream processing?

        Thank you,
        Tanya.

        Show
        Tanya Koganov added a comment - I did not quite understood your comment: >>>This will work fine for single-threaded downstream processing This is what I would like to do. To have a job that will contain: Reader, Processor, Writer. Reader is sequential (single-threaded). Processor is AsyncItemProcessor. And Writer is org.springframework.batch.integration.async.AsyncItemWriter. Will this configuration work? Using org.springframework.batch.integration.async.AsyncItemWriter (after AsyncItemProcessor.), is it considered single-threaded downstream processing? Thank you, Tanya.
        Hide
        Dave Syer added a comment -

        It should work. Did you try it? The AsyncItemWriter (despite it's name) is single threaded. The "downstream" bit I was talking about was the processor.

        Show
        Dave Syer added a comment - It should work. Did you try it? The AsyncItemWriter (despite it's name) is single threaded. The "downstream" bit I was talking about was the processor.
        Hide
        Tanya Koganov added a comment -

        I am ready to try it. How do I get the fixed code?

        thank you.

        Show
        Tanya Koganov added a comment - I am ready to try it. How do I get the fixed code? thank you.
        Hide
        Dave Syer added a comment -

        Source code is in Github (https://github.com/SpringSource/spring-batch-admin), nightly snapshots go to S3 (repository URL: http://maven.springframework.org/snapshot/). Getting started guide on website: http://static.springframework.org/spring-batch-admin/

        Show
        Dave Syer added a comment - Source code is in Github ( https://github.com/SpringSource/spring-batch-admin ), nightly snapshots go to S3 (repository URL: http://maven.springframework.org/snapshot/ ). Getting started guide on website: http://static.springframework.org/spring-batch-admin/

          People

          • Assignee:
            Dave Syer
            Reporter:
            Tanya Koganov
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: