I have an application that uses a ScheduledExecutorService
to handle multiple Runnable
: each one is scheduled at fixed rate and must be alive as long as the application.
I need a solution to be notified if any of those threads is terminated for some exception, so I can schedule them again.
Can I use any pattern for this problem? Or am I using the wrong objects in my application?