Hi Joe On Thu, Apr 16, 2009 at 3:37 PM, Joe Fernandez <[email protected]> wrote: > > Re the subject web page and this block of sample code found at the top of the > page. > > from("jms:queue:order") > .choice() > .when().header("type").isEqualTo("widget").to("bean:widgetOrder") > .when().header("type").isEqualTo("wombat").to("bean:wombatOrder") > .otherwise() > .to("bean:miscOrder") > .end(); > > Is the proper syntax being used for the 'when' predicates? Shouldn't it be > like this? > > .when(header("type").isEqualTo("widget")).to("bean:widgetOrder") > .when(header("type").isEqualTo("wombat")).to("bean:wombatOrder") Yeah as you write you need to do the predicate as a parameter to the when DSL as you do a nested method call on the predicate.
I will fix it asap. > > Thanks, > Joe > -- > View this message in context: > http://www.nabble.com/camel.apache.org-predicate.html-tp23078145p23078145.html > Sent from the Camel - Users (activemq) mailing list archive at Nabble.com. > > -- Claus Ibsen Apache Camel Committer Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus Apache Camel Reference Card: http://refcardz.dzone.com/refcardz/enterprise-integration
