ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brandon Goodin <brandon.goo...@gmail.com>
Subject Re: Optimistic locking strategy with iBatis
Date Wed, 30 Mar 2005 19:38:07 GMT
IBatis maintains no optimistic locking strategies. Normally we
recommend that you put an update count into your database. But, being
that you can't do that, you probably are working with the best
solution possible.

Brandon


On Wed, 30 Mar 2005 13:29:01 -0600, Wulf, Andrew
<AHWulf@firstcommand.com> wrote:
>  
> 
> Before I figure it out the hard way, anyone have some pointers on
> implementing an optimistic lock strategy with iBatis. The difficulty is that
> we have nothing in the database (or can add anything) like a version field
> or last update time. The current strategy in the home grown persistance
> framework (which we will migrate hopefully to ibatis) is to create a hash of
> the row contents and store it with the value object, then on update reread
> the row (select for update on primary key) compare the hashes and throw an
> exception if they don't match. How best to do something similar with iBatis?
> 
> - Andrew 
>  
> STATEMENT OF CONFIDENTIALITY:     The information contained in this message
> or any attachments to this message are intended only for the person(s) or
> entity to which it is addressed and may contain confidential and/or
> privileged material as well as being protected from disclosure.   Any
> review, retransmission, dissemination or other use of, or taking of any
> action in reliance upon, this information by persons or entities other than
> the intended recipient is strictly prohibited. If you received this in
> error, please contact the sender immediately and delete the material from
> any computer.
> 
> 
>

Mime
View raw message