ApplicationListener beans eagerly instantiated even when marked as lazy-init [SPR-4054] #8733
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
type: enhancement
A general enhancement
Milestone
Mathew Wyatt opened SPR-4054 and commented
When i have a "prototype" (defined as prototype in the spring-config) bean which implements the ApplicationContextAware interface, it is eagerly instantiated when the application context is loaded. Which means i have a bean floating around in space which i can not get reference to. It seems poor practice to have a floating unreferenced (unreferenced by me explicitly) bean floating around?... In my case, the floating bean is throwing runtime exceptions, because of dependencies on a swing ancestor component...
see post - http://forum.springframework.org/showthread.php?t=44522&highlight=ApplicationContextAware
Affects: 2.0.7
Issue Links:
The text was updated successfully, but these errors were encountered: