Return-Path: Delivered-To: apmail-db-jdo-dev-archive@www.apache.org Received: (qmail 89124 invoked from network); 12 Dec 2009 01:23:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 12 Dec 2009 01:23:41 -0000 Received: (qmail 64417 invoked by uid 500); 12 Dec 2009 01:23:41 -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 64317 invoked by uid 99); 12 Dec 2009 01:23:41 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 12 Dec 2009 01:23:41 +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; Sat, 12 Dec 2009 01:23:39 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 3CEA3234C1E9 for ; Fri, 11 Dec 2009 17:23:18 -0800 (PST) Message-ID: <1891849868.1260580998248.JavaMail.jira@brutus> Date: Sat, 12 Dec 2009 01:23:18 +0000 (UTC) From: "Craig Russell (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 ] Craig Russell updated JDO-623: ------------------------------ Attachment: jdo623.patch Please review this patch. It changes the methods get/setQueryTimeout to get/setDatastoreReadTimeout and adds get/setDatastoreWriteTimeout to Query, PersistenceManager, and PersistenceManagerFactory. It adds javax.jdo.option.DatastoreTimeout to Constants and removes JDOQueryTimeoutException. > 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: Michael Bouschen > Fix For: JDO 2 maintenance release 3 > > Attachments: JDO-623-mbo.patch, JDO-623-tck2-mbo.patch, jdo623.patch, pmf_option.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.