You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Deepal Jayasinghe <de...@opensource.lk> on 2005/03/24 12:47:20 UTC
[Axis2] Phase rule problems.
Hi all;
In the current implementation of Axis2 the way of specifying the phase order is as follows;
<phaseOrder>
<phase name="transport"/>
<phase name="global"/>
<phase name="Logging"/>
<phase name="service"/>
</phaseOrder>
What this implies is that all the handlers in "transport" phase run first and then all the handler in global phase and so on, irrespective of the flow. As far as inflow is concern there is no problem with this but if we consider the outflow then the following problem come in to play;
Although in practical situation service specific handlers should be executed first, if we use above phase order it won't happen. So my suggestion is to specify phase order per flow basis and to use following format to specify them;
<phaseOrder type = "inflow">
<phase name="transport"/>
<phase name="global"/>
<phase name="Logging"/>
<phase name="service"/>
</phaseOrder>
<phaseOrder type = "outflow">
<phase name="service"/>
<phase name="Logging"/>
<phase name="global"/>
<phase name="transport"/>
</phaseOrder>
<phaseOrder type = "faultflow">
<phase name="transport"/>
<phase name="global"/>
<phase name="Logging"/>
<phase name="service"/>
</phaseOrder>
Comments ...
Deepal
Re: [Axis2] Phase rule problems.
Posted by Ajith Ranabahu <aj...@gmail.com>.
Sorry for the stupid question. I did not notice the clear <inflow> and
<outflow> tags in the service.xml. Yes the strategy you are suggesting
seems to be the obvious answer.
On Thu, 24 Mar 2005 18:10:07 +0600, Deepal Jayasinghe
<de...@opensource.lk> wrote:
> Hi ;
>
> I don't think we need to change the service.xml , instead what we have to
> do is when we specifying the inflow handlers we have to use only the inflow
> phases as the phase attribute in handler element , else at the phase
> resolving time will throw an exception.
>
>
> Deepal
>
>
--
Ajith Ranabahu
Re: [Axis2] Phase rule problems.
Posted by Deepal Jayasinghe <de...@opensource.lk>.
Hi ;
I don’t think we need to change the service.xml , instead what we have to
do is when we specifying the inflow handlers we have to use only the inflow
phases as the phase attribute in handler element , else at the phase
resolving time will throw an exception.
Deepal
> Yep, this is exactly what is needed. I am definitely +1 for this change.
> BTW how would the service.xml be changed to indicate the flows ?
>
>
> On Thu, 24 Mar 2005 17:47:20 +0600, Deepal Jayasinghe
> <de...@opensource.lk> wrote:
>>
>> Hi all;
>>
>>
>>
>> In the current implementation of Axis2 the way of specifying the phase
>> order
>> is as follows;
>>
>>
>>
>> <phaseOrder>
>>
>> <phase name="transport"/>
>>
>> <phase name="global"/>
>>
>> <phase name="Logging"/>
>>
>> <phase name="service"/>
>>
>> </phaseOrder>
>>
>>
>>
>> What this implies is that all the handlers in "transport" phase run first
>> and then all the handler in global phase and so on, irrespective of the
>> flow. As far as inflow is concern there is no problem with this but if we
>> consider the outflow then the following problem come in to play;
>>
>> Although in practical situation service specific handlers should be
>> executed
>> first, if we use above phase order it won't happen. So my suggestion is
>> to
>> specify phase order per flow basis and to use following format to specify
>> them;
>>
>>
>>
>> <phaseOrder type = "inflow">
>>
>> <phase name="transport"/>
>>
>> <phase name="global"/>
>>
>> <phase name="Logging"/>
>>
>> <phase name="service"/>
>>
>> </phaseOrder>
>>
>>
>>
>> <phaseOrder type = "outflow">
>>
>> <phase name="service"/>
>>
>> <phase name="Logging"/>
>>
>> <phase name="global"/>
>>
>> <phase name="transport"/>
>>
>> </phaseOrder>
>>
>>
>>
>> <phaseOrder type = "faultflow">
>>
>> <phase name="transport"/>
>>
>> <phase name="global"/>
>>
>> <phase name="Logging"/>
>>
>> <phase name="service"/>
>>
>> </phaseOrder>
>>
>>
>>
>>
>>
>> Comments …….
>>
>>
>>
>>
>>
>> Deepal
>
>
> --
> Ajith Ranabahu
>
>
>
Re: [Axis2] Phase rule problems.
Posted by Ajith Ranabahu <aj...@gmail.com>.
Yep, this is exactly what is needed. I am definitely +1 for this change.
BTW how would the service.xml be changed to indicate the flows ?
On Thu, 24 Mar 2005 17:47:20 +0600, Deepal Jayasinghe
<de...@opensource.lk> wrote:
>
> Hi all;
>
>
>
> In the current implementation of Axis2 the way of specifying the phase order
> is as follows;
>
>
>
> <phaseOrder>
>
> <phase name="transport"/>
>
> <phase name="global"/>
>
> <phase name="Logging"/>
>
> <phase name="service"/>
>
> </phaseOrder>
>
>
>
> What this implies is that all the handlers in "transport" phase run first
> and then all the handler in global phase and so on, irrespective of the
> flow. As far as inflow is concern there is no problem with this but if we
> consider the outflow then the following problem come in to play;
>
> Although in practical situation service specific handlers should be executed
> first, if we use above phase order it won't happen. So my suggestion is to
> specify phase order per flow basis and to use following format to specify
> them;
>
>
>
> <phaseOrder type = "inflow">
>
> <phase name="transport"/>
>
> <phase name="global"/>
>
> <phase name="Logging"/>
>
> <phase name="service"/>
>
> </phaseOrder>
>
>
>
> <phaseOrder type = "outflow">
>
> <phase name="service"/>
>
> <phase name="Logging"/>
>
> <phase name="global"/>
>
> <phase name="transport"/>
>
> </phaseOrder>
>
>
>
> <phaseOrder type = "faultflow">
>
> <phase name="transport"/>
>
> <phase name="global"/>
>
> <phase name="Logging"/>
>
> <phase name="service"/>
>
> </phaseOrder>
>
>
>
>
>
> Comments …….
>
>
>
>
>
> Deepal
--
Ajith Ranabahu