db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kristian Waagan <kristian.waa...@oracle.com>
Subject Re: does Derby honor the statement.setQueryTimeout(int) ?
Date Wed, 20 Oct 2010 15:24:13 GMT
  On 20.10.10 17:16, Florin.Herinean@sungard.com wrote:
>
> Hi everybody,
>
> I’m using Derby latest 10.6.2.1 and I’m having a problem with 
> statement.setQueryTimeout(int).
>
> Namely I want to set a small value for the timeout (5 seconds) so that 
> the statement (an update statement) will fail (relatively) fast if 
> some other transaction is holding a write lock on the same row.
>
> The problem is that setQueryTimeout seems to be ignored, and the 
> update is waiting until the global timeout - 60+ seconds.
>
> Is that a known problem with Derby ? Or am I doing something wrong ?
>

Hi Florian,

I'm not sure, but if Derby is waiting for a lock, it may not honor the 
query timeout.
If the statement is doing "normal processing", the query timeout should 
take effect. If your application code is set up correctly for retrying, 
is it an option to lower the lock timeout as well?


Regards,
-- 
Kristian

> Best Regards,
>
> Florin Herinean
>


Mime
View raw message