Announcement Announcement Module
Collapse
No announcement yet.
Scope Step query Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Scope Step query

    I am stumped with a query recently around using 'step' scoped beans. While I understand that the scope 'step' is necessary in a 'late-binding' use case, I am not able to digest how is the use when trying to inject 'step' scoped beans to other beans. I will try to elaborate more :
    1. I have a sample configuration as below :
    Code:
    <bean id="blRequestFileItemReader" class="com.XXXX.reader.RequestFileItemReader" scope="step">
    <property name="flatFileItemReader" ref="blflatFileItemReader"/>
    <property name="customStaxEventItemReader" ref="blStaxEventItemReader"/>
    <property name="csvFileItemReader" ref="blCSVFileReader"/>
    <property name="batchId" value="#{jobParameters['batchId']}"/>
    <property name="batchLocateDAO" ref="blDAO"/>
    <property name="requestFileFormat" value="#{jobParameters['requestFileFormat']}"/>
    <property name="dataSource" ref="dataSource" />
    </bean>
    Now I would like the various readers being injected in my Custom reader to also be of scope step. But when doing such a configuration I receive an exception as below :
    Cannot convert value of type [$Proxy13 ...... ]to required type [com.XXXX.reader.BLRequestItemReader]: no matching editors or conversion strategy found.

    Can you please provide assistance or what I might be doing wrong ?
    Thanks

  • #2
    What does the bean definitions look like for the following: blflatFileItemReader, blStaxEventItemReader, blCSVFileReader

    Do their bean definitions also implement the attribute scope="step"?

    Jeff

    Comment

    Working...
    X