You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by jean-frederic clere <jf...@fujitsu-siemens.com> on 2002/11/25 11:47:14 UTC
Valve order
Hi,
Just an easy question:
How could I be sure that my valve is the first one in the valve chain?
Cheers
Jean-frederic
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Valve order
Posted by jean-frederic clere <jf...@fujitsu-siemens.com>.
Jeanfrancois Arcand wrote:
> Hi,
>
> the Digester's rules defined in ContextRuleSet, EngineRuleSet and
> HostRuleSet invoke:
>
> digester.addSetProperties(prefix + "Context/Valve");
> digester.addSetNext(prefix + "Context/Valve",
> "addValve",
> "org.apache.catalina.Valve");
>
> and org.apache.catalina.core.StandardPipeline defines:
> [...]
> // Add this Valve to the set associated with this Pipeline
> synchronized (valves) {
> Valve results[] = new Valve[valves.length +1];
> System.arraycopy(valves, 0, results, 0, valves.length);
> results[valves.length] = valve;
> valves = results;
> }
>
> So the Digester will trap the SAX events based on the order you have
> defined the Valve and then add it to an array. Remember that Valve are
> created first for Engine, Host and then Context.
>
> Hope that help.
Oui merci ;-))
>
> -- Jeanfrancois
>
> jean-frederic clere wrote:
>
>> Hi,
>>
>> Just an easy question:
>>
>> How could I be sure that my valve is the first one in the valve chain?
>>
>> Cheers
>>
>> Jean-frederic
>>
>>
>> --
>> To unsubscribe, e-mail:
>> <ma...@jakarta.apache.org>
>> For additional commands, e-mail:
>> <ma...@jakarta.apache.org>
>>
>>
>
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Valve order
Posted by Jeanfrancois Arcand <jf...@apache.org>.
Hi,
the Digester's rules defined in ContextRuleSet, EngineRuleSet and
HostRuleSet invoke:
digester.addSetProperties(prefix + "Context/Valve");
digester.addSetNext(prefix + "Context/Valve",
"addValve",
"org.apache.catalina.Valve");
and org.apache.catalina.core.StandardPipeline defines:
[...]
// Add this Valve to the set associated with this Pipeline
synchronized (valves) {
Valve results[] = new Valve[valves.length +1];
System.arraycopy(valves, 0, results, 0, valves.length);
results[valves.length] = valve;
valves = results;
}
So the Digester will trap the SAX events based on the order you have
defined the Valve and then add it to an array. Remember that Valve are
created first for Engine, Host and then Context.
Hope that help.
-- Jeanfrancois
jean-frederic clere wrote:
> Hi,
>
> Just an easy question:
>
> How could I be sure that my valve is the first one in the valve chain?
>
> Cheers
>
> Jean-frederic
>
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>