Results 1 to 3 of 3

Thread: JdbcCursorItemReader - Stored Procedure call

  1. #1
    Join Date
    Jun 2008
    Posts
    18

    Default 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. #2

    Default

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

  3. #3
    Join Date
    Aug 2004
    Posts
    1,104

    Default

    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
    Thomas Risberg
    SpringSource by Pivotal
    http://www.springsource.org

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •