Index: /usr/local/tck/jdo/trunk/api2/src/java/javax/jdo/Constants.java
===================================================================
--- /usr/local/tck/jdo/trunk/api2/src/java/javax/jdo/Constants.java	(revision 736750)
+++ /usr/local/tck/jdo/trunk/api2/src/java/javax/jdo/Constants.java	(working copy)
@@ -266,6 +266,14 @@
      */
     static String PMF_ATTRIBUTE_SERVER_TIME_ZONE_ID
         = "server-time-zone-id";
+    /**
+     * The name of the persistence manager factory element's
+     * "query-timeout" attribute.
+     *
+     * @since 2.3
+     */
+    static String PMF_ATTRIBUTE_QUERY_TIMEOUT
+        = "query-timeout";
 
     /**
      * The name of the persistence manager factory property elements in the JDO
@@ -817,6 +825,13 @@
      */
     static String PROPERTY_SERVER_TIME_ZONE_ID
         = "javax.jdo.option.ServerTimeZoneID";
+    /**
+     * Mapping "javax.jdo.option.QueryTimeout"
+     *
+     * @since 2.3
+     */
+    static String PROPERTY_QUERY_TIMEOUT
+        = "javax.jdo.option.QueryTimeout";
 
     /**
      * Nonconfigurable property constanct "VendorName"
Index: /usr/local/tck/jdo/trunk/api2/src/java/javax/jdo/JDOHelper.java
===================================================================
--- /usr/local/tck/jdo/trunk/api2/src/java/javax/jdo/JDOHelper.java	(revision 736750)
+++ /usr/local/tck/jdo/trunk/api2/src/java/javax/jdo/JDOHelper.java	(working copy)
@@ -162,6 +162,9 @@
         xref.put(
             PMF_ATTRIBUTE_SERVER_TIME_ZONE_ID,
             PROPERTY_SERVER_TIME_ZONE_ID);
+        xref.put(
+            PMF_ATTRIBUTE_QUERY_TIMEOUT,
+            PROPERTY_QUERY_TIMEOUT);
 
         return Collections.unmodifiableMap(xref);
     }
@@ -1699,7 +1702,6 @@
             throw new JDOFatalUserException (msg.msg (
                 "EXC_GetPMFNullFile")); //NOI18N
 
-        Properties props = new Properties();
         InputStream in = null;
         try {
             in = new FileInputStream(propsFile);
Index: /usr/local/tck/jdo/trunk/api2/src/java/javax/jdo/JDOQueryInterruptedException.java
===================================================================
--- /usr/local/tck/jdo/trunk/api2/src/java/javax/jdo/JDOQueryInterruptedException.java	(revision 0)
+++ /usr/local/tck/jdo/trunk/api2/src/java/javax/jdo/JDOQueryInterruptedException.java	(revision 0)
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software 
+ * distributed under the License is distributed on an "AS IS" BASIS, 
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+ * See the License for the specific language governing permissions and 
+ * limitations under the License.
+ */
+
+/*
+ * JDOUnsupportedOptionException.java
+ *
+ */
+package javax.jdo;
+
+/** 
+ * This class represents exceptions caused when a query is cancelled by a user calling
+ * Query.cancel().
+ * 
+ * @since 2.3
+ */
+public class JDOQueryInterruptedException extends JDOUserException {
+    /**
+     * Constructs a new <code>JDOQueryInterruptedException</code> without a detail message.
+     */
+    public JDOQueryInterruptedException() {
+    }
+
+    /**
+     * Constructs a new <code>JDOQueryInterruptedException</code> with the specified detail message.
+     * @param msg the detail message.
+     */
+    public JDOQueryInterruptedException(String msg) {
+        super(msg);
+    }
+}
Index: /usr/local/tck/jdo/trunk/api2/src/java/javax/jdo/JDOQueryTimeoutException.java
===================================================================
--- /usr/local/tck/jdo/trunk/api2/src/java/javax/jdo/JDOQueryTimeoutException.java	(revision 0)
+++ /usr/local/tck/jdo/trunk/api2/src/java/javax/jdo/JDOQueryTimeoutException.java	(revision 0)
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software 
+ * distributed under the License is distributed on an "AS IS" BASIS, 
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+ * See the License for the specific language governing permissions and 
+ * limitations under the License.
+ */
+
+/*
+ * JDOUnsupportedOptionException.java
+ *
+ */
+package javax.jdo;
+
+/** 
+ * This class represents exceptions caused when a query reaches a specified timeout
+ * without completing.
+ * @since 2.3
+ */
+public class JDOQueryTimeoutException extends JDOUserException {
+    /**
+     * Constructs a new <code>JDOQueryTimeoutException</code> without a detail message.
+     */
+    public JDOQueryTimeoutException() {
+    }
+
+    /**
+     * Constructs a new <code>JDOQueryTimeoutException</code> with the specified detail message.
+     * @param msg the detail message.
+     */
+    public JDOQueryTimeoutException(String msg) {
+        super(msg);
+    }
+}
Index: /usr/local/tck/jdo/trunk/api2/src/java/javax/jdo/PersistenceManagerFactory.java
===================================================================
--- /usr/local/tck/jdo/trunk/api2/src/java/javax/jdo/PersistenceManagerFactory.java	(revision 738095)
+++ /usr/local/tck/jdo/trunk/api2/src/java/javax/jdo/PersistenceManagerFactory.java	(working copy)
@@ -520,6 +520,22 @@
      */
     void setTransactionIsolationLevel(String level);
 
+    /** Set the default query timeout setting for all <code>PersistenceManager</code>
+     * instances obtained from this factory.
+     *
+     * @param interval The default timeout setting (millisecs).
+     * @since 2.3
+     */
+    void setQueryTimeout(int interval);
+
+    /** Get the default query timeout setting for all 
+     * <code>PersistenceManager</code> instances obtained from this factory.
+     *
+     * @return the default query timeout setting.
+     * @since 2.3
+     */
+    int getQueryTimeout();
+
     /** Return non-configurable properties of this 
      * <code>PersistenceManagerFactory</code>.
      * Properties with keys <code>VendorName</code> and 
Index: /usr/local/tck/jdo/trunk/api2/src/java/javax/jdo/Query.java
===================================================================
--- /usr/local/tck/jdo/trunk/api2/src/java/javax/jdo/Query.java	(revision 736750)
+++ /usr/local/tck/jdo/trunk/api2/src/java/javax/jdo/Query.java	(working copy)
@@ -269,6 +269,8 @@
     void compile();
     
     /** Execute the query and return the filtered Collection.
+     * <P>Cancellation of the query using cancel() will result in JDOQueryInterruptedException
+     * being thrown here
      * @return the filtered <code>Collection</code>.
      * @see #executeWithArray(Object[] parameters)
      */
@@ -275,6 +277,8 @@
     Object execute();
     
     /** Execute the query and return the filtered <code>Collection</code>.
+     * <P>Cancellation of the query using cancel() will result in JDOQueryInterruptedException
+     * being thrown here
      * @return the filtered <code>Collection</code>.
      * @see #executeWithArray(Object[] parameters)
      * @param p1 the value of the first parameter declared.
@@ -282,6 +286,8 @@
     Object execute(Object p1);
     
     /** Execute the query and return the filtered <code>Collection</code>.
+     * <P>Cancellation of the query using cancel() will result in JDOQueryInterruptedException
+     * being thrown here
      * @return the filtered <code>Collection</code>.
      * @see #executeWithArray(Object[] parameters)
      * @param p1 the value of the first parameter declared.
@@ -290,6 +296,8 @@
     Object execute(Object p1, Object p2);
     
     /** Execute the query and return the filtered <code>Collection</code>.
+     * <P>Cancellation of the query using cancel() will result in JDOQueryInterruptedException
+     * being thrown here
      * @return the filtered <code>Collection</code>.
      * @see #executeWithArray(Object[] parameters)
      * @param p1 the value of the first parameter declared.
@@ -305,6 +313,8 @@
      * is the value used in the <code>execute</code> method.  The keys in the 
      * <code>Map</code> and the declared parameters must exactly match or a 
      * <code>JDOUserException</code> is thrown.
+     * <P>Cancellation of the query using cancel() will result in JDOQueryInterruptedException
+     * being thrown here
      * @return the filtered <code>Collection</code>.
      * @see #executeWithArray(Object[] parameters)
      * @param parameters the <code>Map</code> containing all of the parameters.
@@ -328,6 +338,8 @@
      * query.  It is then evaluated by the Boolean expression of the filter.  
      * The element passes the filter if there exist unique values for all 
      * variables for which the filter expression evaluates to <code>true</code>.
+     * <P>Cancellation of the query using cancel() will result in JDOQueryInterruptedException
+     * being thrown here
      * @return the filtered <code>Collection</code>.
      * @param parameters the <code>Object</code> array with all of the 
      * parameters.
@@ -685,4 +697,19 @@
         (Query sub, String variableDeclaration, 
          String candidateCollectionExpression, Map parameters);
 
+    /**
+     * Specify a timeout interval (milliseconds) for any query executions.
+     * If a query hasn't completed within this interval execute() will throw a
+     * JDOQueryTimeoutException.
+     * @since 2.3
+     * @param interval The timeout interval (millisecs)
+     */
+    void setTimeout(int interval);
+
+    /**
+     * Method to cancel any executing queries.
+     * If the underlying datastore doesn't support cancellation of queries this will
+     * throw JDOUnsupportedOptionException.
+     */
+    void cancel();
 }
