GeekInterview.com
Series: Subject: Topic:
Question: 20 of 21

Will Singletone Pattern work in Clustered environment ?

Asked by: sunils | Member Since Sep-2006 | Asked on: Oct 19th, 2006

View all questions by sunils   View all answers by sunils

Showing Answers 1 - 6 of 6 Answers
Sakthivel

Answered On : Nov 3rd, 2006

No. It will not.

  
Login to rate this answer.
Mannu Kumar Pandey

Answered On : Feb 8th, 2007

Yes, Singleton pattern is a creational pattern and its purpose is that only one instance of a class will be created. That instance can be share in a cluster environment.

  
Login to rate this answer.
Yas

Answered On : Apr 8th, 2007

The Singleton class instance will be never shared in clustered instance. It will be always one instance per JVM.

  
Login to rate this answer.
VK

Answered On : Jun 14th, 2007

That means applications with singleton class(es) wont work in clustered environment?

  
Login to rate this answer.
hibernateuser

Answered On : Sep 5th, 2007

Singleton pattern wont work in clustered environment. If you want to use it, either you can use JNDI to store the object so that all the jvms have access to same object. OR you can bind the object using RMI.

Yes  1 User has rated as useful.
  
Login to rate this answer.

Yep we can make the Singleton class synchronized and non clonebale...

Yes  1 User has rated as useful.
  
Login to rate this answer.

Give your answer:

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

Related Open Questions

Ads

Connect

twitter fb Linkedin GPlus RSS

Ads

Interview Question

 Ask Interview Question?

 

Latest Questions

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.