• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

TimerTask in Struts for handling Stored Procedures.

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Ranch Hand
Posts: 724
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Modify the record so it will not match the condition for stored procedure.
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Duplicate of
https://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.
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
If you're gonna buy things, buy this thing and I get a fat kickback:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic