On 07/06/2011 09:39 AM, Jens wrote:
> That would imply that a transaction has to live longer than one request
> (if you use JPA you can only lock an entity inside a transaction and the
> entity will be unlocked once you commit or rollback).
OK
> But I think in
> most common ajax web applications
That would imply that a transaction has to live longer than one request (if
you use JPA you can only lock an entity inside a transaction and the entity
will be unlocked once you commit or rollback). But I think in most common
ajax web applications you do one transaction per request and that way
On 7/6/2011 1:48 AM, Jens wrote:
> You have to store the lock somehow in the database. For example you
> can create a database table called "locked objects" that has columns
> like "id, referenced table name, referenced object id, user id that
> locked the object, date of lock". Then you put a uniq
You have to store the lock somehow in the database. For example you can
create a database table called "locked objects" that has columns like "id,
referenced table name, referenced object id, user id that locked the object,
date of lock". Then you put a unique constraint on "referenced table nam