Results 1 to 7 of 7

Thread: Concurrency issue with two Ext.Ajax.request calls

  1. #1
    Sencha Premium User
    Join Date
    Jun 2017
    Posts
    13

    Default Concurrency issue with two Ext.Ajax.request calls

    Hi

    I have to do two Ext.Ajax.request calls, I need to make sure that first one finished (login) before second can start (send data).
    I did try use Ext.Premise, but on second request I always get 0 error service not availiable.
    Everything changes when I try to do some debugging, when debugger stops and I continue calls are made as expected.
    Could someone give me some poitners how to solve this issue, please?

    Arek

  2. #2
    Sencha User yeghikyan's Avatar
    Join Date
    Mar 2009
    Location
    München
    Posts
    574
    Answers
    99

    Default

    What about triggering the load of the 2-nd AJAX request from the success method of the first one?
    "The competent programmer is fully aware of the strictly limited size of his own skull; therefore he approaches the programming task in full humility, and among other things he avoids clever tricks like the plague." – Edsger W. Dijkstra

  3. #3
    Sencha Premium User
    Join Date
    Jun 2017
    Posts
    13

    Default

    It is how my premise was build. It returned on success, and then() should be executed after sucess. Unfortunately this did not solve this issue.

  4. #4
    Sencha User yeghikyan's Avatar
    Join Date
    Mar 2009
    Location
    München
    Posts
    574
    Answers
    99
    "The competent programmer is fully aware of the strictly limited size of his own skull; therefore he approaches the programming task in full humility, and among other things he avoids clever tricks like the plague." – Edsger W. Dijkstra

  5. #5
    Sencha Premium User
    Join Date
    Jun 2017
    Posts
    13

    Default

    I don't know how to emulate web services in this fiddle.

  6. #6

  7. #7
    Sencha Premium User
    Join Date
    Jun 2017
    Posts
    13

    Default

    Thank you for help.

    It was combination of two things. One was to use callback method instead of success in first Ajax call. And relaxing rules on connections on webservice side.

Similar Threads

  1. Replies: 6
    Last Post: 10 Aug 2015, 12:56 PM
  2. Ajax calls in IE 11 issue
    By razvan_s in forum Ext 5: Q&A
    Replies: 2
    Last Post: 5 Mar 2015, 2:20 AM
  3. [FIXED] useDefaultXhrHeader option not working for Ext.Ajax.request calls
    By budoudoh in forum Sencha Touch 2.x: Bugs
    Replies: 5
    Last Post: 3 May 2013, 4:50 AM
  4. Setting encoding in calls to Ext.Ajax.Request.
    By shr1975 in forum Ext 2.x: Help & Discussion
    Replies: 4
    Last Post: 6 Dec 2012, 2:34 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •