db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "eCommerce Software Solutions Inc." <vinayso...@rogers.com>
Subject Re: Optimistic Locking
Date Wed, 21 May 2003 04:09:37 GMT
Such features involve more writing the same kind of code all the time. Why
do that when it can be automated?

A simple strategy could be: Torque run time makes an assumption that a
uniquely named column serves as version id, can the torque run-time not
check the version before performing the update. "Update" operation could
take another parameter (Update.THROWOPTIMISTICEXCEPTION ) indicating that
the optimistic policy is in use.

However, with features like this Torque will become as feature rich as JDO.
I don't know if this is desirable and needed.




----- Original Message -----
From: "Keeney, Thomas" <KeeneyT@SEC.GOV>
To: "'Turbine Torque Users List'" <torque-user@db.apache.org>
Sent: Tuesday, May 20, 2003 12:53 PM
Subject: RE: Optimistic Locking


> Please correct me if I'm wrong, but I don't believe Torque has this
feature.
> You could implement optimistic locking in your code by adding a timestamp
> that holds the last updated date for the Torque object.  Use the timestamp
> to rollback your transaction if the db record has changed since you first
> retrieved the Torque object.
>
> Does anyone else have other suggestions?
>
> Tom
>
> -----Original Message-----
> From: eCommerce Software Solutions Inc. [mailto:vinaysoni1@rogers.com]
> Sent: Friday, May 16, 2003 2:06 PM
> To: Turbine Torque Users List
> Subject: Optimistic Locking
>
>
> Is this feature supported by torque ? I looked around but found no such
> thing.
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
>


Mime
View raw message