Results 1 to 4 of 4

Thread: Batch namespace : ExceptionHandler support

Hybrid View

  1. #1
    Join Date
    May 2011
    Posts
    15

    Question Batch namespace : ExceptionHandler support

    Hi,

    I have been trying to use the exceptionHandler.
    But found that batch namespace doesnt support this from : http://forum.springsource.org/showth...ceptionHandler

    Will this be available as part of batch namespace ?

    Thanks,
    Gayathri

  2. #2
    Join Date
    Dec 2005
    Location
    Lyon, France
    Posts
    311

    Default

    what do you want to do? If you want to log errors during chunk processing, you need to use listeners (and skips if you want to leave these exceptions behind you).

  3. #3
    Join Date
    May 2011
    Posts
    15

    Default

    Thanks for your quick reply

    We want to skip exceptions and have different skipLimits for different types of exceptions. Say an exception A can be skipped 5 times whereas exception B can be skipped 10 times. And i couldnt find any default skipPolicy implementations that support these requirements.

    Currently we have a custom skipPolicy that does this. But exceptionHandlers like 'RethrowOnThresholdExceptionHandler', 'SimpleLimitExceptionHandler' seemed to satisfy our needs. So was wondering if we can use it without going back to 'beans' namespace from our current 'batch' namespace.

  4. #4
    Join Date
    Dec 2005
    Location
    Lyon, France
    Posts
    311

    Default

    Quote Originally Posted by muralidh View Post
    We want to skip exceptions and have different skipLimits for different types of exceptions. Say an exception A can be skipped 5 times whereas exception B can be skipped 10 times. And i couldnt find any default skipPolicy implementations that support these requirements.
    This is straightforward to implement, but ExceptionClassifierSkipPolicy looks like to be what you want.

    Currently we have a custom skipPolicy that does this. But exceptionHandlers like 'RethrowOnThresholdExceptionHandler', 'SimpleLimitExceptionHandler' seemed to satisfy our needs. So was wondering if we can use it without going back to 'beans' namespace from our current 'batch' namespace.
    I think you should stick to the custom SkipPolicy, looks like it addresses what you need and is simpler than digging into the repeat framework.

Tags for this Thread

Posting Permissions

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