db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oystein.Grov...@Sun.COM (Øystein Grøvlen)
Subject Re: Locks not released on error
Date Fri, 23 Sep 2005 07:43:08 GMT
>>>>> "LC" == Lars Clausen <lc@statsbiblioteket.dk> writes:

    LC> Hi!
    LC> We're using Derby version 10.1 (Bundle-Version: 10.1.1000000.208786)
    LC> embeddedly in our system.  Even though I've put extensive rollback and
    LC> statement closing handling in the code, we still occasionally see cases
    LC> where a table gets permanently locked after an error during update
    LC> (detail below).  Is there something other than closing open statements
    LC> and rolling back existing savepoints that could be required for
    LC> releasing locks?  Am I doing the closing/rolling back wrongly?  Any
    LC> other ideas on how to cure this would be welcome.


Note that rolling back to savepoints does not roll back the entire
transaction.  This means that locks set by the transaction are not
released.  In order to release locks you need to do call
Connection.rollback() (without any parameters).


View raw message