1 Reply Latest reply on Oct 20, 2010 12:51 PM by Hui Onn Tan

    Foreground vs. Background Conversations

    Hui Onn Tan Newbie

      I explain my use case first.

      My page has 2 frame, top frame and main frame.
      Top frame displays selected customer information.
      Main frame is the main application.

      I set the session time out to 30mins so that the resource can be released.
      As long as the page is open, I also want to keep the session alive. So there is a periodically (10 minutes interval) a4j poll in top frame.
      The conversation time out is 10 minutes.

      I have read http://solutionsfit.com/blog/2007/12/13/explaining-the-conversation-timeout-setting-through-example/ about foreground conversation and background conversation.

      Now, my question is:

      Top frame and Main frame will have 2 conversation. If the page is idle for more than 10 minutes, the a4j poll request (in Top frame) will trigger the destroy of the conversation in Main frame (background conversation). Am I right?

      I want to allow user to continue their job even after 10 mins of idle time. So, if I want to maintain the Main frame conversation instead of Top frame conversation (Top frame component is session scoped, so I suppose the view can be re-rendered even the conversation has time out), what should I do?

      ...or if this kind of weird use case is not supported, what are the possible workaround?

      One way I can think of is to send normal AJAX request (instead of JSF A4J poll) in Top frame, so it won't affect the conversation lifecycle.