Hi Its not that unclear iBatis is for interacting with a database and in your from it will execute a SELECT query and return the response from the database, regardless if there are 0 or N number of rows.
So a response with 0 rows is just as legal as a response with N rows, i.e. the query as executed successful. If you do not want to process it further you can use the Filter EIP to filter out responses with 0 rows. http://camel.apache.org/message-filter.html However we could add some new option to the iBatis component to allow it to cater for this so it wont route if there are 0 rows returned in a SELECT query. Please feel free to add a JIRA ticket for this http://camel.apache.org/support.html ( there is a link to issue tracker ) On Tue, Apr 14, 2009 at 8:30 PM, javadevel <[email protected]> wrote: > > Here is my route > > from(“ibatis:selectunprocessedtrades”) > .process(processtrades) > .to(“ibatis:updateTrade”); > > What I would expect is that the camel route will be executed when the > selectunprocessedtrades fetches rows of unprocessed trades, however, the > route gets executed regardless of the result. This behavior, in my > observation, is inconsistent with the rest of camel components. For example > if we are polling a file > from(“file:c:/work/”).to(“jms:processqueue) > the route will only be executed when there is a file in the c:/work > directory. > > Please advise. > > -- > View this message in context: > http://www.nabble.com/IBatis-component-inconsistency-tp23045297p23045297.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
