db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "bhiyavudh" <bhiyav...@hotmail.com>
Subject Optimistic Concurrency and Update Conflict
Date Wed, 10 Sep 2003 17:38:04 GMT
Hi all,

   I am using Torque in my Web Entry Tool project. In the multi user environment when the
update code similar to the following 


was executed by one user. It will perform successfully regardless whether the original record
in the database has been deleted or changed by another user (What I mean is no "Exception"
were thrown). Since "doUpdate" method of the Peer class return void, there is no way of checking
whether 0 or 1 record had been affected by the "doUpdate" operation. In Microsoft ADO.NET
and Oracle BC4J (similar to Torque) environment if one try to update (submit) changed cached
record back to the database and the corresponding record in the database has been updated
or deleted by another user, some sort of data concurrency exception were thrown so one can
check the existent of that record and handle the conflict accordingly and then inform the
user of the update conflict. I would like to know how could I do this similar conflict handling
in Torque. If possible could anyone give a sample code for it or point to one. I wouldn't
want to modify the source code for the "doUpdate" method or anything of that sort. Just want
an elegance way around in such situation. Thanks in advance for any good suggestion.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message