2 Replies Latest reply on Apr 14, 2009 9:16 AM by bjm88

    Concurrent Ajax call is hanging

      Hi,
      I'm currently working in the following env:
      WebSphere 6.1
      Java 1.5
      JSF 1.1
      RichFaces 3.1.5 (Can't upgrade because of dependencies on WAS 6.1)
      IE6 and Firefox3.x browsers

      We have a very long running job that gets kicked off from the UI. Since it is so long running I wanted to make it an ajax call, and automatically kick off a second ajax call to monitor it with a4j:poll. I have everything setup, however once the long running job kicks off, the ajax poller call hangs and does not get called on the server until the long running job (about 5-10mins) completes. Some google searching showed me that IE and Firefox comply with the W3C standard to only allow 2 concurrent active connections to a web server, however I'm seeing hanging after just one.

      I was wondering if anyone has had similar issues with concurrent ajax calls and the limitations imposed by browsers, web servers(websphere), JSF, and/or Richfaces. If anyone knows if this is possible to do I would appreciate some advice, thank you.

        • 1. Re: Concurrent Ajax call is hanging
          ilya_shaikovsky

          I'm hope that the request which causes long operation to start not waiting for it's finish?

          provide code details.

          • 2. Re: Concurrent Ajax call is hanging

            the long running process is kicked off by the below "asynchronous call". Below that you'll see the poller tags, and yes the a4j:commandButton action does wait for the long running job to complete, it does not somehow drop a message on a queue for another process to pickup the work and return quickly, it will likely run 2-10min. Since this is async though I should be able to also have a poller going at the same time. The long running job will update session as it chugs along, and the poller will check session and capture the latest status, and reRender part of the screen to show that status. My problem is the concurrent a4j:poll call seems to hang and wait for the a4j:commandButton action to complete, so it seems to be there is something locking up the possibilities of concurrency.......

            <a4j:commandButton id="deleteBtn" value="Delete" styleClass="button" action="#{changeRequestMB.doDeleteChangeRequest}" reRender="facesContainer"/>


            <h:form id="pollerForm" >
            <a4j:region>
            <a4j:poll id="batchPoller" action="#{batchMonitorMB.doPollBatchProcess}" interval="2000" reRender="percentCompleteArea, batchPoller" enabled="#{batchMonitorMB.initialized == true}"
            />
            <a4j:outputPanel ajaxRendered="true" id="percentCompleteArea">
            <h:inputHidden value="#{batchMonitorMB.pollerVO.percentComplete}" id="percentComplete" rendered="#{batchMonitorMB.initialized == true}" />
            </a4j:outputPanel>
            </a4j:region>
            </h:form>