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

Which java application server is the best?

1027


When Servlet is unloaded?

1099


Why do we have servlet filters?

1021


What is meant by a web application

1014


What is the difference between Servlets and Applets?

1032


What is servlet interface?

1219


Can we override servlet service method?

1091


Define servlet mapping?

1161


What exception should be thrown when servlet is not properly initialized?

1002


Define declaration.

1062


How do you configure a centralized error handler in servlets?

1102


What is the importance of init() method in Servlet ?

1076


What is the procedure of invoking different servlet in a different application?

1011


Can you explain in detail 'javax.servlet' package?

994


Explain the role of dispatcherservlet and contextloaderlistener.

1182