5 Replies Latest reply on Jan 29, 2010 3:33 AM by ronanker

    How to abort an ajax request that use a4j:queue

    ronanker

      First of all thanks to all the Rich Faces team who are a great support to us since january 2007

       

      We are using RF 3.3.1 with JSP on JBoss 4.2.1

      Here is our issue:

      Some of our users complains about requests that never returns.

      When we activate the browser logs (a4j:log), we see that the request start (request state = 1) but then nothing else.

       

      After some investigation, sometimes in our Apache logs there is 400 errors log.

      But the browser does not get the answer and is still waiting (probably, there is a default in the network connection ?).

       

      As we can't stop having those faulty requests, we are now trying to deal with.

       

      As we are using a global a4j:queue, all the next requests (when the user click somewhere in our page after the blocking request is started) are blocked in the queue. So, the user has the feeling that the webapp is stucked.

      We are already using the queue's timeout. But users are impatient with it. So we are looking for a way (and this is our question) to abort the currently pending request in the queue in order to launch the next request.

      Is there any javascript API to call like :

       

      A4J.AJAX.requestQueue.currentRequest.abort();

       

      If anyone has any clue,

       

      Thanks.