Announcement Announcement Module
Collapse
No announcement yet.
JdbcCursorItemReader - Stored Procedure call Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • JdbcCursorItemReader - Stored Procedure call

    Currently I am using JdbcCursorItemReader and FlatFileItemWriter in a job step.

    Due to performance issue we have to use stored procedure.

    Is there a way to make a call to stored proc in Spring Batch 1.1.2.RELEASE?


    <bean id="jdbcCursorItemReader" class="org.springframework.batch.item.database.Jdb cCursorItemReader">
    <property name="dataSource" ref="dataSource"/>
    <property name="sql"
    value="SELECT X,Y,Z
    FROM V_VIEW "/>
    <property name="mapper">
    <bean class="com.mapping.SomeMapper"/>
    </property>
    </bean>

    <bean class="org.springframework.batch.item.file.FlatFil eItemWriter" id="flatFileItemWriter">
    <property name="resource" ref="resource"/>
    <property name="fieldSetCreator">
    <bean class="org.springframework.batch.item.file.mapping .PassThroughFieldSetMapper"/>
    </property>
    </bean>

    ... Other config

  • #2
    How about using custom ItemReader - like StatgingItemReader that is bundled with Spring Samples?

    Comment


    • #3
      What does your stored procedure return? If it returns a cursor then there is no feature that corresponds to the JdbcCursorItemReader. You can always create a feature request in JIRA

      Comment

      Working...
      X