db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel John Debrunner <...@debrunners.com>
Subject Re: Statement.setQueryTimeout() in client/server mode
Date Fri, 01 Jul 2005 18:33:49 GMT
Oyvind.Bakksjo@Sun.COM wrote:
> Currently, the Derby client contains a client-side implementation of
> setQueryTimeout; using a TimerTask to invoke Statement.cancel() on the
> client side. First of all, cancel() is not implemented, so this doesn't
> work. Furthermore, we should use the server-side mechanism we now have
> for statement timeouts.

> For this, we need to transfer the timeout value from the client to the
> server, preferable without a separate round-trip. I have some loose
> thoughts on how to do this:

I'm not so sure, the reason is that the client side query timeout is
performing additional or different work. The client side needs to
timeout if the server has not responded within the given time, this
includes communication problems between the client and server.

So assume we have to fix the network communication problem, so the
client times out and cancels the statement if it has no received no
response from the server. Now if this is done, what is the advantage of
also pushing the timeout value to the server? You now have two timeouts
running, performing exactly the same operation. And most likely the
client one will fire first as it is set up first.

Dan.




Mime
View raw message