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.

Reply via email to