You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by sanjai <sa...@sanjai.org> on 2011/04/08 06:37:23 UTC

onexception behavior change from 2.5 to 2.6

Hello all,

There seems to have been some change in the way onexception behaves from 2.5
to 2.6 an onwards.  I believe the behaviour in 2.5 was correct.  I have
onexception set up as follows (in spring):

		
			
			java.net.SocketTimeoutException
			java.net.SocketException

			

			
			
				true
			
			
			
		

I am basically attempting to call a web service.  If the web service is not
available, I retry several times.  If the web service is still not reachable
I give up and do some logging in handleFailedMessages.   If a retry is
successful, however, the handleFailedMessages should not be called and the
route should continue from where the exception originally occurred.  This is
how it worked in 2.5. This does not happen however in 2.6.  In 2.6 (and 2.7)
when retrying fails, handleFailedMessages is called and the route does not
continue.  The book Camel in Action states that 2.5 is the correct
behaviour.

Was a bug introduced in 2.6, or am I missing something?

Thanks for all your help.

--
View this message in context: http://camel.465427.n5.nabble.com/onexception-behavior-change-from-2-5-to-2-6-tp4290040p4290040.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: onexception behavior change from 2.5 to 2.6

Posted by sanjai <sa...@sanjai.org>.
A little more on this.  The behaviour is not quite as my original post
describes.  I have another onexception clause which picks up all other
exceptions as shown at the end of this post.   It turns out that when
redelivery fails from the previous on exception clause,  Camel thows a
CamelException which is handled by this cluase.  Again,this did not happen
in 2.5. The stack trace is as follows:

    at
org.apache.camel.processor.interceptor.HandleFaultInterceptor.handleFault(HandleFaultInterceptor.java:69)
    at
org.apache.camel.processor.interceptor.HandleFaultInterceptor$1.done(HandleFaultInterceptor.java:46)
    at
org.apache.camel.management.InstrumentationProcessor$1.done(InstrumentationProcessor.java:78)
    at
org.apache.camel.component.cxf.CxfClientCallback.handleResponse(CxfClientCallback.java:63)
    at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:776)
    at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:2335)
    at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream$1.run(HTTPConduit.java:2198)
    at
org.apache.cxf.workqueue.AutomaticWorkQueueImpl$2.run(AutomaticWorkQueueImpl.java:253)
    at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:619)


 
        
            
            java.lang.Exception

            
            

            
            
                false
            
            
            
        


--
View this message in context: http://camel.465427.n5.nabble.com/onexception-behavior-change-from-2-5-to-2-6-tp4290040p4290054.html
Sent from the Camel - Users mailing list archive at Nabble.com.