What happens when a singleton class is deployed in a clustered environment?

Answered

What happens when a singleton class is deployed in a clustered environment?

Ninja Asked on 18th September 2018 in Design Pattern.
Add Comment
1 Answer(s)
Best answer

Singleton allows only one instance of class per JVM. If a singleton object is deployed in a clustered environment, each JVM will have their own copy of the singleton object. To ensure that only ONE singleton object is available for the entire application across JVMs, some additional design approach or different techniques like JMS, Custom API, 3rd party tools etc. can be adopted.

Ninja Answered on 18th September 2018.
Add Comment