axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dobri Kitipov <kdobrik.ax...@googlemail.com>
Subject Re: TransportListener and AxisEngine#sendFault(faultContext) tightly coupled
Date Tue, 17 Mar 2009 11:44:28 GMT
Hi  Amila,

I will put this on my queue.

Thank you,
Dobri

On Tue, Mar 17, 2009 at 1:33 PM, Amila Suriarachchi <
amilasuriarachchi@gmail.com> wrote:

>
>
> On Tue, Mar 17, 2009 at 3:52 PM, Dobri Kitipov <
> kdobrik.axis2@googlemail.com> wrote:
>
>> Hi everyone,
>> I want to direct your attention to how OUT_FAULT_FLOW is triggered in
>> Axis2.
>>
>> 1) The short story
>>
>> When a request is received by the TransportListener (TL) (e.g.
>> AxisServlet) then it invokes the AxisEngine (i.e.
>> AxisEngine#receive(msgContext)). If there is a fault condition it is thrown
>> by the engine and caught by the TransportListener. What happens is that the
>> whole logic about triggering the OUT_FAULT_FLOW phases is placed into the
>> TL, but not into the engine itself.
>> You can refer to the AxisEngine#doPost() which in turn invokes its private
>> processAxisFault() when there is a fault condition.
>
>
> I also got the same  feeling  when I saw this code for the first time.
>
>
>>
>>
>> 2) The problem
>>
>> IMHO we can meet the following issue. If someone wants to create a custom
>> TL then it should have the "processAxisFault" logic implemented into it.
>> Since this is not well documented (I did not find a proper docu about this)
>> it come out that the TL is missing this logic need and will not work
>> properly.
>>
>>
>> 3) The proposal
>>
>> a) I did a short research and did not find any obstacle to include the the
>> "processAxisFault" logic into the engine itself (basically
>> AxisEngine#sendFault(faultContext) should be called). IMHO doing so the
>> architecture of Axis2 will be simplified and the fault logic will be
>> decoupled from the TL implementation. Of course some HttpServletResponse
>> processing should take place into the TL, but this is something more natural
>> to do ( ;) better known and/or understanded/documented).
>
>
> Did you have a time to look at how JMS, SMTP and other transport have
> implemented the Fault handling part. IMHO this code at least should go to
> transport base module so that all the transports can use it.
>
>>
>>
>> I think that this is worth having to be discussed.
>
> +1
>
> thanks,
> Amila.
>
>>
>>
>> Please share your comments/opinions.
>>
>> Thank you in advance,
>> Dobri
>>
>
>
>
> --
> Amila Suriarachchi
> WSO2 Inc.
> blog: http://amilachinthaka.blogspot.com/
>

Mime
View raw message