Thread/Polling Solution

I want to poll a particular coloumn of a table for any changes contuniously in regular interval of time thru out.

How to do this.

Can i use the thread to poll.

How to get the return out of a thread and invoke another bean

The table is a Database table where in it consists of 4 or 5 coloumns with the 1st col as the primary key.

Say the fourth col is for writing the status of a transaction on a periodic time.

So when the changes occur, accorindingly i have to invoke the respective beans(EJB's).

[549 byte] By [jsjsjothi] at [2007-9-26 1:46:34]
# 1

Sure, you could just have the run() method of your thread make the jdbc call to see if the data has changed. But this seems like a pretty awkward approach. You might want to check with your database vendor's docs to see if they have some alternative. For instance, with Oracle, I believe there is a way you can use a database trigger combined with some external code to get this same result.

swatdba at 2007-6-29 2:44:32 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...