Announcement Announcement Module
Collapse
No announcement yet.
Exception handling Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Exception handling

    Hi

    I have an exception handler for a tasklet. I have configured the handler as a property for the tasklet in context file.

    The job uses ThreadPooltaskExecutor which could possibly throw RejectedExecutionException if the queue capacity is full.

    In such cases, I want the thread to sleep for some time and retry after some time. Also to see that the job has not stopped if this exception is thrwon.

    How should I do this while executing from the tasklet?

  • #2
    I'm curious about what your use case is? It seems to me you're using a TaskletStep, when using the full fledged ItemOrientedStep is what you really want. If you look at say the, SkipLimitStepFactoryBean, it allows you to configure retry or skip policies for any exceptions it encounters. This prevents you from needing to deal with ExceptionHandlers, etc.

    Comment

    Working...
    X