• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

SingleThreadModel Interface

 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

I know that servlet is multithreaded by default.By using singlethreadmodel interface does its multithreading capabilities are restricted?to what extent?
also can anyone tell me when we use singlethread model interface?i heard that this is to be deprecated soon?

Thanks
Rakesh
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If your servlet implements SingleThreadModel, the servlet engine will ensure that a given instance only handles one request at a time.
In my opinion, SingleThreadModel was created early in the development of the servlet API as a crutch for people having a hard time making the transistion from desktop single user applications to servlets. I know of no valid excuse for using it these days.

Bill
 
author
Posts: 3252
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It has been deprecated in the Servlet 2.4 spec (part of J2EE 1.4) without replacement. Which begs the question: if it was a superfluous, bad idea for servlets, what makes it a good idea for stateless EJBs?

- Peter
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic