Opened 11 years ago

Closed 9 years ago

#11851 closed defect (wontfix)

dojox.rpc.JsonRest should wait before the last request

Reported by: edgraaff Owned by: Kris Zyp
Priority: high Milestone: tbd
Component: DojoX Data Version: 1.5
Keywords: json rest transaction commit order Cc:
Blocked By: Blocking:



When using a where multiple rows are changed, all update requests to the server are made at once when calling The order in which they appear in the firebug console is right and the last one contains a request header 'Transaction' with value 'commit'. Most of the times this didn't really matter for me, as normally updating a database table will go just fine. But now I'm in a situation where all rows refer to external data which takes some time to save - so I look at this Transaction header now.

I notice that it's far from guaranteed that requests made from the browser arrive in the same order at the webserver. In other words, it often occurs that the 'commit' request arrives before all 'open' requests are made.

To work around this, I added a onComplete argument to{}), where I send an extra commit command to the server. At that point, I'm sure that everything is sent and responses are received and it is safe to execute a commit.

The proper way to solve this, would be:

  • Upon save, send out all update/post/delete requests, except one
  • Wait! Till they're all done
  • Now send the last one, with Transaction header set to 'commit'

I figure this takes a 'little' longer to save, but I would prefer this over that you cannot rely on the Transaction header. At the server-side that is (even if it is localhost).

I set the severity to major, as the use of the Transaction header pretty much relies on the order in which requests arrive at the server.

Thanks for your help in advance!


Change History (3)

comment:1 Changed 11 years ago by Jared Jurkiewicz

Owner: changed from Jared Jurkiewicz to Kris Zyp

comment:2 Changed 11 years ago by Adam Peller

Milestone: 1.5.1tbd

comment:3 Changed 9 years ago by Colin Snover

Resolution: wontfix
Status: newclosed

dojox/data is abandoned. Some dojox/data stores have been upgraded to use the Dojo Store API and can be found at

Note: See TracTickets for help on using tickets.