Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

War on Singleton

 
Jawad Kakar
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I changed LockManager from a singleton to a regular class, it is very easy to create multiple instance of LockManager, which is not a very good thing to do for this assignment.

Jawad
 
John Smith
Ranch Hand
Posts: 2937
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

getLockManagerInstance()

What's the purpose of this method? Why not jus use a regular constructor? There is really nothing special about lock manager. If you think about it, you don't want multiple instances of your main JFrame, or controllers, or probably any other of your client classes. But you don't make them singletons, do you?
Eugene.
 
Jawad Kakar
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are right, thank you
Jawad
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic