| Author |
Implementing DAOs as singleton
|
Rupali Chaudhari
Greenhorn
Joined: Mar 18, 2008
Posts: 2
|
|
Hi, Is it a good idea/standard practice to implement DAO (Data Access Objects) as singleton? If DAOs are implemented as singleton there will be only one instance of a DAO for all users. Other users will have to wait until first user completes the execution of any method of the DAO. So won't it affect the performance? I have same doubt about implementing delegates also. Thanks in advance Rupali
|
 |
Peer Reynders
Bartender
Joined: Aug 19, 2005
Posts: 2906
|
|
Welcome to JavaRanch, Please check your private messages
|
"Don't succumb to the false authority of a tool or model. There is no substitute for thinking."
Andy Hunt, Pragmatic Thinking & Learning: Refactor Your Wetware p.41
|
 |
Peer Reynders
Bartender
Joined: Aug 19, 2005
Posts: 2906
|
|
There are lots of reasons to avoid singletons. See references listed in Oo Patterns Uml Refactoring Faq: Singleton Pattern.
|
 |
Rupali Chaudhari
Greenhorn
Joined: Mar 18, 2008
Posts: 2
|
|
Hi Peer, I have updated my display name. Thanks for your reply. Rupali [ March 18, 2008: Message edited by: Rupali Chaudhari ]
|
 |
 |
|
|
subject: Implementing DAOs as singleton
|
|
|