tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tony Anecito <adanec...@yahoo.com>
Subject RE: SingleThreadModel for servlets
Date Tue, 25 Nov 2008 18:09:33 GMT
Hi Charles,

Thanks for the prompt answer. I was only giving an example. The question I wanted answered
was in general if current real life experience still holds true that the mutli-threaded single
servlet model is still faster than one servlet per thread where the servlet is pooled.

Thanks,
-Tony


--- On Tue, 11/25/08, Caldarale, Charles R <Chuck.Caldarale@unisys.com> wrote:

> From: Caldarale, Charles R <Chuck.Caldarale@unisys.com>
> Subject: RE: SingleThreadModel for servlets
> To: "Tomcat Users List" <users@tomcat.apache.org>
> Date: Tuesday, November 25, 2008, 10:58 AM
> > From: Tony Anecito [mailto:adanecito@yahoo.com]
> > Subject: SingleThreadModel for servlets
> >
> > Reason I ask is if you have a slow service using the
> > multithreaded servlet it might be a bad idea
> especially
> > if there is synchronous methods used anywhere in the
> code
> > for a multithreaded servlet.
> 
> Synchronization should be there for a reason, not just
> because the programmer thought it looked pretty.  If
> something needs to be protected, that requirement will exist
> regardless of whether there are one or many copies of a
> particular Servlet object.  If the programmer has been
> sloppy and is using synchronization on instance variables
> for cases where local variables should have been used,
> you've got a badly written servlet that should be
> corrected.
> 
>  - Chuck
> 
> 
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR
> OTHERWISE PROPRIETARY MATERIAL and is thus for use only by
> the intended recipient. If you received this in error,
> please contact the sender and delete the e-mail and its
> attachments from all computers.
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail:
> users-help@tomcat.apache.org


      

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message