Jan 18th, 2011, 03:07 AM
Can anyone explain how (if) the Spring bean wiring container maintains thread visibility of injected properties on a singleton POJO? The fields being set are obviously non final as injecting properties, rather than constructor arguments, and there is no synchronisation in the POJO.
I am assuming some safe publishing idiom is used, and from taking a look at the code, there are a I am guessing that the DefaultSingletonBeanRegistry.singletonObjects being a ConcurrentHashMap provides this, but I have not yet convinced myself.
Tags for this Thread