From jdo-dev-return-8422-apmail-db-jdo-dev-archive=www.apache.org@db.apache.org Fri Dec 18 17:56:45 2009 Return-Path: Delivered-To: apmail-db-jdo-dev-archive@www.apache.org Received: (qmail 22520 invoked from network); 18 Dec 2009 17:56:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 18 Dec 2009 17:56:45 -0000 Received: (qmail 92783 invoked by uid 500); 18 Dec 2009 17:56:45 -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 92773 invoked by uid 99); 18 Dec 2009 17:56:45 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Dec 2009 17:56:45 +0000 X-ASF-Spam-Status: No, hits=-10.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI 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, 18 Dec 2009 17:56:38 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 2F77A234C1E9 for ; Fri, 18 Dec 2009 09:56:18 -0800 (PST) Message-ID: <1019215625.1261158978193.JavaMail.jira@brutus> Date: Fri, 18 Dec 2009 17:56:18 +0000 (UTC) From: "Craig Russell (JIRA)" To: jdo-dev@db.apache.org Subject: [jira] Commented: (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 [ https://issues.apache.org/jira/browse/JDO-623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12792547#action_12792547 ] Craig Russell commented on JDO-623: ----------------------------------- The latest patch has been checked in. svn commit -m "JDO-623 Change QueryTImeout to DatastoreTimeout" Sending api2/src/java/javax/jdo/Constants.java Deleting api2/src/java/javax/jdo/JDOQueryTimeoutException.java Sending api2/src/java/javax/jdo/PersistenceManager.java Sending api2/src/java/javax/jdo/PersistenceManagerFactory.java Sending api2/src/java/javax/jdo/Query.java Transmitting file data .... Committed revision 892317. > 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.