wood burning stoves
The moose likes JDBC and Relational Databases and the fly likes TimerTask in Struts for handling Stored Procedures. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "TimerTask in Struts for handling Stored Procedures." Watch "TimerTask in Struts for handling Stored Procedures." New topic

TimerTask in Struts for handling Stored Procedures.

Thierry Collogne

Joined: Oct 19, 2005
Posts: 16

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?
David Ulicny
Ranch Hand

Joined: Aug 04, 2004
Posts: 724
Modify the record so it will not match the condition for stored procedure.

SCJP<br />SCWCD <br />ICSD(286)<br />MCP 70-216
Ben Souther

Joined: Dec 11, 2004
Posts: 13410

Duplicate of

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.

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Mark Spritzler

Joined: Feb 05, 2001
Posts: 17276

OK, so I deleted the one in Struts. The one in JSP is now closed. I re-opened this one in Servlets, so I could move it to a more appropriate forum.

This question is really a database question, so I am going to move this to JDBC.


Perfect World Programming, LLC - iOS Apps
How to Ask Questions the Smart Way FAQ
I agree. Here's the link: http://aspose.com/file-tools
subject: TimerTask in Struts for handling Stored Procedures.
It's not a secret anymore!