I observed that TimerTasks are used extensively in Openfire. Is there any clear advantage here, of using those in place of ScheduledExecutorService?
There are at least a couple of good things of ExecutorService over TimerTask -
-
Can utilize multiple threads. However, it may not be possible in some cases in Openfire, where the order of data is important.
-
Can handle runtime exceptions, which can be utilized for retrying execution.
I would like to know if it is worth investing to move to using ExecutorService.
Thanks,
Chinmay