tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Arvind Srinivasan" <arvind.sriniva...@sun.com>
Subject RE: cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core StandardPipeline.java
Date Wed, 03 Apr 2002 23:01:06 GMT
Christopher St. John wrote:
>
>  The obvious implementation is to have have ValveContext hold
> the index.
>
>  That's how I assumed it worked the first time I
> saw the Pipeline, Valve and ValveContext classes. I was suprised
> to see a ThreadLocal. Using ValveContext has the appropriate
> threading semantics, and it avoids hiding the index in a
> "mystery attribute" in the Request. And, (although none of this
> will result in a measurable performance gain) using
> ValveContext to hold the index should be faster, since it
> avoids a hashtable lookup.
>
>  Using a Request note is much like using a global variable:
> it's  hidden state. Long term that's bad, for obvious
> reasons.
>

But isn't a ValveContext (Pipeline) shared across requests ? I think the
stage has to be maintained in the Request object.

-Arvind


--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message