See this FAQ about the endChoice https://camel.apache.org/why-can-i-not-use-when-or-otherwise-in-a-java-camel-route.html
On Mon, Jun 3, 2013 at 4:05 PM, Hilde <hilde.sch...@yahoo.de> wrote: > Hello Everybody, > > How can I model a nested content based router via the java dsl? > The following trial was not successful: > > .choice() > .when(header(CxfConstants.OPERATION_NAME).isEqualTo("importOrder")) > .beanRef("logOrderConverter") > .to("jpa:com.company.production.entities.OrderMerging") > .choice() > .when(method(routeCheck, "checkSnapshot")) //content based > router > .to("activemq:queue:" + JmsDestinations.QUEUE_ORDER_INPUT > + > "?disableReplyTo=true") > .to("direct:endRoute") > .otherwise() > .process(new OrderConverter()) > .to("activemq:queue:" + JmsDestinations.QUEUE_DI_JOB + > "?disableReplyTo=true") > .to("direct:endRoute") > .endChoice() > > .when(header(CxfConstants.OPERATION_NAME).isEqualTo("deleteBrandData")) > .beanRef("convertWSBeanToOrderMergingEntityBean") > .to("jpa:com.copany.production.entities.OrderMerging") > .process(new OutMessageProcessor()) > .endChoice(); > > Actually I don't know the differences between end() vs. endChoice(). > > Do you have any idea? > > Thanks in advanced! > > Cheers > Hilde > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/How-to-build-a-nested-content-based-router-tp5733708.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- www.camelone.org: The open source integration conference. Red Hat, Inc. FuseSource is now part of Red Hat Email: cib...@redhat.com Web: http://fusesource.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen