« Return to Thread: exception-type-filter with chaining-router
antoine.borg wrote:Take a look at the examples here:
http://www.mulesource.org/display/MULE2USER/Component+Bindings
HTH
A
deepan s wrote:
> Andrew,
>
> To use component binding for my scenario, i might have to bind more than one
> endpoints (implementing same interface) to my component, so that i can make
> some routing decisions with in the component class implementation.
>
> I can find the below quoted from the mule document, but not sure how
> "With component bindings it is possible to configure multiple interfaces or
> a single interface with a an endpoint bound to one or more Mule endpoints. "
>
> Can you please advice on how my Invoker component class should look like,
> can i do some thing like this...
>
> public class InvokerComponent {
> private HelloInterface[] hello; // i have an array of components bound
> public String invoke(String s) { // i make routing decisions
> String result = hello[0].sayHello(s, "English");
> if(result.equals("xyz")){
> result = hello[1].sayHello(s, "English");
> }
> return result;
> }
> public void setHello(HelloInterface[] hello) {
> this.hello = hello;
> }
> public HelloInterface[] getHello() {
> return hello;
> }
> }
>
> Thanks,
> Deepan Subramani
>
>
> Andrew Perepelytsya wrote:
>
>> Consider ComponentBindings. Then your service could orchestrate complex
>> flows.
>>
>> HTH,
>> Andrew
>>
>> On Jul 1, 2009 7:07 AM, "deepan s" <deepans@virtusa.com> wrote:
>>
>>
>> Appreciate your quick response.
>>
>> Thanks Antoine, what you suggested worked.
>>
>> We have one more query,
>>
>> Is there a condition based routing mechanism?
>> Say, i have 3 services (taking same input parameter) to be routed in
>> order.
>> And the routing should break and return to the caller when some condition
>> gets satisfied (condition should be evaluated on the response of the
>> service
>> being called)
>>
>> We can achieve the same using exception based routing by throwing an
>> exception with-in each of the service when the condition is not satisfied
>> (so that the routing proceeds to the next service), but is there a more
>> elegant way of doing this without throwing an exception?
>>
>> Regards,
>> Deepan Subramani.
>>
>>
>> Regards,
>> Deepan Subramani
>>
>> antoine.borg wrote: > > Hello, > > The chaining router does not catch
>> exceptions that are thrown...
>> --
>> View this message in context:
>> http://www.nabble.com/exception-type-filter-with-chaining-router-tp24267008p24287951.html
>> Sent from the Mule - User mailing list archive at Nabble.com.
>>
>> --------------------------------------------------------------------- To
>> unsubscribe from this lis...
>>
>>
>>
>
>
--
Antoine Borg, Senior Consultant | Tel: +32 28 504 696
ricston Ltd., BP 2, 1180 Uccle, Brussels, BELGIUM
See our full schedule of Mule and Android courses:
http://www.ricston.com/courses/schedules/
email: _antoine.borg_@ricston.com <mailto:antoine.borg@ricston.com> |
blog: blog.ricston.com <http://blog.ricston.com> | web: ricston.com
<http://www.ricston.com/>
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
« Return to Thread: exception-type-filter with chaining-router
| Free embeddable forum powered by Nabble | Forum Help |