-
Sep 3rd, 2008, 10:19 PM
#1
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?
-
Sep 4th, 2008, 01:02 PM
#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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules