You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AbstractJmsListeningContainer should provide an easy way to start the container after the ApplicationContext has been fully initialized [SPR-4716]
#9393
AbstractJmsListeningContainer should provide an easy way to start the container after the ApplicationContext has been fully initialized.
The current "autoStartup" feature calls start() in the afterPropertiesSet method. That is too early for some applications which are dependent on BeanPostProcessors etc.. Maybe the "auto startup" should happen after a ContentRefreshedEvent?
We can probably just have AbstractMessageListenerContainer implement ApplicationListener and defer the auto-startup to when the ContextRefreshedEvent is received.
If Spring eventually provides a way to have the container automatically call start() on all Lifecyle instance (as it does for stop() when the context closes), that could replace the ContextRefreshedEvent-driven technique.
This is now driven by the DefaultLifecycleProcessor so that the listener container does not have to implement ApplicationListener anymore. The autoStartup flag is checked upon ApplicationContext refresh and if "true", it will be started.
Lari Hotari opened SPR-4716 and commented
AbstractJmsListeningContainer should provide an easy way to start the container after the ApplicationContext has been fully initialized.
The current "autoStartup" feature calls start() in the afterPropertiesSet method. That is too early for some applications which are dependent on BeanPostProcessors etc.. Maybe the "auto startup" should happen after a ContentRefreshedEvent?
Affects: 2.5.3
Referenced from: commits 40720ab, d96bea9
1 votes, 4 watchers
The text was updated successfully, but these errors were encountered: