Hi Brett

You need to make sure that the select to happens in the same transaction as the update, by default selects use CONCUR_READ_ONLY which means the row can only be updated by the transaction that selected it. That lock ends when the transaction ends regardless of whether you still have a copy of the entity.

Regards
Scott

HotWax Media
http://www.hotwaxmedia.com

On 12/11/2009, at 10:27 AM, Brett Palmer wrote:

We are running into a concurrency problem with a service that needs to do a
read for update.  Currently, the service returns a record and then the
calling service updates the record. We are seeing a problem when multiple
requests can update the same record.

In ofbiz is there a where to specify a SELECT for UPDATE read that will lock
the record until the transaction closes?


Thanks,


Brett

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to