camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: endDoTry() problem
Date Mon, 11 Nov 2013 18:18:55 GMT
You need to end the split also.

On Mon, Nov 11, 2013 at 6:56 PM, kamranzafar <xeus.man@gmail.com> wrote:
> 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.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Mime
View raw message