Keep http request or session alive in servlet application
Joined: Mar 01, 2007
I am working one Servlet and Velocity(UI) based application. we have set the session max interval time as 15 minutes in my application that means if we keep our application keep idle for more than 15 min, we will get session time out or expired message in between.Here we cannot increase session max interval time not more than 15 min due to some restrictions from server(websphere) administration team.
in one scenario of our application, one request taking more than 20 min(due to some SQL query taking 20 min in returning huge result data).thus we are in panic situation in waiting for response up to 20 min and in between we are getting session time-out message. Here we cannot fine tune sql query to reduce the sql response.
In this case, i want http request to be keep running until response finishes and display data in browser or i want keep http session alive in server side during this request/response hence page cannot be expired while before response comes and display result data in browser
Please let us know how can i implement or keep http session alive or how can avoid the session keeping idle during this particular request/response.
It would be appreciated if anybody help me in this scenario..
You shouldn't have such a long response time holding up the browser. Rather, return to the browser right away after firing off a thread that performs the long operation in the background. Have a way for the user to check on the progress of the operation and see the results once it completes.
I am not holding up the browser, rather server response taking more than 20 min, hence getting timed out error message.how can I return to browser immediately after firing off thread/Business Logic which performs log operation and how can i check progress of the operation.