axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Amila Suriarachchi" <>
Subject Re: [Axis2]Proposal:Change to Handler order resolution Implementation
Date Tue, 23 Dec 2008 18:44:50 GMT
On Tue, Dec 23, 2008 at 6:25 PM, Srinath Perera <> wrote:

> Hi All;
> As far as I understood, with current handler order resolution in the
> Phase (see org.apache.axis2.engine.Phase) the order of Handlers are
> depended on the order they are added. For an example, if there are
> handlers A and B and there is a rules in B says B after A, the order
> is preserved only if B is added after A. if handlers are added B,A
> then since A does not have rules, it is added to somewhere. AFAIK
> current code only check rules for the new handler, but does not check
> rules in the existing Handlers.
> I noticed this problem while developing a Handler, and walk though the
> code also verified it.
> However, there is a standard way to solve this problem. The solution
> is creating a graph assigning dependencies as edges in a graph--which
> is a directed acyclic graph--and then doing a topology sort
> . The algorithm takes
> O(n) time and space where n is number of entities + number of rules,
> which is pretty reasonable.
> If people agree, I would like to redo the Handler resolution algorithm
> in the Phase class with topology sort. Please comment. (Please note I
> can not commit for a time line, but will do it when I get a free
> time.)

This was discuss sometime back please see here[1],[2]. I developed a simple
algorithm[3] at the time
this disscussion happen to resolve the phases.
+1 to add this feature using any algorithm.



> Thanks very much
> Srinath
> --
> ============================
> Srinath Perera:
>   Indiana University, Bloomington

Amila Suriarachchi
WSO2 Inc.

View raw message