db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cristian Dudila <cristian.dud...@keats-software.com>
Subject rows locking in derby
Date Mon, 29 Jan 2007 13:16:42 GMT
Hi,

   We use derby for an application and we need to lock some rows. The 
problem is that we would like to know if this rows are already locked.
Using TRANSACTION_REPEATABLE_READ we can lock this rows ( using SELECT 
)but we don't know if this rows was already locked. Using "SELECT FOR 
UPDATE" derby returns an exception that tell us that the row is locked, 
but unfortunately ( for us ) we can lock only one row using "SELECT FOR 
UPDATE".
Is there a possibility to lock multiple rows, using one connection and 
to receive an exception or message ( from derby ) if this rows are 
locked by somebody else before ?

Many Thanks,
Cristian

Mime
View raw message