You need to end the split also.

On Mon, Nov 11, 2013 at 6:56 PM, kamranzafar <[email protected]> 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: [email protected]
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Reply via email to