dbservice polling

Posted by chriselst on 13-Jan-2011 06:09

I have two systems that are supplying data to me, they are putting it in interface tables, I will then set up a dbservice to poll and retrieve the data.

However, I also need to do some tidying up as the systems supplying the data will only ever write into the tables.

One of them requires me to delete each record that I read.  The other to set a flag after reading.

Is it possible to do either of these things in the one .esbdb?

If not another solution I can think of would be to perform the select, publish the results, then use that result set in a seperate process to perform the delete / updates.

Or are there any other / better solutions?

Any help, advice or redirection gratefully received.

All Replies

Posted by sk185050 on 13-Jan-2011 07:21

I am not sure, how you can manage the concurrency when using the separate process.

If you can try, try the procedure and if DB is oracle it provide the oracle AQ that I think you can leverage that.

Posted by tgrijpma on 20-Jan-2011 08:23

Hi Chris,

What you want is not possible in one esbdb file. What you can do is:

- DB service for polling the DB, put the result on a queue

- ESB process that will process the message

- First step of the ESB process dbservice doing an update on the database (delete record or set a flag).

Other option is to use a standalone adapter which poll the database, in the same transaction set the flag and put the result as xml on a queue.

Posted by tsteinbo on 21-Jan-2011 03:13

This sounds like business logic to me that needs encapsulating. In such a case I would actually suggest the use of stored procedures.

My 2 cents

Thomas

This thread is closed