Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What is Single Threaded Model in Servlets? Explain this
with an example?

Answer Posted / m.rajkumar

The servlet programmer should implement SingleThreadModel interface to ensure that servlet can handle only one request at a time. It is a marker interface, means have no methods.


This interface is currently deprecated since Servlet API 2.4 because it doesn't solves all the thread-safety issues such as static variable and session attributes can be accessed by multiple threads at the same time even if we have implemented the SingleThreadModel interface. So it is recommended to use other means to resolve these thread safety issues such as synchronized block etc.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is servlet thread safe?

939


How do we translate jsp?

997


Explain the methods of request dispatcher in servlet?

996


The code in a finally clause will never fail to execute, right?

1018


What is Servlet API used for connecting database?

1054


Which exception is thrown if the servlet is not initialized properly?

982


Does servlet have main method?

1136


What is the use of httpservletrequestwrapper?

1046


What's the difference between servlets and applets?

998


How can we perform any action at the time of deploying the project?

1073


What are the new features added to servlet 2.5?

1052


What is the difference between Server and Container?

1191


What is load-on-startup in servlet?

1083


How do we go with database connection and log4j integration in servlet?

1134


What do you mean by httpservlet and how it is different from the genericservlet?

1003