Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 40879 invoked from network); 2 Jun 2005 16:09:17 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 2 Jun 2005 16:09:17 -0000 Received: (qmail 691 invoked by uid 500); 2 Jun 2005 16:09:14 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 664 invoked by uid 500); 2 Jun 2005 16:09:14 -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 651 invoked by uid 99); 2 Jun 2005 16:09:13 -0000 X-ASF-Spam-Status: No, hits=0.4 required=10.0 tests=SPF_HELO_FAIL X-Spam-Check-By: apache.org Received-SPF: neutral (hermes.apache.org: local policy) Received: from e35.co.us.ibm.com (HELO e35.co.us.ibm.com) (32.97.110.133) by apache.org (qpsmtpd/0.28) with ESMTP; Thu, 02 Jun 2005 09:09:12 -0700 Received: from d03relay04.boulder.ibm.com (d03relay04.boulder.ibm.com [9.17.195.106]) by e35.co.us.ibm.com (8.12.10/8.12.9) with ESMTP id j52G8wMK585282 for ; Thu, 2 Jun 2005 12:08:58 -0400 Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by d03relay04.boulder.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id j52G8vJj147804 for ; Thu, 2 Jun 2005 10:08:58 -0600 Received: from d03av02.boulder.ibm.com (loopback [127.0.0.1]) by d03av02.boulder.ibm.com (8.12.11/8.13.3) with ESMTP id j52G8vdj015335 for ; Thu, 2 Jun 2005 10:08:57 -0600 Received: from [127.0.0.1] (sig-9-48-121-137.mts.ibm.com [9.48.121.137]) by d03av02.boulder.ibm.com (8.12.11/8.12.11) with ESMTP id j52G8mSe014220 for ; Thu, 2 Jun 2005 10:08:56 -0600 Message-ID: <429F2F0A.50307@debrunners.com> Date: Thu, 02 Jun 2005 09:08:42 -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: Implementing Statement.cancel() References: <427648FF.9010007@sun.com> <42765F37.7070201@debrunners.com> <428C9E5A.3060307@sun.com> In-Reply-To: <428C9E5A.3060307@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 X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Oyvind.Bakksjo@sun.com wrote: > Daniel John Debrunner wrote: > >> Oyvind.Bakksjo@Sun.COM wrote: >> >> >>> I've been looking at implementing Statement.cancel(), and later, >>> Statement.setQueryTimeout(). >> >> >> >> So, quick summary, that method is not suitable for finding the correct >> StatementContext from EmbedStatement.cancel(). >> >> I'll look into how I think you should track down the StatementContext. >> Dan. > > > Hi Dan, > > have you had any time to look into this? Not a lot :-( I've been thinking about it and there are a couple of issues: 1) StatementContexts are created dynamically for the current running statement 2) Derby does not keep references to application JDBC objects below the JDBC layer. This is to ensure when any JDBC object (e.g. Statement) moves out of scope for the application, it will be garbage collected and lead to its closure. I wonder if from a StatementContext you can determine the activation because that would provide the link to the Statement. Dan.