tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeanfrancois Arcand <jfarc...@apache.org>
Subject Re: Valve order
Date Mon, 25 Nov 2002 15:44:21 GMT
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:   
> <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: 
> <mailto:tomcat-dev-help@jakarta.apache.org>
>
>


--
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