You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by David Warnock <da...@sundayta.com> on 2003/03/18 17:14:18 UTC

Optimistic Integer locking w/o increment

Hi,

We are using Optimistic integer locking on some tables. However, we want 
to do the incrementing in dbms triggers. Then we can have a dbms trigger 
that throws an exception if the locking column has changed (ie another 
user has updated the row). If the column is unchanged then the trigger 
increments it.

This makes it simpler to have multiple tools/languages updating the dbms.

Where should I look in OJB to keep the optimistic locking checks but for 
OJB not to update the version column.

Thanks

Dave
-- 
David Warnock, Sundayta Ltd. http://www.sundayta.com
iDocSys for Document Management. VisibleResults for Fundraising.
Development and Hosting of Web Applications and Sites.



Re: Optimistic Integer locking w/o increment

Posted by Thomas Mahler <th...@web.de>.
Hi David,

David Warnock wrote:
> Hi,
> 
> We are using Optimistic integer locking on some tables. However, we want 
> to do the incrementing in dbms triggers. Then we can have a dbms trigger 
> that throws an exception if the locking column has changed (ie another 
> user has updated the row). If the column is unchanged then the trigger 
> increments it.
> 
> This makes it simpler to have multiple tools/languages updating the dbms.

I agree!

> Where should I look in OJB to keep the optimistic locking checks but for 
> OJB not to update the version column.

This is a tough question.
The current OL solution is tightly linked into the OJB core. It is 
currently not pluggable.
But I assume it will be possible to integrate user defined mechanisms 
without too much pain.


cheers,
Thomas

> Thanks
> 
> Dave