One workaround is to put the long running operation in its own thread (carefully) and have the thread update a "status" object which lives in a session. (Or static singleton if your feeling lucky/brave).
Then the browser displays the contents of the "status" object and has a META refresh every {insert here} seconds. If the long running process did its thing, your can then display the alternate results/download file/whatever.
-Tim
Elankath, Tarun (Cognizant) wrote:
Hi list,
We have a long running process (all in java, not external) that is initiated from struts action class, (does a lot of file I/O, etc)
The browser apparently timesout after about 20 minutes or whereabouts, and then suddenly the process do stops bang in the middle as soon as this happens. This is quite puzzling as one expects the process to continue even if the browser timed out.
I do know the correct solution is to make it run in the background and give constant updates to the user, however, we just need to make it work ASAP with the correct approach. We'll migrate to the background process & progress page approach soon enough.
Any pointers/comments on browser (Internet Explorer), server (Tomcat) settings and Struts settings to handle long-running activities in the web-request cycle would be greatly appreciated. I did scout the web, but apart from the connectionTimeout setting in the <connector> element of tomcat, I didn't find anything much. I don't think increasing session-timeout would be of any help here.
Any pointers on how to avoid the 'freeze' would also be much appreciated.
Thank you, Tarun
------------------------------------------------------------------------
This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information.
If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. Any unauthorised review, use, disclosure, dissemination, forwarding, printing or copying of this email or any action taken in reliance on this e-mail is strictly prohibited and may be unlawful.
Visit us at http://www.cognizant.com
------------------------------------------------------------------------
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
