Hi Dilan, Isn't it createSpecificMediator() that is called to create a mediator from configuration file?
I searched in the synapse source for usages of createSpecificMediator() and found that serializeSpecificMediator() is used in deployers mostly for restoring the XML in error conditions. Anyway, why I wanted to know when serializeSpecificMediator() is called is to check the correctness of my serializer. I found org.apache.synapse.mediators.AbstractTestCase.serialization() method which can do that. Now I can check the correctness of my serializer using that. Thanks everyone for help On Tue, Nov 4, 2014 at 6:48 PM, Dilan Udara Ariyaratne <[email protected]> wrote: > Hi Lahiru, > > AFAIK, serializeSpecificMediator() is the method that gets called when we > are reading the relevant configuration xml for a specific mediator from the > esb configuration file > and input that to the mediate() function of the mediator to do the > corresponding processing. > > Cheers. > > > *Dilan U. Ariyaratne* > Software Engineer > WSO2 Inc. <http://wso2.com/> > Mobile: +94775149066 > lean . enterprise . middleware > > On Tue, Nov 4, 2014 at 12:45 PM, Lahiru Chandima <[email protected]> wrote: > >> Hi Maninda, >> >> I thought the conversion of the mediator to xml and vice versa is done by >> the mediator class in the mediator configuration UI bundle. It has >> serialize() method to convert mediator to XML and build() method to build a >> mediator from XML. >> >> Anyway, I will check whether serializeSpecificMediator() gets called when >> configuring the mediator in UI when I implement the UI bundle. >> >> Thanks. >> >> On Tue, Nov 4, 2014 at 12:34 PM, Maninda Edirisooriya <[email protected]> >> wrote: >> >>> Hi Lahiru, >>> >>> As earlier said by Isuru, it is used to convert the mediator UI entered >>> configuration to generate the mediator XML as I remember. And you may find >>> another class to generate the UI from this XML back which does the reverse >>> of the serializer. These two classes will be called when you switch between >>> UI view and source view of the mediator UI as I remember. >>> >>> >>> *Maninda Edirisooriya* >>> Senior Software Engineer >>> >>> *WSO2, Inc.*lean.enterprise.middleware. >>> >>> *Blog* : http://maninda.blogspot.com/ >>> *E-mail* : [email protected] >>> *Skype* : @manindae >>> *Twitter* : @maninda >>> >>> On Tue, Nov 4, 2014 at 12:24 PM, Lahiru Chandima <[email protected]> >>> wrote: >>> >>>> Hi Isuru, >>>> >>>> Actually the blog post you provided is the one that I am already >>>> referring to :). It specifies to create a serializer but doesn't mention >>>> what is the need of a serializer. >>>> >>>> Thanks. >>>> >>>> On Tue, Nov 4, 2014 at 12:18 PM, Isuru Ranawaka <[email protected]> >>>> wrote: >>>> >>>>> Hi , >>>>> >>>>> Hope following links help you >>>>> >>>>> http://maninda.blogspot.com/2013/01/writing-custom-mediator-for-wso2-esb.html >>>>> http://wso2.com/library/2936/ >>>>> >>>>> On Tue, Nov 4, 2014 at 12:06 PM, Lahiru Chandima <[email protected]> >>>>> wrote: >>>>> >>>>>> Hi Waruna, >>>>>> >>>>>> My OSGi bundle is active. mediate() method of the mediator gets >>>>>> called without a problem. The problem is that serializeSpecificMediator() >>>>>> doesn't get called. >>>>>> >>>>>> Hi Isuru, >>>>>> >>>>>> Isn't it >>>>>> org.wso2.carbon.mediator.service.ui.AbstractMediator.serialize() >>>>>> method (which needs to be implemented in UI bundle mediator class) which >>>>>> UI >>>>>> bundle uses for serializing the mediator config to XML? I haven't >>>>>> deployed >>>>>> a mediator configuration UI bundle yet for this mediator. >>>>>> >>>>>> Thanks >>>>>> >>>>>> >>>>>> >>>>>> On Tue, Nov 4, 2014 at 11:56 AM, Isuru Ranawaka <[email protected]> >>>>>> wrote: >>>>>> >>>>>>> Hi Lahiru, >>>>>>> >>>>>>> Mediator serializer is for write mediator configuration object to >>>>>>> XML file which is used when saving configuration from UI to file system. >>>>>>> Check by saving your configuration from UI. >>>>>>> >>>>>>> Thanks >>>>>>> isuruR >>>>>>> >>>>>>> On Tue, Nov 4, 2014 at 11:47 AM, Waruna Perera <[email protected]> >>>>>>> wrote: >>>>>>> >>>>>>>> Hi Lahiru, >>>>>>>> >>>>>>>> can you check whether your bundle got activated vi Osgi console? >>>>>>>> >>>>>>>> >>>>>>>> Thanks >>>>>>>> >>>>>>>> On Tue, Nov 4, 2014 at 11:34 AM, Lahiru Chandima <[email protected]> >>>>>>>> wrote: >>>>>>>> >>>>>>>>> Hi All, >>>>>>>>> >>>>>>>>> I am writing a new ESB mediator and I cannot figure out the need >>>>>>>>> of a mediator serializer (extension of AbstractMediatorSerializer) >>>>>>>>> for a >>>>>>>>> mediator. >>>>>>>>> >>>>>>>>> Also, in the new mediator I created, if I add a breakpoint in >>>>>>>>> serializeSpecificMediator() method in my mediator serializer and >>>>>>>>> debugged, >>>>>>>>> the breakpoint never gets hit (during ESB startup or when the mediator >>>>>>>>> receives an event to mediate). >>>>>>>>> >>>>>>>>> Does anybody know what is the need of a mediator serializer and >>>>>>>>> when does the serializeSpecificMediator() method get called? >>>>>>>>> >>>>>>>>> Thanks >>>>>>>>> >>>>>>>>> -- >>>>>>>>> Lahiru Chandima >>>>>>>>> *Senior Software Engineer* >>>>>>>>> Mobile : +94 (0) 772 253283 >>>>>>>>> [email protected] >>>>>>>>> >>>>>>>>> _______________________________________________ >>>>>>>>> Dev mailing list >>>>>>>>> [email protected] >>>>>>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev >>>>>>>>> >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> -- >>>>>>>> Waruna Perera >>>>>>>> Senior Software Engineer - Test Automation >>>>>>>> Mobile: +94 77 3867037 >>>>>>>> WSO2, Inc.; http://wso2.com/ >>>>>>>> lean . enterprise . middlewear. >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> Dev mailing list >>>>>>>> [email protected] >>>>>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev >>>>>>>> >>>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> Best Regards >>>>>>> Isuru Ranawaka >>>>>>> M: +94714629880 >>>>>>> Blog : http://isurur.blogspot.com/ >>>>>>> >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> Lahiru Chandima >>>>>> *Senior Software Engineer* >>>>>> Mobile : +94 (0) 772 253283 >>>>>> [email protected] >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> Best Regards >>>>> Isuru Ranawaka >>>>> M: +94714629880 >>>>> Blog : http://isurur.blogspot.com/ >>>>> >>>> >>>> >>>> >>>> -- >>>> Lahiru Chandima >>>> *Senior Software Engineer* >>>> Mobile : +94 (0) 772 253283 >>>> [email protected] >>>> >>>> _______________________________________________ >>>> Dev mailing list >>>> [email protected] >>>> http://wso2.org/cgi-bin/mailman/listinfo/dev >>>> >>>> >>> >> >> >> -- >> Lahiru Chandima >> *Senior Software Engineer* >> Mobile : +94 (0) 772 253283 >> [email protected] >> >> _______________________________________________ >> Dev mailing list >> [email protected] >> http://wso2.org/cgi-bin/mailman/listinfo/dev >> >> > -- Lahiru Chandima *Senior Software Engineer* Mobile : +94 (0) 772 253283 [email protected]
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
