-
1. Re: Nested conversation question
ci Oct 31, 2006 9:56 AM (in response to ci)And by the way, are concurrent nested conversations inside one parent conversation possible?
-
2. Re: Nested conversation question
gavin.king Oct 31, 2006 3:46 PM (in response to ci)This would be a bug in Seam's new concurrency stuff. thanks for discovering that. I'll fix it today.
http://jira.jboss.com/jira/browse/JBSEAM-454
Yes, concurrent nested conversations are supposed to be possible :) -
3. Re: Nested conversation question
gavin.king Oct 31, 2006 5:32 PM (in response to ci)This should now be fixed in CVS. Please test it out.
By the way, it depends what you mean by "concurrent". My fix enforces that a singe root conversation can have only one thread at a time. However, a single root conversation can still have many nested conversations (usually I call them "concurrent", but I don't mean thread-level concurrency). -
4. Re: Nested conversation question
ci Nov 3, 2006 9:29 AM (in response to ci)Sorry, it does not work either.
In Manager class there is an unlockConversation() method. After the nested conversation is destroyed, getCurrentConversationEntry() will return null, and its stack (which is obviously not empty) won't be unlocked.
I suppose something like that:public void unlockConversation() { ConversationEntry ce = getCurrentConversationEntry(); if (ce!=null) { ce.unlock(); } else { // current can be destroyed, but its stack can be not even unlocked for ( String conversationId: currentConversationIdStack ) { if (conversationId.equals(currentConversationId)) continue; // destroyed ConversationEntry cen = ConversationEntries.instance().getConversationEntry(conversationId); if (cen != null) { cen.unlock(); break; } } } }
It works :) After you did the whole stack to share one lock instance, the problem is nearly solved.
Btw, thank you for Seam :) -
5. Re: Nested conversation question
gavin.king Nov 3, 2006 11:47 AM (in response to ci)Yep, good work mate, I used:
public void unlockConversation() { ConversationEntry ce = getCurrentConversationEntry(); if (ce!=null) { ce.unlock(); } else if ( isNestedConversation() ) { ConversationEntries.instance().getConversationEntry( getParentConversationId() ).unlock(); } }
-
6. Re: Nested conversation question
ci Nov 7, 2006 5:33 AM (in response to ci)It seems to work! Great! Thanks Gavin :)