Skip to content

Commit

Permalink
[WELD-865]; check conversation lock
Browse files Browse the repository at this point in the history
  • Loading branch information
alesj committed Mar 8, 2011
1 parent d724daf commit b11cc2a
Showing 1 changed file with 10 additions and 4 deletions.
Expand Up @@ -292,10 +292,16 @@ public void activate(String cid)
else
{
setRequestAttribute(getRequest(), CURRENT_CONVERSATION_ATTRIBUTE_NAME, getConversation(cid));
getCurrentConversation().lock(getConcurrentAccessTimeout());
NamingScheme namingScheme = new ConversationNamingScheme(ConversationContext.class.getName(), cid);
setBeanStore(createRequestBeanStore(namingScheme, getRequest()));
getBeanStore().attach();
if (getCurrentConversation().lock(getConcurrentAccessTimeout()))
{
NamingScheme namingScheme = new ConversationNamingScheme(ConversationContext.class.getName(), cid);
setBeanStore(createRequestBeanStore(namingScheme, getRequest()));
getBeanStore().attach();
}
else
{
throw new IllegalStateException("Conversation lock timed out: " + cid);
}
}

}
Expand Down

0 comments on commit b11cc2a

Please sign in to comment.