Uploaded image for project: 'MyFaces Orchestra'
  1. MyFaces Orchestra
  2. ORCHESTRA-51

There is no way to know if our conversation context id is invalid.

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.4
    • None
    • Conversation
    • None

    Description

      The goal here is to detect that the conversation is invalid (by expiration/back button/whatever) and gracefully handle the event. Either by filter or by a phaselistener.

      The problem is that ConversationManager.getCurrentConversationContextId() always creates a new conversation context id (by calling getOrCreateConversationContextId()) if the conversation context id is invalid, so we can't use it.

      We could call ConversationManager.getConversationContext(Long conversationContextId) to check for null, but since ConversationManager.findConversationContextId() is private, we can't call it.

      So I propose two alternatives:
      1) Create a new ConversationManager.getCurrentConversationContextId(boolean createNew) that only creates a new conversation context if required. ConversationManager.getCurrentConversationContexIdt() should call ConversationManager.getCurrentConversationContextId(true);
      2) Make ConversationManager.findConversationContextId() public so we could use ConversationManager.getConversationContext(Long conversationContextId).

      Attachments

        Activity

          People

            Unassigned Unassigned
            jfreire Jose Luis Freire
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: