Affects: All versions
Please document the relation between @Scheduled
annotation and task executors. There is no information if @Scheduled
is using org.springframework.scheduling.commonj.WorkManagerTaskExecutor
. In a web container environment this could lead to unwanted unmanged threads.
EDIT: I think this only affects Java EE 6 environments. For Java EE 7 you can configure the SchedulerExecutorService
provided by the container. Is far as I understood this mechanism replaces task executors.
Please see this SO thread: https://stackoverflow.com/q/68862606/395879
Comment From: snicoll
There is no information if @Scheduled is using org.springframework.scheduling.commonj.WorkManagerTaskExecutor
I am not sure I understand what you'd like to see added in the documentation. The relevant section provides an introduction to the TaskExecutor
abstraction and how you can use it. There is also a section to enable task scheduling and the Javadoc of @EnableScheduling
that states:
By default, Spring will search for an associated scheduler definition: either a unique org.springframework.scheduling.TaskScheduler bean in the context, or a TaskScheduler bean named "taskScheduler" otherwise; the same lookup will also be performed for a java.util.concurrent.ScheduledExecutorService bean. If neither of the two is resolvable, a local single-threaded default scheduler will be created and used within the registrar.
I believe this is covered properly. If you feel differently please provide more details and we can reconsider.