cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Kienenberger <mkien...@gmail.com>
Subject Re: Optimistic Locking
Date Fri, 13 Sep 2013 18:52:37 GMT
On Fri, Sep 13, 2013 at 3:56 AM, Markus Reich
<markus.reich@markusreich.at> wrote:
> is there a possibility to disalbe optimistic locking for certain entites in
> runtime?`
> e.g. the user get's info that there's a optimistic locking problem, then
> the user can force the commit ignoring the optimistic lock?


Looking at the source for 3.0.2, you can call
setDeclaredLockType(lockType) on the ObjEntity for your entity, where
lockType is one of the following:

ObjEntity.LOCK_TYPE_NONE
ObjEntity.LOCK_TYPE_OPTIMISTIC

This sets it for all entities of that type, however.  I don't think
there's a way to set it for individual entities.

Mime
View raw message