Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 74542 invoked from network); 27 Sep 2007 13:27:04 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 27 Sep 2007 13:27:04 -0000 Received: (qmail 27363 invoked by uid 500); 27 Sep 2007 13:20:37 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 27344 invoked by uid 500); 27 Sep 2007 13:20:37 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 27332 invoked by uid 99); 27 Sep 2007 13:20:37 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Sep 2007 06:20:37 -0700 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [204.127.200.83] (HELO sccrmhc13.comcast.net) (204.127.200.83) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Sep 2007 13:22:56 +0000 Received: from [192.168.1.101] (c-68-50-0-179.hsd1.va.comcast.net[68.50.0.179]) by comcast.net (sccrmhc13) with ESMTP id <2007092713201301300h86obe>; Thu, 27 Sep 2007 13:20:13 +0000 Message-ID: <46FBAE09.7040105@christopherschultz.net> Date: Thu, 27 Sep 2007 09:20:09 -0400 From: Christopher Schultz User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) MIME-Version: 1.0 To: Tomcat Users List Subject: Re: Simultaneous Requests to servlet References: <3ee7056c0709270339w4c0e5ac8w73e01ef3c1d78400@mail.gmail.com> <46FB98C9.1010409@cornell.edu> In-Reply-To: <46FB98C9.1010409@cornell.edu> X-Enigmail-Version: 0.95.3 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 David, David Smith wrote: > As I understand it one instance of the servlet per webapp is accessed > from all threads in a reentrant manner. This is why you normally can't > use any class instance variables in a servlet. While this is the most straightforward implementation of a servlet container, the servlet specification makes no guarantees whatsoever about the lifecycle of a specific servlet. The container is free to create a new instance of the servlet to handle every request, or to keep a single copy around for the life of the webapp. Or anything in between. The only guarantee made along these lines is for servlets that implement SingleThreadModel, which will either require serialized access or multiple instances to handle requests. Since this has been deprecated but not removed from the spec, I'll bet it will continue to be supported forever, but it's not a very good idea IMO. - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFG+64J9CaO5/Lv0PARAjpoAJ0WrN71Y3DsZMwsH3Id7yyVw7eSNgCgwenS 7F7lp0R5RGdDyYeopo6oQO4= =Ki+D -----END PGP SIGNATURE----- --------------------------------------------------------------------- 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