David Fogel opened SPR-5932 and commented
What we are seeing is that when we use @Configuration-annotated configuration classes to define our beans, that our singleton beans are instead treated as prototype beans. This means that we get new instances of our singletons for each time they are referenced (!!!).
I have created sample code which demonstrates this broken behavior.
This code, when run as a regular spring-ified java application, (NOT OSGi), works as expected (only ONE instance of Foo and Bar are created).
BUT, when the identical code is run via Spring DM, THREE different instances of Bar are created!
Note: I used a FileSystemXmlApplicationContext to load this when running as a normal java application, and put the config.xml file inside a /META-INF/spring folder when running in Spring dm.
Affects: 3.0 M3
Reference URL: http://forum.springsource.org/showthread.php?t=74458
Attachments:
Issue Links:
Referenced from: commits 9e0d87c
David Fogel opened SPR-5932 and commented
What we are seeing is that when we use
@Configuration-annotatedconfiguration classes to define our beans, that our singleton beans are instead treated as prototype beans. This means that we get new instances of our singletons for each time they are referenced (!!!).I have created sample code which demonstrates this broken behavior.
This code, when run as a regular spring-ified java application, (NOT OSGi), works as expected (only ONE instance of Foo and Bar are created).
BUT, when the identical code is run via Spring DM, THREE different instances of Bar are created!
Note: I used a FileSystemXmlApplicationContext to load this when running as a normal java application, and put the config.xml file inside a /META-INF/spring folder when running in Spring dm.
Affects: 3.0 M3
Reference URL: http://forum.springsource.org/showthread.php?t=74458
Attachments:
Issue Links:
Referenced from: commits 9e0d87c