camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kamranzafar <xeus....@gmail.com>
Subject Re: endDoTry() problem
Date Mon, 11 Nov 2013 17:56:43 GMT
Thanks for replying, doTry is there in the route. The only reason I used
"endDoTry" is because I need to split the exchange body before persistence.
It won't let me use split without "endDoTry".

from("jpa:org.example.SystemProperty?consumeDelete=true&consumer.namedQuery=ControlProductLoadTrigger")
        .routeId(getClass().getSimpleName()).*doTry()*.process(new
Processor() {
    @Override
    public void process(Exchange exchange) throws Exception {
        List<Product> products = fetchProducts();
        exchange.getIn().setBody(products);
    }
}).*split(body())*.to("jpa:org.example.Product").endDoTry().doCatch(Throwable.class)
        .transform().simple("${exception.message}").log(LoggingLevel.ERROR,
"${body}").end(); 



--
View this message in context: http://camel.465427.n5.nabble.com/endDoTry-problem-tp5543541p5743054.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message