GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

GeekInterview.com  >  Interview Questions  >  J2EE  >  Java Patterns
Go To First  |  Previous Question  |  Next Question 
 Java Patterns  |  Question 2 of 19    Print  
Will Singletone Pattern work in Clustered environment ?

  
Total Answers and Comments: 6 Last Update: March 16, 2008     Asked by: sunils 
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: bharaniprasanth
 
Yep we can make the Singleton class synchronized and non clonebale...

Above answer was rated as good by the following members:
yathirajulu
November 03, 2006 04:52:02   #1  
Sakthivel        

RE: Will Singletone Pattern work in Clustered environm...
No. It will not.
 
Is this answer useful? Yes | No
February 08, 2007 22:37:51   #2  
Mannu Kumar Pandey        

RE: Will Singletone Pattern work in Clustered environm...
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.
 
Is this answer useful? Yes | No
April 08, 2007 07:28:21   #3  
Yas        

RE: Will Singletone Pattern work in Clustered environm...
The Singleton class instance will be never shared in clustered instance. It will be always one instance per JVM.
 
Is this answer useful? Yes | No
June 14, 2007 04:21:45   #4  
VK        

RE: Will Singletone Pattern work in Clustered environm...
That means applications with singleton class(es) wont work in clustered environment?

 
Is this answer useful? Yes | No
September 05, 2007 20:27:32   #5  
hibernateuser        

RE: Will Singletone Pattern work in Clustered environm...
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.
 
Is this answer useful? Yes | No
March 14, 2008 13:39:11   #6  
bharaniprasanth Member Since: February 2008   Contribution: 46    

RE: Will Singletone Pattern work in Clustered environment ?
Yep we can make the Singleton class synchronized and non clonebale...
 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    


 
Go To Top


 Sponsored Links

 




About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape