Hi Andreas, I am curious if you have tested this with a custom transport listener? I suppose a test case and a documentation update (e.g. JavaDoc) will be something worth having?
thanks, dobri On Tue, Mar 17, 2009 at 11:32 PM, Andreas Veithen <[email protected] > wrote: > On Tue, Mar 17, 2009 at 12:33, Amila Suriarachchi > <[email protected]> wrote: > > > > > > On Tue, Mar 17, 2009 at 3:52 PM, Dobri Kitipov > > <[email protected]> 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. > > There is some generic code in > AbstractTransportListener#handleIncomingMessage. It is used by the JMS > and mail transports and does the same as the code in AxisServlet > (except for the decision logic on the HTTP status code). > > >> > >> > >> 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/ > > >
