May be a delegating endpoint (similar to the class mediator) is a better approach?
Thanks, Hiranya On Fri, Feb 10, 2012 at 6:04 PM, indika kumara <indika.k...@gmail.com>wrote: > I am not against any change. But, I think we need to be consistence - > using the same concept for doing the same thing within the project (here > supporting extensions for different synapse language constructs). So, I > think, based on the previous experience with mediator extensions and > others, and the requirements for extensions for remaining constructs, it > would be better to come up with a single, simple scheme that exactly does > what we need. > > Thanks, > > Indika > > On Fri, Feb 10, 2012 at 6:02 PM, Afkham Azeez <afk...@gmail.com> wrote: > >> The easiest way to implement this is to change the getEndpointFactory >> method in org.apache.synapse.config.xml.endpoints.EndpointFactory. If the >> factory class is specified in the endpoint, it will simply use that, if >> not, it will continue to search the list of known endpoints. So, my >> previous example will change to; >> >> <endpoint name="sdlbEndpoint"> >> <session type="http"> >> <!-- Session timout is 15mins--> >> <sessionTimeout>900000</sessionTimeout> >> </session> >> <tenantAwareLoadbalance * >> factory="org.wso2.carbon.endpoints.TenantAwareLBEndpointFactory"* >> failover="true" >> >> algorithm="org.apache.synapse.endpoints.algorithms.RoundRobin" >> configuration="$system:loadbalancer.xml"/> >> </endpoint> >> >> >> Is this an acceptable change? >> >> >> On Fri, Feb 10, 2012 at 12:16 PM, Afkham Azeez <afk...@gmail.com> wrote: >> >>> I think the simplest thing to do is to specify the class inline; >>> >>> e.g. >>> >>> <endpoint name="sdlbEndpoint"> >>> <session type="http"> >>> <!-- Session timout is 15mins--> >>> <sessionTimeout>900000</sessionTimeout> >>> </session> >>> <tenantAwareLoadbalance * >>> class="org.wso2.carbon.endpoints.TenantAwareLBEndpoint"* >>> failover="true" >>> >>> algorithm="org.apache.synapse.endpoints.algorithms.RoundRobin" >>> configuration="$system:loadbalancer.xml"/> >>> </endpoint> >>> >>> So the config builder will know which class to instantiate when it >>> encounters an unknown endpoint type such as tenantAwareLoadbalance. >>> >>> >>> On Fri, Feb 10, 2012 at 11:54 AM, Hiranya Jayathilaka < >>> hiranya...@gmail.com> wrote: >>> >>>> >>>> >>>> On Thu, Feb 9, 2012 at 9:00 PM, Supun Kamburugamuva >>>> <supu...@gmail.com>wrote: >>>> >>>>> May be using a service providers is not a good idea. Lately we have >>>>> not used this approach for registering things because of its sun specific >>>>> nature. We use the synapse.properties file for registering the XPath >>>>> extensions. It is a best place for placing this kind of extensions because >>>>> we are not going to develop lot of endpoints like we do for mediators. >>>>> >>>> >>>> +1 >>>> >>>> We should look for a simple and open way of registering endpoints (and >>>> mediators) as Java extensions. >>>> >>>> Thanks, >>>> Hiranya >>>> >>>> >>>>> >>>>> Thanks, >>>>> Supun.. >>>>> >>>>> >>>>> On Thu, Feb 9, 2012 at 9:50 AM, Udayanga Wickramasinghe < >>>>> udaya...@wso2.com> wrote: >>>>> >>>>>> >>>>>> >>>>>> On Thu, Feb 9, 2012 at 2:27 PM, Afkham Azeez <afk...@gmail.com>wrote: >>>>>> >>>>>>> Sorry, when I said endpoint, I meant endpoint type such as >>>>>>> AddressEndpoint, DynamicLoadbalanceEndpoint etc. These endpoint types >>>>>>> cannot be externally defined right now. >>>>>> >>>>>> >>>>>> +1 >>>>>> one option is to use Java *Service providers to register endpoint >>>>>> factories*/serializers. This approach is currently have been used >>>>>> for pluggin in external mediators >>>>>> Regards, >>>>>> udayanga >>>>>> >>>>>>> >>>>>>> >>>>>>> On Thu, Feb 9, 2012 at 2:13 PM, <ask...@gmail.com> wrote: >>>>>>> >>>>>>>> ** >>>>>>>> I guess you can define and register the end points from your ESB >>>>>>>> using ws-discovery to a WSO2 Registry , later write a custom mediation >>>>>>>> from >>>>>>>> synapse to retrieve the EPR from Registry using Discovery api and >>>>>>>> dynamically route the request to that end point >>>>>>>> Sent using BlackBerry® from Orange >>>>>>>> ------------------------------ >>>>>>>> *From: * Afkham Azeez <afk...@gmail.com> >>>>>>>> *Date: *Thu, 9 Feb 2012 13:29:58 +0530 >>>>>>>> *To: *<dev@synapse.apache.org> >>>>>>>> *ReplyTo: * dev@synapse.apache.org >>>>>>>> *Subject: *Ability to dynamically define endpoints >>>>>>>> >>>>>>>> This is a requirement we have in the WSO2 Load Balancer which uses >>>>>>>> Synapse. At present, endpoints cannot be defined externally we are >>>>>>>> forced >>>>>>>> to use the predefined endpoint sets. However, we require a special >>>>>>>> endpoint >>>>>>>> which does stuff specific to our setup. How easy or difficult is it to >>>>>>>> change Synapse to do this? >>>>>>>> >>>>>>>> Thanks >>>>>>>> Azeez >>>>>>>> >>>>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> *Udayanga Wickramasinghe* >>>>>> Software Engineer; WSO2 Inc.; http://wso2.com, >>>>>> *email: **udaya...@wso2.com* <udayan...@wso2.com>* cell: +94 (77) >>>>>> 983-4365 >>>>>> blog: >>>>>> **http://udayangawiki.blogspot.com*<http://udayangawiki.blogspot.com/> >>>>>> * >>>>>> twitter: >>>>>> **http://twitter.com/udayanga_wick*<http://twitter.com/udayanga_wick> >>>>>> * >>>>>> * >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> Supun Kamburugamuva >>>>> Member, Apache Software Foundation; http://www.apache.org >>>>> E-mail: supu...@gmail.com <su...@wso2.com>; Mobile: +94 77 431 3585 >>>>> Blog: http://supunk.blogspot.com >>>>> >>>>> >>>>> >>>>> >>>> >>>> >>>> -- >>>> Hiranya Jayathilaka >>>> Associate Technical Lead; >>>> WSO2 Inc.; http://wso2.org >>>> E-mail: hira...@wso2.com; Mobile: +94 77 633 3491 >>>> Blog: http://techfeast-hiranya.blogspot.com >>>> >>> >>> >>> >>> -- >>> *Afkham Azeez* >>> Director of Architecture; WSO2, Inc.; http://wso2.com, >>> *Member; Apache Software Foundation; >>> **http://www.apache.org/*<http://www.apache.org/> >>> * >>> * >>> *email: **az...@wso2.com* <az...@wso2.com>* cell: +94 77 3320919 >>> blog: **http://blog.afkham.org* <http://blog.afkham.org>* >>> twitter: **http://twitter.com/afkham_azeez*<http://twitter.com/afkham_azeez> >>> * >>> linked-in: **http://lk.linkedin.com/in/afkhamazeez* >>> * >>> * >>> *Lean . Enterprise . Middleware* >>> * >>> * >>> >>> >> >> >> -- >> *Afkham Azeez* >> Director of Architecture; WSO2, Inc.; http://wso2.com, >> *Member; Apache Software Foundation; >> **http://www.apache.org/*<http://www.apache.org/> >> * >> * >> *email: **az...@wso2.com* <az...@wso2.com>* cell: +94 77 3320919 >> blog: **http://blog.afkham.org* <http://blog.afkham.org>* >> twitter: **http://twitter.com/afkham_azeez*<http://twitter.com/afkham_azeez> >> * >> linked-in: **http://lk.linkedin.com/in/afkhamazeez* >> * >> * >> *Lean . Enterprise . Middleware* >> * >> * >> >> > -- Hiranya Jayathilaka Associate Technical Lead; WSO2 Inc.; http://wso2.org E-mail: hira...@wso2.com; Mobile: +94 77 633 3491 Blog: http://techfeast-hiranya.blogspot.com