I am developing a web application. In the application I have developed a timertask that is responsible for checking a table every 2 minutes. If a record in the table matches a condition, a SQL Stored procedure is called for that record.
So far no problem. The problem comes in the fact that multiple records can match the condition and the Stored Procedure takes some time to complete. So for each matching record the procedure will be run.
So when 2 minutes have passed and the timertask again checks the database, it is possible that more and more records match the condition.
How can I make sure that the stored procedure is run for every record?
Thierry, Please do not cross-post your questions in multiple forums. This is considered rude as it wastes the time of the people who are trying to help you. This question was asked in the struts and JSP forums as well as this one.