Results 1 to 3 of 3

Thread: How To ignore writing Exception and avoid job termination ?

  1. #1
    Join Date
    Jul 2008
    Posts
    16

    Question How To ignore writing Exception and avoid job termination ?

    Hi,

    Each time an Exception occured when writting a chunk, spring batch rollback it and stop the job. (right ?)

    Is there an elegant way to contine the job even if a chunk has been rollbacked ?


    I managed it by configuring my transactionAttribute like below but I am not satisfied with this : (it forces the commit)

    Code:
    <property name="transactionAttribute" value="+java.lang.Exception" />
    Thanks for your help and response.

    Laurent Bonnet

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

    Default

    Is there an elegant way to contine the job even if a chunk has been rollbacked ?
    I'm a bit confused, isn't that what skip is for? You configure an exception to be skippable, and it will continue processing if that exception is encountered.

  3. #3
    Join Date
    Jul 2008
    Posts
    16

    Default

    Yes it is.

    In fact, what "bothers" is the fact that you have to set a skip limit in case you want to use the skip system.

    But you discussed it in my previous post and you finally convinced me to write errors directly in the writer and use the skip function for more "unexpected" bad writings.

    Thanks again for your help.

Posting Permissions

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