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

                 Key: ORCHESTRA-51
                 URL: https://issues.apache.org/jira/browse/ORCHESTRA-51
             Project: MyFaces Orchestra
          Issue Type: Improvement
          Components: Conversation
    Affects Versions: 1.4
            Reporter: Jose Luis Freire


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.getCurrentConversationContext()  always 
creates a new conversation context 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.getCurrentConversationContext(boolean 
createNew) that only creates a new conversation context if required. 
ConversationManager.getCurrentConversationContext() should call 
ConversationManager.getCurrentConversationContext(true);
2) Make ConversationManager.findConversationContextId()  public so we could use 
ConversationManager.getConversationContext(Long conversationContextId).



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to