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

What is servlet configuration?

1123


What is the type of method for sending request from http server?

1179


What is the difference between context parameter and context attribute?

1121


Where do you define dispatcherservlet?

1107


What is the advantage of Servlets when compared with other server side technologies?

2397


What are the life-cycle methods for a servlet?

1050


Are Servlets Thread Safe? How to achieve thread safety in servlets?

1026


How to read request headers from servlets?

1095


What are the ways to handle multi-threading in servlets?

1139


What do you mean by chaining in servlet?

1080


Explain web application directory arrangement?

1144


Which event is fired at the time of setting, getting or removing attribute from application scope?

1193


What is a servlet engine?

1098


How to notify an object in session when session is invalidated or timed-out?

1131


Difference between httpservlet and generic servlets?

1163