Announcement Announcement Module
Collapse
No announcement yet.
Prevent session timeout for long-running background tasks Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Prevent session timeout for long-running background tasks

    Hi all,

    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, 08:02 AM.

  • #2
    I cant think of a better place to use ajax. You can have an ajax call executed every X minutes via javascript callback that you register when the page loads.

    Comment


    • #3
      Originally posted by TerpInMD View Post
      I cant think of a better place to use ajax. You can have an ajax call executed every X minutes via javascript callback that you register when the page loads.
      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.

      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.

      Comment


      • #4
        whats wrong with having the long running process keep the session active?

        Comment

        Working...
        X