Take a look at the Quartz timer. If your are using Spring it is easy to use and configure.


From: "Ashish Kulkarni" <[EMAIL PROTECTED]> [mailto:"Ashish Kulkarni" <[EMAIL PROTECTED]>]
Sent: Friday, June 01, 2007 12:30 PM
To: [email protected]
Subject: checking for Database changes

Hi
I have a requirement where i have to constantly monitor a database for changes, for example if thers is an row added, or row changed the java program will process those records.
is there any good way of doing it, currently i am thinking of writing a TimerTask which will sleep for 5-10 seconds to read the database.
I have a flag in database which is updated when it is processed, so i need to monitor for all the rows where this flag is not updated.

any ideas?

Ashish

Reply via email to