Improve reference documentation for Task Execution and Scheduling about bean scopes [SPR-14167] #18739
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
type: documentation
A documentation task
Milestone
Manuel Jordan opened SPR-14167 and commented
I am doing some experiments about
Task Execution and Scheduling
In XML I have the following:
Until here my
processServiceImpl
bean is prototypeMy code works well how is expected, I can see two instances working well, it about the
executeRunnable
andexecuteCallable
methods... I can confirm this through the terminal and with visualVM.Until here, I can assume I can work in peace with a prototype object with scheduling
But in JavaConfig I have a situation:
And with:
When I execute the code
I did realise only works on Singleton, but not Prototype.
(1) I am confused, why prototype did work on XML and not in JavaConfig + Annotations. Did I forget something?
(2) On 33. Task Execution and Scheduling, there is no mention neither about Singleton nor Prototype
From (1) If scheduling is only valid on Singleton, I am assuming that on XML even when the bean is prototype the two
<task:scheduled
declarations work with one instance...The point, the explanation should be added in the reference documentation and javadoc to avoid confusions.
Affects: 4.2 GA, 4.2.4
Issue Links:
@Scheduled
methods in@Lazy
beans are not scheduledReferenced from: commits d628420
The text was updated successfully, but these errors were encountered: