views:

18

answers:

0

Hi all, I'm investigating a bug in some software where basically two users press search at the same time and one gets the others results back. I believe this to be a combination of things.

  1. the connection is a a singleton that is shared across all instances on the server
  2. when search is pressed an async ajax callback is used to send the results to the grid.

This is the sequence of events that i think are happening 1. user 1 searches ->thread 1 (client side) 2. user 2 searches ->thread 2 (client side)

  1. a callback is registered (server side)
  2. a callback is registered (server side)

  3. the singleton for the connection is obtained (server side)

  4. thread two is locked out (server side)

  5. thread 1 search completes

  6. all registered callbacks are told that the function has complete with the following result (server side)

  7. thread 1(client side) gets results

  8. thread 2(client side) gets results

Am I correct in assuming that this is the behaviour of an ajax async callback; Once the callback has complete all registered callers (not specifically the caller that called it initially) are notified?

Cheers, Mark