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?
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.