Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 8077 invoked from network); 1 Jul 2005 18:34:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 1 Jul 2005 18:34:05 -0000 Received: (qmail 51184 invoked by uid 500); 1 Jul 2005 18:33:57 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 51125 invoked by uid 500); 1 Jul 2005 18:33:57 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Reply-To: "Derby Development" Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 51084 invoked by uid 99); 1 Jul 2005 18:33:56 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Jul 2005 11:33:56 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [32.97.182.146] (HELO e6.ny.us.ibm.com) (32.97.182.146) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Jul 2005 11:33:58 -0700 Received: from d01relay04.pok.ibm.com (d01relay04.pok.ibm.com [9.56.227.236]) by e6.ny.us.ibm.com (8.12.11/8.12.11) with ESMTP id j61IXqsC025107 for ; Fri, 1 Jul 2005 14:33:52 -0400 Received: from d01av02.pok.ibm.com (d01av02.pok.ibm.com [9.56.224.216]) by d01relay04.pok.ibm.com (8.12.10/NCO/VERS6.7) with ESMTP id j61IXqkW221756 for ; Fri, 1 Jul 2005 14:33:52 -0400 Received: from d01av02.pok.ibm.com (loopback [127.0.0.1]) by d01av02.pok.ibm.com (8.12.11/8.13.3) with ESMTP id j61IXq9r004248 for ; Fri, 1 Jul 2005 14:33:52 -0400 Received: from [127.0.0.1] (DMCSDJDT41P.usca.ibm.com [9.72.133.82]) by d01av02.pok.ibm.com (8.12.11/8.12.11) with ESMTP id j61IXo5p004123 for ; Fri, 1 Jul 2005 14:33:51 -0400 Message-ID: <42C58C8D.3030309@debrunners.com> Date: Fri, 01 Jul 2005 11:33:49 -0700 From: Daniel John Debrunner User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.3) Gecko/20040910 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Derby Development Subject: Re: Statement.setQueryTimeout() in client/server mode References: <42C5570F.2030307@sun.com> In-Reply-To: <42C5570F.2030307@sun.com> X-Enigmail-Version: 0.90.0.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N 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.