tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anton Brazhnyk <a.brazh...@biconsulting.ws>
Subject RE: Database servlets
Date Tue, 12 Feb 2002 08:25:04 GMT
Hi,

> -----Original Message-----
> From: John Wadkin [mailto:j.wadkin@hud.ac.uk]
> Sent: Monday, February 11, 2002 4:34 PM
> To: 'Tomcat Users List'
> Subject: RE: Database servlets
> 
> 

I've looked through your servlet and it definitely shouldn't work with more 
than one simultaneous request. Take a look at that class instance variables

 private Statement stmt;
 private Connection dbCon;
 private HttpServletRequest req;
 private HttpServletResponse res;
 private PrintWriter out;

They can't be safely used in multithreaded environment. This servlet
can work only if implements SingleThreadModel.

Anton

--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message