Improve exception message when Scheduled tasks that are using Virtual Threads fail on shutdown #32381
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
type: enhancement
A general enhancement
Milestone
A
@Scheduled
task that is using other components (such as the database) should terminate processing of any pending tasks on shutdown with a vanilla setup.When using Virtual Threads however, scheduled threads are managed differently and the underlying scheduler is considered as shut down when the main scheduler thread completed. Any individual task executions may still be running on the side. This leads to an expected failure to complete the task, but the current exception message makes it sound way worse that it really is.
Here is an example:
Given this kind of case is expected, we should probably log something more explicit that relates to an issue on shutdown and lower the log level.
The text was updated successfully, but these errors were encountered: