database - Update query after the selected records from a Select Query -
i have select rows table, send result queue , same records 'sent' in db. how trying not sure how pass column value where clause of update query each record of select query.
<route> <from uri="timer://kickoff?period=10000"/> <setbody> <constant>select top 10 * tablename</constant> </setbody> <to uri="jdbc:test"/> <multicast> <to uri="activemq:queue:testqueue"/> <setbody> <constant>update tablename set status='sent' primarykey= ${primarykey}</constant> </setbody> <to uri="jdbc:test"/> </multicast> </route> will route run 10 records?
if not possible jdbc/sql component how achieve hibernate component?
when run query using camel jdbc, arraylist of hashmaps. see camel documentation here:
http://camel.apache.org/jdbc.html
"the result returned in out body arraylist>. list object contains list of rows , map objects contain each row string key column name."
you need setup spring bean process body. can extract primary key arraylist in spring bean , set header. there can use splitter process rows:
Comments
Post a Comment