Ibatis and polling database
I would like to use IBatis for polling 3 legacy databases for new rows an开发者_运维问答d insert into a new database. But our customers don't allow me to insert one "status" column in three legacy databases which help me avoid consuming twice or more. So what do I have to do? Thanks in advance!
Create a new table with the status column and add a foreign key pointing to the primary key of the legacy table. Create a view with both tables joined together and you will have your status column associated with the legacy table without altering it.
You can use the idempotent consumer EIP to filter out duplicates http://camel.apache.org/idempotent-consumer.html
But as Joachim said, you need a new table to store the status.
You can maybe also create a SQL VIEW on the original table + status table, and let iBatis query that view.
精彩评论