The SingleThreadModel empty interface is implemented by
servlets that does not wish to handle more than one event at a time. It is the servlet engines responsibility to ensure that it only ever invokes one callback method in the servlet at a time.
A server that loads a SingleThreadModel servlet must guarantee, according to the Servlet API documentation, "that no two threads will execute concurrently the service method of that servlet." To accomplish this, each
thread uses a free servlet instance from the pool. Thus, any servlet implementing SingleThreadModel can be considered thread safe and isn't required to synchronize access to its instance variables.
For example, a servlet that connects to a database sometimes needs to perform several database commands atomically as part of a single transaction. Normally, this would require the servlet to synchronize around the database commands (lets say, it manage just one request at a time) or to manage a pool of database connections where it can "check out" and "check in" connections (say, it support multiple concurrent requests). By instead implementing SingleThreadModel and having one "connection" instance variable per servlet, a servlet can easily handle concurrent requests by letting its server manage the servlet instance pool (which doubles as a connection pool).