3
votes

I am new to the Spring integration. Previously I developed an application using Weblogic Integration where I poll a database table for any new rows. If there is one, I obtain that data, modify it and send it to a different database. I have seen several examples on Spring integration where it integrates web pages, emails etc. I want to set up a poll for a table and get the message to the gateway from where I can handle it. Any help or advice is appreciated.

2

2 Answers

1
votes

This example is the basic Db poller..

<int-jdbc:inbound-channel-adapter query="select * from item where status=2"
    channel="target" data-source="dataSource"
    update="update item set status=10 where id in (:id)" />

For channel 'target', you can put your service-activator to handle message.. You may also need a row-mapper..

Tell me more about your problem if you need more advice.,

0
votes

See the inbound-channel-adapter in the reference documentation and/or the jdbc sample.

The sample doesn't show the use of the adapter, but it might help you with a general understanding of Spring Integration. Another useful resource is the test cases... integration tests and polling* parser tests.