Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

TimerTask in Struts for handling Stored Procedures.

 
Thierry Collogne
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

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
Posts: 724
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Modify the record so it will not match the condition for stored procedure.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Duplicate of
http://www.coderanch.com/forums/

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.
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic