Long-running tasks should All tasks in a thread pool must provide a mechanism for notifying the application upon abnormal terminationif they terminate abnormally. Failure to do so cannot cause resource leaks because the threads in the pool are still recycled, but it makes failure diagnosis extremely difficult .or impossible
The best way to handle exceptions at the application level is to use an exception handler. The handler can perform diagnostic actions, clean-up and shut down the JVM, or simply log the details of the failure.
...
TPS03-EX1: This rule may be violated when, and only when , the code for all runnable and callable tasks has been audited to ensure that exceptional conditions are impossible. Nonetheless, it is remains good practice to install a task-specific or global exception handler to initiate recovery or log the any exceptional conditionconditions.
Risk Assessment
Failure to provide a mechanism for reporting that tasks in a thread pool failed as a result of an exceptional condition can make it harder to find the source of the issue.
...
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="09f9e7f61270035d-f64e2234-44bb4b7c-8e12aed0-e984df38536f57bf47192b25"><ac:plain-text-body><![CDATA[ | [[API 2006 | AA. Bibliography#API 06]] | interfaces | ]]></ac:plain-text-body></ac:structured-macro> |
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="25903dcbd2569175-97c92ea7-45da4b63-bceda473-4074cbd0f9892c54ceca6d81"><ac:plain-text-body><![CDATA[ | [[Goetz 2006 | AA. Bibliography#Goetz 06]] | Chapter 7.3: Handling abnormal thread termination | ]]></ac:plain-text-body></ac:structured-macro> |
...