Description
Michael Kanaley opened SPR-2325 and commented
Spring 2.0 now supports beans implementing the Lifecycle interface. I would like to see the start/stop functionality treated identically to that of init/destroy in the following ways:
-
declarative specification of start/stop methods.
The bean element in the Spring XML configuration has init-method and destroy-method. I would like to see start-method and stop-method added so that beans are not required to implement any Spring interface to use this feature. -
preserve start/stop order
When initializing, beans are initialized by taking dependencies into consideration. Currently the implementation of start/stop does not take order into consideration so no two Lifecycle beans could rely on any order of being started. The start order should be the same as the init order. The stop order should be the reverse of the init order.
Affects: 2.0 RC2
Issue Links:
- Lifecycle methods based on annotations [SPR-3828] #8508 Lifecycle methods based on annotations