File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC 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
JavaRanch » Java Forums » Databases » JDBC
Bookmark "TimerTask in Struts for handling Stored Procedures." Watch "TimerTask in Struts for handling Stored Procedures." New topic
Author

TimerTask in Struts for handling Stored Procedures.

Thierry Collogne
Greenhorn

Joined: Oct 19, 2005
Posts: 16
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

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
Sheriff

Joined: Dec 11, 2004
Posts: 13410

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.


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

Joined: Feb 05, 2001
Posts: 17249
    
    6

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


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
 
jQuery in Action, 2nd edition
 
subject: TimerTask in Struts for handling Stored Procedures.
 
Similar Threads
Advice needed for design problem involving chronological jobs...
TimerTask in Struts for handling Stored Procedures.
Key comparison
Evaluating 2 expressions in JSF using JSTL if tag
Stored procedure call removes spaces in text