September 03, 2010, 10:38:47 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  Home Help Media Affiliates Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: Background task to execute a database query  (Read 973 times)
0 Members and 1 Guest are viewing this topic.
JavaLearner
Member
*

Reputation: 0
Offline Offline
Posts: 34
Referrals: 0

Awards
« on: June 21, 2009, 10:07:01 AM »

Hello,

I have a html page where user can click on various links and each link displays some information in a small popup window. On click of each link I am running a database query which takes about 70 sec to return the results.

Since the query is taking a while to execute, User will not see the information instantly. I want to execute this query as a background task. If the user clicks on any other link when there is already a query executing then I need to cancel the exiting query process and execute a new.

I am not sure how to accomplish this task i.e running a background process and cancelling the existing one if a new request is initiated in the meantime when already another process is running.

Can any body please help. Also suggest if there is any other way to get this done.

Thanks in advance for any help,
Logged
Javaforums.net/forum :: A friendly community for software developers and students that want to learn Java!
« on: June 21, 2009, 10:07:01 AM »

 Logged
ashish
Member
*

Reputation: 0
Offline Offline
Posts: 27
Referrals: 0

Awards
« Reply #1 on: August 12, 2010, 01:42:24 AM »

why sir warning to me am new user now.please don't it. dance dance dance

I am not sure how to accomplish this task i.e running a background process and cancelling the existing one if a new request is initiated in the meantime when already another process is running.

regards,
phe9oxis,
« Last Edit: August 12, 2010, 02:22:21 AM by Arkie » Logged
Javaforums.net/forum :: A friendly community for software developers and students that want to learn Java!
   

Your Ad Here
 Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.10 | SMF © 2006-2009, Simple Machines LLC
TinyPortal v0.9.8 © Bloc
Valid XHTML 1.0! Valid CSS!
Page created in 0.202 seconds with 33 queries.

Google visited last this page August 27, 2010, 08:55:10 PM