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

  • Ending conversations

    Hi to all,

    When not using the application for some time, the conversation ends, and clicking a link results in an exception. How can this be bypassed?
    Thanks in advance.

  • #2
    Hi,

    afaik the ending of an conversation happens, when the underlying HTTP Session on the ServletContainer expires due to a Session Timeout. To avoid this you have to increase the default session timeout in your servlet container for the particular web application.

    Regards
    lyserg

    Comment


    • #3
      The other option is to implement a custom ConversationManager. Take a look at this thread:
      http://forum.springframework.org/showthread.php?t=35094

      Erwin

      Comment


      • #4
        Originally posted by Lyserg View Post
        when the underlying HTTP Session on the ServletContainer expires due to a Session Timeout. To avoid this you have to increase the default session timeout in your servlet container for the particular web application.
        All true. Since the default ConversationManager is the SessionBindingConversationManager, the whole SWF Conversation resides in the HttpSession. As Erwin stated, writing your own ConversationManager to store conversations elsewhere is the approach I've used to in our app. I wrote a custom Conversation class that hooks into a DB using the unlock method to do updates and a ConversationManager to read the conversations from the DB. Seems to work pretty well.

        Comment


        • #5
          Thanks a lot I'll look at the given solutions in detail tomorrow, and see what suits my needs best.
          One other thing, how can I provide a page that hides the exception when ending conversation exception occures?

          Thanks already.

          Comment


          • #6
            One other thing, how can I provide a page that hides the exception when ending conversation exception occures?
            You'll have to handle this exception in your hosting MVC framework (e.g. Spring MVC or JSF) or at the level of the Servlet API (with an exception page in web.xml).

            Erwin

            Comment


            • #7
              Use SpringWebFlowExceptionResolver to start a new flow after a conversation ends

              Originally posted by YNight View Post
              Hi to all,

              When not using the application for some time, the conversation ends, and clicking a link results in an exception. How can this be bypassed?
              Thanks in advance.
              It really depends on what you mean by bypassed.
              1. If you want the same conversation to continue longer or indefinitely, then you should follow the advice that's already been posted in this thread regarding custom ConversationManagers, etc.
              2. If you want to handle the exception by displaying an error page, you can do as Erwin suggested; however, there is one other alternative...
              3. If you would prefer to restart a new flow after expired conversations (and to handle other SWF exceptions) and are using a FlowController, you can use the SpringWebFlowExceptionResolver.
              For more details on the SpringWebFlowExceptionResolver, check out the forum here:

              http://forum.springframework.org/sho...t=27239&page=2

              and the JIRA issue (where you'll find the latest code) here:

              http://opensource.atlassian.com/proj...browse/SWF-158

              cheers,

              Sam

              Comment

              Working...
              X