This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Java in General and the fly likes using singleton pattern in java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Java in General
Bookmark "using singleton pattern in java " Watch "using singleton pattern in java " New topic
Author

using singleton pattern in java

Anand Jain
Greenhorn

Joined: Jul 27, 2009
Posts: 18
Can you give me the scenarios where Singleton pattern is used in Java?
Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

you may need some values [which are common for the application ] from database on application startup time
Suhas Bilaye
Ranch Hand

Joined: Sep 10, 2009
Posts: 80
When huge objects like Hibernate Session Factory is to be created only once and the same object is to be used throughout the application

Thanks and Regards,
Suhas
http://www.xplore-java.blogspot.com/
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39079
    
  23
Have a look at this thread and the links in it.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: using singleton pattern in java