-
Notifications
You must be signed in to change notification settings - Fork 38.6k
Description
Alef Arendsen opened SPR-1650 and commented
A user on the forum came with an issue where a singleton essentially isn't a singleton.
I've taken a futher look at the issue and it seems that if (in the attached sample), autowiring is turned on for the LocalSessionFactory in combination with two objects being proxied, 17 instances of the SingletonRepository are created whereas with autowiring turned off, only one instance is created.
There are three possible scenarios:
autowiring=autodetect + proxying enabled: test fails
autowiring=off + proxying objects: test passes
autowiring=autodetect + no proxied object: test passes
I don't have time to further investigate the problem at the moment and can't really think of a possible thing causing this ;-).
regards,
Alef
Affects: 1.2.6, 2.0 M1
Attachments:
- autowiring.zip (4.83 kB)