Jason van Zyl <[EMAIL PROTECTED]> writes:
> On 2/13/02 3:33 AM, "Paulo Silveira" <[EMAIL PROTECTED]> wrote:
>
>> Hello
>>
>> Each valve in the turbine3 pipeline is invoked(), then invokeNext().
>> Just like tomcat.
>> This seems ok, but why is this better than doing a for in each valve,
>> and invoking it. Because this way the stack becomes so huge!
>>
>> I mean, instead of doing this:
>>
>> (TurbinePipeline.java)
>> public void invoke(RunData data)
>> throws TurbineException, IOException
>> {
>> // Initialize the per-thread state for this thread
>> state.set(new Integer(0));
>>
>> // Invoke the first Valve in this pipeline for this request
>> invokeNext(data);
>> }
>>
>> Doing something like:
>>
>> public void invoke(RunData data)
>> throws TurbineException, IOException
>> {
>> for (int i = 0; i < valves.length; i++)
>> {
>> valves[i].invoke();
>> }
>> }
>>
>> This way it would be a Pipeline calling the valves, the otherway the
>> valve calls the next valve.
>
> You may not necessarily want to execute _all_ of the valves in sequence.
> Under certain conditions, state contained in the ValveContext, you may not
> execute a type or class of valve. This is the design at any rate, we lifted
> the pattern wholus bolus from catalina. We may still make minor adjustments.
>
>>
>> And why exaclty it throws IOException?
>
> I think this is an artifact of the internals of Catalina, I'm not sure if we
> need it. Dan popped in the Catalina stuff as to kick start development with
> the pipeline but what's there may not reflect what is there when we're
> finished.
What Jason said.
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>