wood burning stoves 2.0*
The moose likes Servlets and the fly likes Single Thread model in practice Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Single Thread model in practice" Watch "Single Thread model in practice" New topic
Author

Single Thread model in practice

Hari babu
Ranch Hand

Joined: Jun 25, 2001
Posts: 208
Hi,
Can any one tell me where the single threaded servlet model is used in the real world applications

Hari
Tony Alicea
Desperado
Sheriff

Joined: Jan 30, 2000
Posts: 3222
    
    5
Answer: Not in many apps.
A typical app server has to service many requests per unit time. It would not be practical to have a pool of that many servlets around or conversely to slow down the processing of requests by making them wait for THE servlet to be free.
However, there are always non-typical apps...


Tony Alicea
Senior Java Web Application Developer, SCPJ2, SCWCD
Rick Hightower
Author
Ranch Hand

Joined: Feb 20, 2002
Posts: 350
I agree. It is not used that often in practice.


Rick Hightower is CTO of Mammatus which focuses on Cloud Computing, EC2, etc. Rick is invovled in Java CDI and Java EE as well. linkedin,twitter,blog
Ken Robinson
Ranch Hand

Joined: Jul 25, 2002
Posts: 52
Originally posted by Tony Alicea:
A typical app server has to service many requests per unit time. It would not be practical to have a pool of that many servlets around or conversely to slow down the processing of requests by making them wait for THE servlet to be free.

A question on a seperate front.
Is this not exactly how STRUTS, via a pool of Action instances, works?
Tony Alicea
Desperado
Sheriff

Joined: Jan 30, 2000
Posts: 3222
    
    5
Actions are not servlets (Struts).
Struts uses only one servlet (ActionServlet).
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Single Thread model in practice
 
Similar Threads
Variable Integrity---I'm scared!!!
synchronized(page) is jsp
single thread or multi thread ?
Is Servlets by default a single threaded model or multi threaded model
Thread Models