Costin Manolache wrote:
On 11/3/05, Bill Barker <[EMAIL PROTECTED]> 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).

As for putting this at a lower level, no, because Mladen wanted to be able to specify per host and per context rules, so mapping has to occur first, and then be performed again (there are other features which need ). Having it as a rule is equivalent to putting it (unless in stupid cases where the rewrite valve is set after another valve that is expensive to invoke). Since it's our product, we have some specific requirements ;)

Side effect: if MessageByte and CharChunk were implementing CharSequence, I could just give them to the regexp engine without having to do useless toString calls.

Note: this feature is something that I don't want in Tomcat; just imagine the non portable mess that webapps would become if rewrite was readily available ...

Rémy

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to