jbfilter (1) [Avatar] Offline
#1
Hi,
first I want to congratualate for the great work done so far, looking forward for the last chapters...

10.2.3. Explicit pessimistic locking

says
...
.setLockMode(LockModeType.PESSIMISTIC_READ)

2. If the query returns successfully, you know that you hold an exclusive lock on the data and
no other transaction can access/modify it until this transaction commits.

I think it should state only "modify" here, since the specification says :

LockModeType.PESSIMISTIC_READ can be used to query data using repeatable-read
semantics without the need to reread the data at the end of the transaction to obtain a lock, and
without blocking other transactions reading the data.
Christian Bauer (56) [Avatar] Offline
#2
Re: LockModeType.PESSIMISTIC_READ
Changed to:

If the query returns successfully, you know that you hold an exclusive lock
on the data and no other transaction can access it with an exclusive lock or
modify it until this transaction commits.