Hi,

this use case probably leads to odd behaviour of conversation:

1) in first JSF request/response, in invoke application, I start long
running conversation with conversation.begin()

2) WebBeansPhaseListener.afterPhase(PhaseEvent) does some operation with
conversation object, but does not it **release** from ThreadLocal

3) then I create a GET request to other view in the same application but
without any operation with conversation,
WebBeansPhaseListener.afterPhase calls
ContextFactory.destroyConversationContext(); and destroys same instance
of ConversationContext because it is still in ThreadLocal!


I think WebBeansPhaseListener.afterPhase should contains something like
this:

else
{
 //Conversation must be used by one thread at a time
 ConversationImpl owbConversation = (ConversationImpl)conversation;
owbConversation.updateTimeOut();
//Other threads can now access propogated conversation.
owbConversation.setInUsed(false);                

ContextFactory.releaseButNOTDestroyConversationContext();

}            


What do you think?


Regards,

Martin Kočí




Reply via email to