Return-Path: Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: (qmail 38719 invoked from network); 3 Nov 2005 20:39:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 3 Nov 2005 20:39:32 -0000 Received: (qmail 89456 invoked by uid 500); 3 Nov 2005 20:39:27 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 89417 invoked by uid 500); 3 Nov 2005 20:39:26 -0000 Mailing-List: contact dev-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Developers List" Delivered-To: mailing list dev@tomcat.apache.org Received: (qmail 89406 invoked by uid 99); 3 Nov 2005 20:39:26 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Nov 2005 12:39:26 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [209.0.86.83] (HELO tango.wilshire.com) (209.0.86.83) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Nov 2005 12:39:21 -0800 Received: from harpy.wilshire.com (harpy.wilshire.com [192.168.1.58]) by tango.wilshire.com (8.13.4/8.12.3/Debian-6.6) with ESMTP id jA3KcsBk006514 for ; Thu, 3 Nov 2005 12:38:54 -0800 Received: from bbarkerxp (foundry.wilshire.com [192.168.1.129]) by harpy.wilshire.com (8.12.10/8.12.3) with SMTP id jA3Kcssg000224 for ; Thu, 3 Nov 2005 12:38:54 -0800 (PST) Message-ID: <00b101c5e0b6$9b5229d0$7037a8c0@nt.wilshire.com> From: "Bill Barker" To: "Tomcat Developers List" References: <436A3D6B.4080900@apache.org> <001d01c5e0a9$67377630$7037a8c0@nt.wilshire.com> <96e4b5230511031130p66ce6b58i6c902b4404e01cfe@mail.gmail.com> <436A6EF8.7060305@apache.org> Subject: Re: Rewrite features Date: Thu, 3 Nov 2005 12:38:54 -0800 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Zantaz-Archived: tango Content-Disposition: inline X-Scanned-By: MIMEDefang 2.52 on 192.168.1.83 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ----- Original Message ----- From: "Remy Maucherat" To: "Tomcat Developers List" Sent: Thursday, November 03, 2005 12:11 PM Subject: Re: Rewrite features >Costin Manolache wrote: >> On 11/3/05, Bill Barker wrote: >> >>>It probably doesn't matter (since nobody uses it :), but using ThreadLocal >>>won't work with the Nio/AJP Connector. That one doesn't bind a Request >>>instance to a Thread instance, so a particular Request instance will process >>>on many different Threads during its lifecycle. >> >> Does the spec say anything about the thread model when executing a >> servlet ? ( too lazy to search, I know some people on the list have >> memorized the spec already :-) >> >> I'm not sure how this happens - I tought that the request is bound to >> a thread during service() execution, and kept-alive connections are no >> longer bound. How do we unbind the service() from the thread ??? > >There must be a misunderstanding somewhere: the thread is indeed bound >during the execution of the adapter process method, so TLs should work >the way I am using them. Using notes is difficult for this because there >can be "nested" rewrites (one at host level + one at context level, for >example). I would have preffered using that for performance, of course; >maybe an array would do it, or something, but TLs are cleaner to >understand. I do need plenty of TLs anyway, as the regexp engine is per >thread. For some reason, it took me a long time to figure out a design >that I liked, worked and met the requirements (I suck). > The TomcatResolver instance is holding a reference to the Request instance, and is in a TL. As a result (because of the way the ThreadPool works) it will live very much longer than just during the processing of a given Request. This is all fine for all of the current Connectors except Nio/AJP, since they happen to bind the Request instance to the Thread instance so you always get the right Request instance. Adding a setRequest method to TomcatResolver would "fix" this with the minimal amount of work. This message is intended only for the use of the person(s) listed above as the intended recipient(s), and may contain information that is PRIVILEGED and CONFIDENTIAL. If you are not an intended recipient, you may not read, copy, or distribute this message or any attachment. If you received this communication in error, please notify us immediately by e-mail and then delete all copies of this message and any attachments. In addition you should be aware that ordinary (unencrypted) e-mail sent through the Internet is not secure. Do not send confidential or sensitive information, such as social security numbers, account numbers, personal identification numbers and passwords, to us via ordinary (unencrypted) e-mail. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org