ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sundar Sankar" <fatboys...@gmail.com>
Subject Re: IBATIS 2.3.3, JDK 1.5 - Optimistic locking strategies
Date Thu, 09 Oct 2008 15:36:27 GMT
Hi,
     Do you feel it would be difficult to persist the "Old Object". I am not
sure if you are confusing yourself with Ibatis thinking if it will work like
Hibernate. The way of saying "Old Object" Seems to remind me of just that.
If thats the case, I dont think Ibatis needs you to have the Old "Proxy"
Object to update the database. You just have to think of doing the update
like you do with any normal Dao Operation.

All I feel you will have to do is select -> persist -> and update. I am not
sure where the confusion is?

-Sundar

On Thu, Oct 9, 2008 at 7:07 AM, mule_user <sgho@aol.com> wrote:

>
> My fundamental question was:
>
> Is there a way to achieve optimistic locking, if the "OldObject" and/or the
> update timestamp of the old object were NOT available in scope.
>
> It seems that the solution in iBATIS requires you to keep the "OldObject"
> in
> scope because, the where clause requires you to pass the ID of the
> "OldObject" and update timestamp of the "OldObject".
>
> Otimistic locking requires keeping "OldObject" in scope in JDBC. I have
> followed this principle using JDBC for years.
>
> I understand that iBATIS is built upon data mapping, not ORM. That being
> said, I was hoping that there is an elegant solution using iBATIS, where I
> do not have to keep "OldObject" in scope. I was hoping that I do not have
> to
> resort back to keeping "OldObject" in scope, similar to the way I am used
> to
> doing it in JDBC realm.
>
> Again, keep in mind that I can only use timestamp attribute, not version.
> --
> View this message in context:
> http://www.nabble.com/IBATIS-2.3.3%2C-JDK-1.5---Optimistic-locking-strategies-tp19867989p19899728.html
> Sent from the iBATIS - User - Java mailing list archive at Nabble.com.
>
>

Mime
View raw message