Singleton Design pattern in multiple JVM

How can we implement Singleton Design pattern in multiple JVM environment? How we will make sure to be an object in multiple JVM?

Questions by usmita

Showing Answers 1 - 2 of 2 Answers


  • Mar 29th, 2012

You cannot do that.

  Was this answer useful?  Yes

Rajesh Kumar

  • Apr 10th, 2017

Not sure about the tool, but if we have to do it, then we can use some clustered cache( jboss cache) and save the singleton instance in it.
In your singleton code, always check for the instance in the distributed cache and then try to initialize it if not available. So, after first initialization you will always be able to find the singleton instance from different JVMs.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.


Related Answered Questions


Related Open Questions