Thanks guys! Got the answer. This explains the result of a test case I ran. On Oct 24, 2014 12:20 AM, "Isuru Udana" <isu...@wso2.com> wrote:
> Hi Ravindra, > > I guess Rushmin is asking about Nhttp transport (not passthrough). > > As IsuruR explained in his first response, messages always get built > partially irrespective of whether we have content-aware mediators in the > mediation flow. That is done by the message builders before reaching the > mediation layer. Partially built messages get fully built on demand when > mediators accessing them. This is called deferred building in Axiom. > > > > On Fri, Oct 24, 2014 at 9:36 AM, Ravindra Ranwala <ravin...@wso2.com> > wrote: > >> Hi Rushmin, >> >> Yes indeed. We call this as Conditional canonicalization in Passthrough >> transport architecture. Refer this article[1] for further information. >> >> [1] >> http://wso2.com/library/articles/2013/12/demystifying-wso2-esb-pass-thru-transport-part-ii/ >> >> >> Thanks & Regards, >> >> On Fri, Oct 24, 2014 at 8:53 AM, Rushmin Fernando <rush...@wso2.com> >> wrote: >> >>> Thanks Ravindra. >>> >>> Does it mean that the message won't get built till the mediation engine >>> reaches the first content aware mediator in the sequence ? >>> >>> Rushmin >>> >>> On Thu, Oct 23, 2014 at 11:18 PM, Ravindra Ranwala <ravin...@wso2.com> >>> wrote: >>> >>>> Hi Rushmin, >>>> >>>> If the mediator is a content aware one, the Axis2 Engine should build >>>> the message using a message builder into our internal canonical form before >>>> passing it to the mediate method of the content aware mediator. The mediate >>>> method accepts that internal canonical format and conducts the mediation on >>>> it. Building the message is NOT a responsibility of the mediator. For an >>>> example instance a Filter mediator with a regular xpath expression which >>>> accesses message content can be considered as a content aware mediator. >>>> >>>> >>>> >>>> Thanks & Regards, >>>> >>>> On Thu, Oct 23, 2014 at 11:04 PM, Rushmin Fernando <rush...@wso2.com> >>>> wrote: >>>> >>>>> Thanks isuru for the detailed reply! >>>>> >>>>> So when a message is passed to the mediate() method, is it prebuilt if >>>>> the mediator is a content aware one? Or is it the respinsibility of the >>>>> mediator to build the message? >>>>> On Oct 23, 2014 1:04 PM, "Isuru Ranawaka" <isu...@wso2.com> wrote: >>>>> >>>>>> Hi Rushmin, >>>>>> >>>>>> According to the nhttp architecture it uses two buffers for request >>>>>> read(Input Stream) and request write to BE(output stream). But those two >>>>>> buffers has raw byte stream.But in the mediation layer requests are >>>>>> represent as OMElements.So InputStream is need to convert OMElement and >>>>>> again to OutputStream so that is handle by Axis2 Level message builders >>>>>> and formatters. Message builders create OMElement from input stream and >>>>>> formatters again serialized it. So before moving to mediation layer >>>>>> messages are converted to OMElement but this not fully build of the >>>>>> message >>>>>> this is only partially build because it uses Steaming API (Stax parser) >>>>>> how >>>>>> ever it has significant build overhead comparing to raw byte stream. >>>>>> >>>>>> If mediators are content aware then message is actually fully read >>>>>> to the memory by Streaming API. But if you used binary relay in nhttp >>>>>> transport then messages are processed as byte streams with out partially >>>>>> or >>>>>> fully building of the message.But it can not be used with content aware >>>>>> mediators. >>>>>> >>>>>> thanks >>>>>> IsuruR >>>>>> >>>>>> On Thu, Oct 23, 2014 at 9:30 PM, Rushmin Fernando <rush...@wso2.com> >>>>>> wrote: >>>>>> >>>>>>> Does the framework build the message before it submits a message for >>>>>>> mediation to a content aware mediator >>>>>>> >>>>>>> or >>>>>>> >>>>>>> does it build the message upfront if there is a content mediator in >>>>>>> possible sequence paths ? >>>>>>> >>>>>>> Thanks >>>>>>> Rushmin >>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> *Rushmin Fernando* >>>>>>> *Technical Lead* >>>>>>> >>>>>>> WSO2 Inc. <http://wso2.com/> - Lean . Enterprise . Middleware >>>>>>> >>>>>>> email : rush...@wso2.com >>>>>>> mobile : +94772310855 >>>>>>> >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Dev mailing list >>>>>>> Dev@wso2.org >>>>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev >>>>>>> >>>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> Best Regards >>>>>> Isuru Ranawaka >>>>>> M: +94714629880 >>>>>> Blog : http://isurur.blogspot.com/ >>>>>> >>>>> >>>>> _______________________________________________ >>>>> Dev mailing list >>>>> Dev@wso2.org >>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev >>>>> >>>>> >>>> >>>> >>>> -- >>>> Ravindra Ranwala >>>> Software Engineer >>>> WSO2, Inc: http://wso2.com >>>> <http://www.google.com/url?q=http%3A%2F%2Fwso2.com&sa=D&sntz=1&usg=AFQjCNEZvyc0uMD1HhBaEGCBxs6e9fBObg> >>>> Mobile: +94714198770 >>>> >>>> >>> >>> >>> -- >>> *Rushmin Fernando* >>> *Technical Lead* >>> >>> WSO2 Inc. <http://wso2.com/> - Lean . Enterprise . Middleware >>> >>> email : rush...@wso2.com >>> mobile : +94772310855 >>> >>> >>> >> >> >> -- >> Ravindra Ranwala >> Software Engineer >> WSO2, Inc: http://wso2.com >> <http://www.google.com/url?q=http%3A%2F%2Fwso2.com&sa=D&sntz=1&usg=AFQjCNEZvyc0uMD1HhBaEGCBxs6e9fBObg> >> Mobile: +94714198770 >> >> >> _______________________________________________ >> Dev mailing list >> Dev@wso2.org >> http://wso2.org/cgi-bin/mailman/listinfo/dev >> >> > > > -- > *Isuru Udana* > Senior > *Software Engineer* > WSO2 Inc.; http://wso2.com > email: isu...@wso2.com cell: +94 77 3791887 > blog: http://mytecheye.blogspot.com/ > twitter: http://twitter.com/isudana >
_______________________________________________ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev