> I have a servlet implements the SingleThreadModel
> Interface. But this servlet has problem handle more
> than 1 request at a time.
I thought that this was the definition of a SingleThreadModel servlet? To
enable this servlet to handle > 1 request, you have to tell your servlet
container to create a pool of servlet instances.
So, solutions include:
- create a pool of SingleThreadModel servlets to handle multiple requests,
delegating threadsafety
- remove the SingleThreadModel interface from your servlet and handle the
synchronization yourself (level of difficulty determined by what your
servlet does)
Craig Pfeifer
Software Engineer
Aether Systems, Software Products Division
703.847.3303 x2053
[EMAIL PROTECTED]
> -----Original Message-----
> From: eric leung [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, April 12, 2001 7:03 PM
> To: [EMAIL PROTECTED]
> Subject: Servlet -- SingleThreadModel
>
>
> I have a servlet implements the SingleThreadModel
> Interface. But this servlet has problem handle more
> than 1 request at a time.
>
> Since I have 1 person on host1 upload a big file ( >
> 20MB ) to the servlet. When the 2nd person on host2
> send a request to that servlet. The servlet will not
> response.
>
> Any one had the same problem using SingleThreadModel?
> I am using apache 1.3.17 + tomcat 3.2.1.
> thanks.
>
>
> P.S. I use SingleThreadModel beause i don't want to
> worry about syncronization of threads, I have
> Connection as instance variable:
>
> public class admin extends HttpServlet implements
> SingleThreadModel{
> private PrintWriter out;
> private OracleConnectionCacheImpl pool;
> private Connection conn;
> private Statement stmt;
>
> ..etc...
>
>
> __________________________________________________
> Do You Yahoo!?
> Get email at your own domain with Yahoo! Mail.
> http://personal.mail.yahoo.com/
>