Moreover, on EVERY exception caused in the update (for example some
constraint violation SQL exception) the version is still increased meaning
the object isn't restored to its state prior to the failed SQL exception.

I encountered it too when a constraint violation SQL exception was thrown
and the object's version was increased.

For me it's a real problem because the object is useless if a DB exception
occured - can it be solved somehow (by saving the object's version before
the update call and restoring it if an exception occured)?

Thanks,
Tal

-----Original Message-----
From: ricekwan [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 02, 2003 2:24 PM
To: OJB Users List
Subject: Version field get increment on OptimisticLockException


Hi,

I use an integer field for optimistic locking.  In case an
OptimisticLockException is throw, the field still get increased.

If such an object is saved more than once, it will finally get saved.

Is it a bug? Any help on how I can overcome this problem will be much
appreciated.

Thanks,
Rice

_________________________________________________________
Do You Yahoo!?
�n�O�K�O�� @yahoo.com ����q�l�l�� @ http://chinese.mail.yahoo.com
Get your free @yahoo.com address at http://chinese.mail.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to