-
1. Re: Concurrent Ajax call is hanging
ilya_shaikovsky Apr 14, 2009 5:16 AM (in response to bjm88)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
bjm88 Apr 14, 2009 9:16 AM (in response to bjm88)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>