Announcement Announcement Module
No announcement yet.
Session Management Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Session Management


    I am creating a web application (using SWF) that requires management of user sessions. By this, I mean that a user will update their session while using the web application, and then the user may complete their "transaction", or the user may close their web browser and walk away. For the latter case, I need to know when their session expires so I can reclaim the resources they have reserved.

    If I were to do this using Servlets and javax.servlet.http.HttpSessions, I would create a SessionListener to tell me when a session expires.

    I tried to do this using a FlowExecutionListener, but the sessionEnded method was not called on servlet shutdown (and I'm guessing that it's not called when the session expires either).

    So how can I do this in SWF?

    I was also trying to find out how FlowExecutions are expired and when they are expired, but I couldn't find anything. Any ideas here?



  • #2
    I should probably mention that I'm using ContinuationFlowExecutionRepository as my flow execution repository.


    • #3
      Okay, so it looks like the ContinuationFlowExecutionRepository is using a javax.servlet.Session for storage. So the flow execution expires when the session expires.

      Is this correct? I figured this out by deleting my browser's cookie (used to track the session) and seeing a NoSuchFlowExecutionException.

      I still cannot find any documentation on this...

      But in all this, I don't mean to complain. I have really enjoyed working with SWF and you all are doing a great job.


      • #4
        I found documentation

        Sets a SharedMapFlowExecutionRepositoryFactory to manage flow execution repository implementations statefully in the ExternalContext.getSessionMap(), typically backed by the HTTP session.