What I forgot to mention is how conversations are started in the first place. I have an
"Actions" dropdown box in the view, which triggers an actionMenuSelectionChanged
handler:
<h:selectOneMenu value="#{navigation.actionMenuSelection}"
| class="navlist" >
| <f:selectItems value="#{navigation.actionMenu}" />
| <a:support event="onchange"
| actionListener="#{navigation.actionMenuSelectionChanged}"
| ajaxSingle="true"
| reRender="navlists" />
| </h:selectOneMenu>
The actionMenuSelectionChanged method looks like this:
public void actionMenuSelectionChanged() {
| if (ActionMenuItems.NEW_CONVERSATION.toString().equals(actionMenuSelection)) {
| Conversation.instance().leave();
| Manager.instance().beginConversation("navigator");
| Manager.instance().redirect(Views.COMPUTATION.toString());
| }
| }
In the meantime, I found a deterministic way to reproduce the problem:
| * Start a new conversation (through the NEW_CONVERSATION entry in the action list)
| * Start another conversation in the same way
| * Hit F5 (generate a GET request)
| * Try to switch from the current (second) conversation to the first one
| * -> ce.lock() in Manager.switchConversation times out
|
I have stepped through Seam's JSF phase handling and conversation management, but
didn't fully understand what happens.
However, after adding the cid and clr parameters to the AJAX request the problem seems to
be gone:
<a:support event="onchange"
| onsubmit="showLoading('NavForm:conversations')"
| oncomplete="hideLoading();"
| actionListener="#{switcher.select}">
| <a:actionparam name="cid" value="#{conversation.id}" />
| <a:actionparam name="clr" value="true" />
| </a:support>
Can anyone confirm that this is a plausible solution?
Karl
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4120375#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...