camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alex <alex.koe...@gmx.de>
Subject Re: Reroute from onException Handler Processor
Date Thu, 16 Jan 2014 16:45:25 GMT
It works when I config an interceptor and set a header value in
"onException-handler":


	  interceptFrom()
	    .when(header("somethingFailed").isEqualTo(Boolean.TRUE))
	    .process(new Processor() {

			@Override
			public void process(Exchange exchange) throws Exception {
				LOG.debug("Failed: " + exchange.getExchangeId());
				
			}
	    	
	    })
	    .to("direct:failed");


// Exception handling
        	.onException(Throwable.class)
        	.continued(true)
        	.process(new Processor() {
	        		@Override
					public void process(Exchange exchange) throws Exception {
						exchange.getOut().setHeader("splitFailed", Boolean.TRUE);						
					}
	        	})	        				
			.end()  
			// - Exception handling
                       .to("direct:originalRoute")




--
View this message in context: http://camel.465427.n5.nabble.com/Reroute-from-onException-Handler-Processor-tp5746043p5746084.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message