Hi

You should have the exception(java.net.ConnectException.class) and the DLC 
before the 
to("("jbi:service:http://servicemix.in2m.com/samples/http/MyProviderService?mep=in-out";).
 It must be registered within the route before the failure happends.


so you need something like this:
  from(xxx)
  exception(NoConnection)
  to(yyy)

And *not*:
  from(xxx)
  to(yyy)
  exception(NoConnection)


Med venlig hilsen
 
Claus Ibsen
......................................
Silverbullet
Skovsgårdsvænget 21
8362 Hørning
Tlf. +45 2962 7576
Web: www.silverbullet.dk

-----Original Message-----
From: pratibhaG [mailto:[EMAIL PROTECTED] 
Sent: 11. juli 2008 07:47
To: [email protected]
Subject: How to invoke local error handler?


I tried configuration like this:
exception(java.lang.Throwable.class)
    
.to("jbi:service:http://servicemix.in2m.com/samples/http/bean3Service?mep=in-out";)
    
.to("jbi:service:http://servicemix.in2m.com/samples/http/bean2Service?mep=in-out";);

    
from("jbi:service:http://servicemix.in2m.com/samples/http/httpConsumer";)
        .to("validator:updatepassword.xsd")  
           
.to("jbi:service:http://servicemix.in2m.com/samples/http/jmsProviderService?mep=in-only";)
           
.to("jbi:service:http://servicemix.in2m.com/samples/http/bean2Service";);
        
        from("jbi:service:http://servicemix.in2m.com/samples/http/jmsConsumer";)
        .errorHandler(
                
deadLetterChannel("jbi:service:http://servicemix.in2m.com/samples/http/bean8Service?mep=in-out";)
                        .maximumRedeliveries(2)
                        .initialRedeliveryDelay(15000)
                        .useExponentialBackOff()
                        .backOffMultiplier(2.0))
       
.to("jbi:service:http://servicemix.in2m.com/samples/http/MyProviderService?mep=in-out";)
        .exception(java.net.ConnectException.class)
    
.maximumRedeliveries(2).useExponentialBackOff().initialRedeliveryDelay(30000).backOffMultiplier(2.0)
    
.to("jbi:service:http://servicemix.in2m.com/samples/http/bean1Service?mep=in-out";);

I want that when my
"http://servicemix.in2m.com/samples/http/MyProviderService"; throws
connectionexception it should be sent to
"http://servicemix.in2m.com/samples/http/bean1Service";. But it sending it to
"http://servicemix.in2m.com/samples/http/bean3Service";. 

why it first goes to global handler even when it has local error handler? Am
I wrong somewhere? How can I explicitly say that use local error handler
first?

-pratibha
-- 
View this message in context: 
http://www.nabble.com/How-to-invoke-local-error-handler--tp18397172s22882p18397172.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to