Sep 25th, 2008, 04:56 AM
Prevent session timeout for long-running background tasks
I'm looking for some inspiration in how to increase HTTP session timeout constantly if a background task is still running.
The background task is started by a web client and his state should be available to the web client while the task is running. It might be the case that the user is doing nothing until the session invalidates. Therefore the session timeout should be increased by the system.
I'm looking for some kind of spring abstraction and don't want to set the session timeout from inside the task by doing something like httpSession.accessed().
Has anybody an idea how I could solve that better?
Thanks in advance!
Last edited by jfk; Sep 25th, 2008 at 08:02 AM.
Sep 25th, 2008, 08:42 AM
Sep 25th, 2008, 09:09 AM
Thanks for your reply! The problem with this approach is, that the page with the ajax calls should stay open. In the application we develop, the user might do some other work and might then come back to the status page of the long-running process. Or he might navigate to another place in the web application and does nothing at all.
Originally Posted by TerpInMD
We don't want the client to do some phantom requests, we want some kind of listener or something that checks whether any processes are still running and that keeps the session active no matter how the session timeout is configured.
Sep 25th, 2008, 12:51 PM
whats wrong with having the long running process keep the session active?
Tags for this Thread