I don't see how a request going through a Valve can be "already
throttled", as requests are supposed to go through a valve only once.
Can you give an example ? (maybe multiple valves in a row like what is
suggested below ?) Valves only accept the concrete Request class, no
wrapping allowed.
Yes, multiple valves in a row is what I am suggesting. One example
could be:
<!-- Allow up to 32 users to concurrently run a "lightweight"
request at a time.
Additional "lightweight" user requests are queued until
one of the running 32 user
requests completes. This SemaphoreValve instance is
evaluated first.
-->
<Valve className="org.apache.catalina.valves.SemaphoreValve"
fairness="true"
concurrency="32"
parameterName="componentType"
parameterValue=".*LightWeight.*"
/>
<!-- Allow an unlimited number of requests for static resources.
Concurrency=0 means that no throttling is performed.
This SemaphoreValve is evaluated second, if a previous
SemaphoreValve filter matched already,
then this SemaphoreValve is not processed.
-->
<Valve className="org.apache.catalina.valves.SemaphoreValve"
fairness="true"
concurrency="0"
filter=".*\.gif,.*\.js,.*\.jpg,.*\.htm,.*\.html,.*\.txt,.*\.vm,.*\.css,.*\.cur"
/>
<!-- "Catch all throttle" that will allow up to 9 users to
concurrently run other
requests at a time (assumed to be the "HeavyWeight"
requests. Additional user requests are queued until one of the
running 9 user requests completes.
This SemaphoreValve is evaluated third, if a previous
SemaphoreValve filter matched already,
then this SemaphoreValve is not processed.
-->
<Valve className="org.apache.catalina.valves.SemaphoreValve"
fairness="true"
concurrency="9"
filter=".*" />
/>
I didn't want a single request to consume Semaphore permits from more
than one SemaphoreValve.
Thanks,
Scott
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]