Hi,

if I place .onException-part below .id() and .transacted() I got the same
problem. But if I place the .onException-part between .id() and
.transacted() it work's fine! The exception is handled and the id is set!

So, setting the route-id work's for route-specific onException (in same
cases). But setting the route-id in a global onException (defined in the
RouteBuilder) does not work ...

... DRy



DulmerLucsly wrote:
> 
> I created a JIRA for the id problem
> 
> https://issues.apache.org/activemq/browse/CAMEL-2109
> 
> What still bothers me is the last sentence. When I rebuild the route and
> move .id() and .transacted() before onException
> 
> public void configure() {
> 
> from("jms:fileIn?transacted=true")
>  .id("fileMapping")
>  .transacted()
>   .onException(UnmarshalException.class)
>     .handled(true)
>     .bean(FileProcessExceptionBean.class,"handleException")
>     .end()
>  .process(new FileProcessor())
>  .to("jms:fileOut");
> 
> } 
> 
> then ALL messages are routed through onException.
> 

-- 
View this message in context: 
http://www.nabble.com/RouteBuilder%3A-Problems-with-onException-and-id-tp26024958p26109780.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to