|
 |
pro_jsp thread: Browser Time out
Message #1 by "Mayank Rastogi" <mayank.rastogi@p...> on Thu, 9 Jan 2003 18:26:10 +0530
|
|
first of all a messaging server shloud be used , there are several available
on the market.(IBM MQseries to bea tuxedo ) I believe there are some
Opensource too. then from your servlet you can fire a message to the server
that forwards(based ons queue/schedule and other itesm) it to another
application that actually does the job. ofcourse this is a overhead on the
project time/budget.
you may also think of a another soultion like saving the request in file
system folder in any format (xml for example) . while another scheduled
application runs on that folder periodically
note all solutions are based on the assumption that the database queries are
optimized which I think should be given a second thought. for example you
might find a way to break the process into number of short-timed steps
-----Original Message-----
From: Mayank Rastogi [mailto:mayank.rastogi@p...]
Sent: 09 January 2003 13:47
To: Pro_JavaServer_Pages
Subject: [pro_jsp] RE: Browser Time out
kareem,
Thanks for your inputs. Suppose, I ignore the failure error part cud
u
provide/guide me to a resource which could explain how JMS can be helpful.
Regards,
Mayank
-----Original Message-----
From: ElSayed, Kareem N [mailto:kareem.elsayed@e...]
Sent: Thursday, January 09, 2003 6:20 PM
To: Pro_JavaServer_Pages
Subject: [pro_jsp] RE: Browser Time out
if the failure/error message was not there I would have recommended using
JMS, so your client application should only initiate the process. also you
may notifiy a standalone server application to do the job.I think you masy
still be able to do so by forwarding your application to a self refrshing
jsp , the jsp auto refreshs every n seconds (5 seconds for example) and
get the status of the prcoess by either:
contact the standalone JMS(or server application)
or 2- check on a flag on the database that indicates the completion
of the process
another solution is to send a bit of information to the client on time
intervals during the process.tghis information may display "please wait"
for example
regards
Kareem
-----Original Message-----
From: Mayank Rastogi [mailto:mayank.rastogi@p...]
Sent: 09 January 2003 12:56
To: Pro_JavaServer_Pages
Subject: [pro_jsp] Browser Time out
Hello,
I have a servlet which has to execute a lot of database queries. The
queries are executed in a loop, and can take a lot of time for the entire
process to finish. After all the queries are executed, a page displays
success or failure/error in the process. As such I do not have any data to
show to the user w.r.t the process.
The time taken by the server could result in the browser timing out
the
connection. Assuming that the queries are optimized, what are the possible
ways of preventing the browser from timing out the request while the server
is processing the request.
I am using iPlanet Application Server 6.0 (SUN ONE Server) and
beleive that
Threads cannot be used as per J2EE standards.
Thanks in advance,
Mayank
_______________________________________________
Mayank Rastogi
Software Engineer
Patni Computer Systems Limited
|
|
 |