Name
SingleThreadModel
Synopsis
Interface Name: javax.servlet.SingleThreadModel
Superinterface: None
Immediate Subinterfaces None
Implemented By: None
Availability: New as of Servlet API 2.0; found in JSDK 2.0, JWS 1.1
Description
SingleThreadModel
is a tag interface with no
methods. If a servlet implements this interface, the server ensures
that each instance of the servlet handles only one service request at
a time. Servers implement this functionality by maintaining a pool of
servlet instances and dispatching incoming requests to free servlets
within the pool. SingleThreadModel
provides easy
thread safety, but at the cost of increased resource requirements as
more servlet instances are loaded at any given time.
Interface Declaration
public interface SingleThreadModel { }
Get Java Servlet Programming now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.