PDA

View Full Version : ajax poll retries



abdelaat
21 Jul 2010, 6:47 AM
Hi,

I am trying to debug my server code of my extjs application by putting some break points where the execution breaks until i see the content of my objects, but when i spend more than 20 seconds on the debug break point, i see on the client side that the first request is aborted and a new one (a retry) with the same url is made to the server causing double execution of the same code. I tried to surround that problem by changing the
POLL_INTERVAL = 20 constant that i found in the file ext-base-debug.js to
POLL_INTERVAL = 2000, but it seems not changing anything on the behaviour of retrying.

Do you have any idea on what i can do to solve my problem ?

Animal
21 Jul 2010, 6:53 AM
Hacking ext-base.js?

Any idea what you are doing? There's no way you should be changing anything in there.

That's nothing to do with Ajax.

Anyway, I don't understand what your problem is.

abdelaat
21 Jul 2010, 7:12 AM
Thank you for the reply,
My problem is that i need to put breakpoints on the servlet to debug my server code. these breakpoints cause the execution of the called servlet to block until i see the content of my variables, but some times it takes me much time to explore the content of these variables while the extjs client is waiting for the response of ajax request. if it takes me more than 20 secondes to debug server code, the client then doesn't see the response within 20 secondes, so it aborts the current request and makes a retry of this same request to the same servlet causing double execution of the same code.

So what i need is to rise the delay between the ajax request and the retry of this request.

Animal
21 Jul 2010, 7:18 AM
Increase the timeout of your Ajax requests to Number.MAX_VALUE

Animal
21 Jul 2010, 7:18 AM
Just during your development and testing cycle obviously!

abdelaat
21 Jul 2010, 7:26 AM
Thanks,
It worked fine.

Marc.Ziman
25 May 2011, 12:32 AM
I was having the same issue and found this thread, thanks for the info. Is there any documentation describing the retry behaviour? For example is it possible to configure Ext.Ajax to not retry?

Thanks