File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Threads and Synchronization and the fly likes singlethreadmodel Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Threads and Synchronization
Bookmark "singlethreadmodel" Watch "singlethreadmodel" New topic


bakiyalakshmi dhanraj

Joined: Nov 02, 2007
Posts: 24
How to implement Servlet singlethread model, by not using
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42959
Do you mean how to ensure that only one thread can run a servlet at any given time? If so, you can use synchronization that covers the complete body of your doGet/doPost methods.

But why would you give up the benefits of concurrent access?
I agree. Here's the link:
subject: singlethreadmodel
It's not a secret anymore!