23 February 2020

Singleton Spring

Singleton Spring Beans are not like GoF Singleton design pattern.

Spring can have more than one if they have different id's, meanwhile, GoF only allows one instance of the class (object) in the complete classloader.

None option can solved some thread-safe issues that may appear by composition of other objects that are nor thread-safe, jdbc connections, http session, SimpleDateFormat, etc.


My Blog List

Blog Archive

Disclaimer

The views expressed on this blog are my own and do not necessarily reflect the views of Oracle.