1 Reply Latest reply on Apr 4, 2008 2:59 PM by damianharvey.damianharvey.gmail.com

    Seam Conversation Error with rich:suggestionbox

    cremersstijn

      I'm using richfaces in combination with Seam.


      But this combination gives me some problem when i use a rich:suggestionbox component.


      Sometimes (realy sometimes, it happens very often, but it happens...) i get the following error:



      The conversation ended, timed out or was processing another request

      This is my code for the suggestionbox:



      <rich:suggestionbox id="clubBoxBD" for="clubBD"
                    suggestionAction="#{searchAction.searchClubAutocompletion}" 
                                  var="result"
                                 nothingLabel="#{msg.KVV101_noClubsFound}" 
                                 fetchValue="#{result.clubName}"
                                  ignoreDupResponses="true"
                                  eventsQueue="kvvQueue"
                                  requestDelay="500">
                                  
                                  <h:column>
                                                      <h:outputText  value="#{result.clubNr}" />             
                                              </h:column>
                                              <h:column>                  
                                                      <h:outputText  value="#{result.clubName}" />             
                                              </h:column>
                                              
                                              <a4j:support event="onselect">
                                                      <f:setPropertyActionListener value="#{result}" target="#{file.club}" />
                                              </a4j:support>
                                              
                                      </rich:suggestionbox>



      What can i do to make sure this error doesn't showup anymore...

        • 1. Re: Seam Conversation Error with rich:suggestionbox
          damianharvey.damianharvey.gmail.com

          This is caused by a build up of Ajax Requests causing the Seam conversation to timeout. You've already included some flood control in your ajax request (ignoreDups, eventsQueue and requestDelay), but you can still optimise it further:



          • Firstly increase the value of concurrent-request-timeout to something much higher than the default (is it 500?): eg. mine is 10000

          • Secondly you could use the minChars attribute of the suggestionBox to limit the size of the resulting query from the server. I have mine set to 2 as my result set is potentially 20,000. Makes sense to limit it.

          • Thirdly, is your suggestion query optimised? eg. DB table is indexed appropriately etc.



          And have a look at this JIRA


          Cheers,


          Damian.