File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Spring and the fly likes About Singletons. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "About Singletons." Watch "About Singletons." New topic
Author

About Singletons.

Nitin Menon
Ranch Hand

Joined: Jun 13, 2007
Posts: 79
Hi,
In my application, there is a module where no more than three users should login simultaneously. It has a functionality where a PDF file is created and mailed. I had read about about singleton beans. I would love to know how singletons are processed. Also, What are their specialties and the scenarios in which they are used.
Thanks..!('')
Alpesh Padra
Ranch Hand

Joined: Jan 10, 2010
Posts: 41
You can provide static int variable as member of singlton class which can increament n decrement on every login - logout.

By using singlton pattern you can restrict number of instance for class like 5, 10...

if you know then connection pooling n thread pooling concept over there . we are using same concept...

you can use same concept here.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: About Singletons.