I have a Spring Task defined on in spring app context xml:
<task:scheduler id="myScheduler" pool-size="1"/>
<task:scheduled-tasks scheduler="myScheduler">
<task:scheduled ref="MyClass" method="myMethod" fixed-delay="3000"/>
</task:scheduled-tasks>
So, how can I implement to stop further execution of the tasks in case of an Exception, either in xml or in code by catching the Exception?
I don’t think this is solvable using
scheduled-tasks, may be wrong of course.There’s an alternative though, config:
And the errorHandler: