Difference between single thread and multi thread model servlet

Showing Answers 1 - 2 of 2 Answers

Prasad

  • Oct 3rd, 2005
 

In single thread model the sevelet will implement SingleThreadMidel interface means only one client can access the servlet.Because of this the response time is very slow.In Multithread model the creates pool os servlet instances and manages the servlets.

  Was this answer useful?  Yes

In single thread model a servlet implements the SingleThreadModel Interface(Tagged Interface). If a servlet implements SingleThreadModel an instance will be created for every Servlet Request. U'll have a quick resonse in this case. But there will be serious performance issues.

All the servlets that do not implement SingleThreadModel interface are multithreaded and only one servlet instance will created irrespective of the number of requests. Here the response time is high.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions