Tuesday, November 29, 2011

What is a better approach for enabling thread-safe servlets and JSPs? SingleThreadModel Interface or Synchronization?

Although the SingleThreadModel technique is easy to use, and works well for low volume sites, it does not scale well. If you anticipate your users to increase in the future, you may be better off implementing explicit synchronization for your shared data.:If there is instance variable in Servlet, use ThreadLocal and put this variable in ThreadLocal&
Category:Servlet Interview Questions

No comments:

Post a Comment