Return-Path: Delivered-To: apmail-db-jdo-dev-archive@www.apache.org Received: (qmail 54865 invoked from network); 1 May 2009 16:57:53 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 1 May 2009 16:57:53 -0000 Received: (qmail 91300 invoked by uid 500); 1 May 2009 16:57:53 -0000 Mailing-List: contact jdo-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jdo-dev@db.apache.org Delivered-To: mailing list jdo-dev@db.apache.org Received: (qmail 91272 invoked by uid 99); 1 May 2009 16:57:53 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 May 2009 16:57:53 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 May 2009 16:57:51 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 9BC7D234C052 for ; Fri, 1 May 2009 09:57:30 -0700 (PDT) Message-ID: <173621650.1241197050636.JavaMail.jira@brutus> Date: Fri, 1 May 2009 09:57:30 -0700 (PDT) From: "Andy Jefferson (JIRA)" To: jdo-dev@db.apache.org Subject: [jira] Updated: (JDO-623) Query cancel and timeout support In-Reply-To: <1847040061.1233949139537.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/JDO-623?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Andy Jefferson updated JDO-623: ------------------------------- Attachment: query.patch Patch to rename Query.cancel to Query.cancelAll, and add Query.cancel(Thread) > Query cancel and timeout support > -------------------------------- > > Key: JDO-623 > URL: https://issues.apache.org/jira/browse/JDO-623 > Project: JDO > Issue Type: New Feature > Components: api2, tck2 > Reporter: Andy Jefferson > Assignee: Andy Jefferson > Fix For: JDO 2 maintenance release 3 > > Attachments: JDO-623-mbo.patch, query.patch, query_timeout.patch > > > JDO doesn't have a mechanism to stop queries from overrunning. JPA2 now allows > a persistence property to allow timing them out, and most JDO implementations > have allowed this as an extension since JDO1. It would make sense for JDO > (2.3) to have the same or a variation. I propose having the following > Simple PMF property "javax.jdo.option.queryTimeout" to specify the number of millisecs (or secs) before any query is timed out. Throw a QueryTimeoutException (extends JDOException) when the timeout happens. > Add methods Query.setTimeout(int), Query.getTimeout() to allow setting/retrieving the timeout interval on a per-query basis. > Add method Query.cancel() to cancel any running query. If an implementation doesn't support cancelling of queries then it should throw a JDOUnsupportedOptionException. Any query execute() that is cancelled will throw a QueryInterruptedException (extends JDOUserException). -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.