views:

31

answers:

1

ServletA:

  • retrieves in a query a set of objects (around 2000) and then runs a weight function to choose one object and update it.
  • all that is within a trasaction so it'll get an exception if the objects were changed

ServletB:

  • each object is being updated every 15 secs by robot clients

So the record set that has been retrieved in ServletA is being updated every 2000/15 = 133 millsec. Will it ever succeed to update the object without interruption?

A: 

ServletA will only throw an exception if the selected "best" room was updated after it was retrieved from the datastore, before it was persisted.

If any of the other 1999 entities were modified, it won't matter since you're not modifying them at all.

Jason Hall
that's good news. many thanks Jason!
bach