1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package javax.servlet;
17
18 /**
19 * Ensures that servlets handle
20 * only one request at a time. This interface has no methods.
21 *
22 * <p>If a servlet implements this interface, you are <i>guaranteed</i>
23 * that no two threads will execute concurrently in the
24 * servlet's <code>service</code> method. The servlet container
25 * can make this guarantee by synchronizing access to a single
26 * instance of the servlet, or by maintaining a pool of servlet
27 * instances and dispatching each new request to a free servlet.
28 *
29 * <p>Note that SingleThreadModel does not solve all thread safety
30 * issues. For example, session attributes and static variables can
31 * still be accessed by multiple requests on multiple threads
32 * at the same time, even when SingleThreadModel servlets are used.
33 * It is recommended that a developer take other means to resolve
34 * those issues instead of implementing this interface, such as
35 * avoiding the usage of an instance variable or synchronizing
36 * the block of the code accessing those resources.
37 * This interface is deprecated in Servlet API version 2.4.
38 *
39 *
40 * @author Various
41 * @version $Version$
42 *
43 * @deprecated As of Java Servlet API 2.4, with no direct
44 * replacement.
45 */
46
47 public interface SingleThreadModel {
48 }