On Tue, Dec 16, 2008 at 3:16 PM, Fush <rikard.erik...@gmail.com> wrote: > > Only if the result from beanTwo is false, should the message be routed on to > beanOne. If beanTwo returns true, no further action is to be taken, and the > route ends there. Would you recommend some other way of configuring such a > route? Yeah its more like the filter EIP and maybe this one works ;) http://activemq.apache.org/camel/message-filter.html
Any messages which the filter predicate returns false will be dropped. > > > Claus Ibsen-2 wrote: >> >> Hi >> >> I was curious why your choice route does not continue to some other >> destination if the when is true. >> If beanTwo returns true then the exchange should be routed to ... void???? >> And when beanTwo returns false the exchange is routed to the otherwise >> block. >> >> But nevertheless the exception should be caught by onException. >> >> Remember to document on the JIRA which version of Camel you are using. >> >> >> <choice> >> <when> >> <methodCall bean="beanTwo" >> method="methodFromBeanTwo"/> >> </when> >> <otherwise> >> <to >> uri="bean:beanOne?methodName=methodFromBeanOne" /> >> </otherwise> >> </choice> >> > > -- > View this message in context: > http://www.nabble.com/Will-onException-handle-exceptions-thrown-from-%27when%27-clause--tp21033017s22882p21033855.html > Sent from the Camel - Users mailing list archive at Nabble.com. > > -- /Claus Ibsen Apache Camel Committer Blog: http://davsclaus.blogspot.com/