From derby-user-return-9893-apmail-db-derby-user-archive=db.apache.org@db.apache.org Fri Oct 10 12:26:46 2008 Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 21192 invoked from network); 10 Oct 2008 12:26:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 10 Oct 2008 12:26:46 -0000 Received: (qmail 36476 invoked by uid 500); 10 Oct 2008 12:26:44 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 36460 invoked by uid 500); 10 Oct 2008 12:26:44 -0000 Mailing-List: contact derby-user-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Reply-To: "Derby Discussion" Delivered-To: mailing list derby-user@db.apache.org Received: (qmail 36449 invoked by uid 99); 10 Oct 2008 12:26:44 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 10 Oct 2008 05:26:44 -0700 X-ASF-Spam-Status: No, hits=3.8 required=10.0 tests=DNS_FROM_SECURITYSAGE,HTML_MESSAGE,MIME_HTML_ONLY,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of flachbar@gmail.com designates 66.249.82.229 as permitted sender) Received: from [66.249.82.229] (HELO wx-out-0506.google.com) (66.249.82.229) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 10 Oct 2008 12:25:39 +0000 Received: by wx-out-0506.google.com with SMTP id h29so250076wxd.13 for ; Fri, 10 Oct 2008 05:26:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id :disposition-notification-to:date:from:user-agent:mime-version:to :subject:references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; bh=XZnhcLYrND1fkFyN2Bl5P4pNl1hKyn6kNoFHEOOX+Xc=; b=YYkvmLBhnG1Q66pLllbMwUZyis7b6RNQKQYb46xF2A2LqXs5R9IGLdl+6E72/Xy670 4avP9ZhI/TjsFwqcTm1ZK5V5hPQlEdYMAWWyhJaJWjBRL6Yw+IYa/6uZFhfuFfAJnJAl Fn+y87Y/J6G1KUjIs5zX5sonNDC7zg7JonVS0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:disposition-notification-to:date:from:user-agent :mime-version:to:subject:references:in-reply-to:x-enigmail-version :content-type:content-transfer-encoding; b=IdGRKzTPJkUcM97hg8XFc/NomFGh+Sn29Qrd2d8IrTyE5l5wKnwvyzYSeDsQf0fLRd AdoUf6/XwkJ3aJtyMu+m3D6WSr1s4r4EeBDhk1/bf2DWfjHJIPH1BVBUE9gPI5KTplTL dSdIsafkTat8oE5/FV+lQi4l8im9S7ydxmpaE= Received: by 10.70.116.14 with SMTP id o14mr1619962wxc.31.1223641565699; Fri, 10 Oct 2008 05:26:05 -0700 (PDT) Received: from ?192.168.1.101? ([96.32.33.200]) by mx.google.com with ESMTPS id i11sm1719641wxd.28.2008.10.10.05.26.03 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 10 Oct 2008 05:26:04 -0700 (PDT) Message-ID: <48EF49DA.9010009@gmail.com> Date: Fri, 10 Oct 2008 08:26:02 -0400 From: Dirk Flachbart User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 To: Derby Discussion Subject: Re: cancel a running query? References: <20081010115720.85A6A5FCF8@dbrack01.segel.com> In-Reply-To: <20081010115720.85A6A5FCF8@dbrack01.segel.com> X-Enigmail-Version: 0.95.7 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org
Doesn't Derby support Statement.setQueryTimeout() ?


Dirk


derby@segel.com wrote:
A rollback doesn't "cancel" a query. Meaning that you can't stop the query
until it completes.

The rollback will reverse the results of a transaction after the SQL
statement completes. A query is unaffected because its not a SQL statement
that changes the database. (query == SELECT, other statements UPDATE,DELETE,
INSERT, etc ... do change the data.)

So if you start  a query, there isn't a way to have some sort of query
timeout or call to prematurely end the query. (Perhaps you need to consider
threading your app...)

HTH

-Mike


  
-----Original Message-----
From: Dag.Wanvik@Sun.COM [mailto:Dag.Wanvik@Sun.COM]
Sent: Thursday, October 09, 2008 9:09 PM
To: Derby Discussion
Subject: Re: cancel a running query?

Rick Hillegas <Richard.Hillegas@Sun.COM> writes:

    
 conn.rollback();
      
Doesn't the rollback block on synchronizion on the connection?

Dag