Make your connection etc. stack variables instead, by creating a class to contain them and move all your code into that class - then have the empty servlet "new" an instance and call the service method. This way you can use instance variables and the Multi-Threaded Model.

eric leung wrote:

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/

-- 
David Crooke, Chief Technology Officer
Convio Inc. - the online partner for nonprofits
4801 Plaza on the Lake, Suite 1500, Austin TX 78746
Tel: (512) 652 2600 - Fax: (512) 652 2699
 


Reply via email to