Results 1 to 7 of 7

Thread: JdbcCursorItemReader

  1. #1
    Join Date
    Dec 2008
    Location
    Toulouse, France
    Posts
    22

    Default JdbcCursorItemReader

    Hi

    Is the JdbcCursorItemReader thread-safe ?

    I ask the question because if the verifyCursorPosition is true, the reader throws a exception.

    (I'm using SB 2.0.0)

    Thanks for answers.

  2. #2
    Join Date
    Jun 2005
    Posts
    4,230

    Default

    A good rule of thumb is that nothing that implements ItemStream is thread safe (including JdbcCursorItemReader). That doesn't always have to be the case but it pretty much is right now. You can always work safely with those components in a partition though, with scope="step".

  3. #3
    Join Date
    Dec 2008
    Location
    Toulouse, France
    Posts
    22

    Default

    Thanks, Dave.

    The partition is a good solution.
    But something is strange, the majority of readers are not thread-safe and by default, a step is multi-threaded.
    A JIRA seem to say it's difficult to configure a mono-threaded step.
    (http://jira.springframework.org/browse/BATCH-1216)

    Is it possible to configure a mono-threaded step with batch xml ?

  4. #4
    Join Date
    Jun 2005
    Posts
    4,230

    Default

    I think you misunderstood the JIRA. The default is single-threaded.

  5. #5
    Join Date
    Dec 2008
    Location
    Toulouse, France
    Posts
    22

    Default

    Ok thanks for answers !

  6. #6
    Join Date
    Dec 2008
    Location
    Toulouse, France
    Posts
    22

    Default

    Just one more question, I promise !

    Could it be possible to contribute to this project ?
    I didn't see any link to contribute on the site.
    I follow this project since 6 months now and I think that I begin to unterstand correctly this framework.
    Maybe can I help you to correct minor bugs or improvements to begin...

  7. #7
    Join Date
    Dec 2006
    Posts
    1,061

    Default

    As with any Spring project (or open source for that matter) your immediate contribution path is to create patches and attach them to issues. You can do this through subversion. We can then review them, and make corrections if necessary before committing.

Posting Permissions

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