tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Caldarale, Charles R" <Chuck.Caldar...@unisys.com>
Subject RE: SingleThreadModel for servlets
Date Tue, 25 Nov 2008 17:58:02 GMT
> 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


Mime
View raw message