Index: api2/src/schema/javax/jdo/jdoquery_2_3.dtd =================================================================== --- api2/src/schema/javax/jdo/jdoquery_2_3.dtd (revision 911931) +++ api2/src/schema/javax/jdo/jdoquery_2_3.dtd (working copy) @@ -36,6 +36,8 @@ + + Index: api2/src/schema/javax/jdo/jdoconfig_2_3.dtd =================================================================== --- api2/src/schema/javax/jdo/jdoconfig_2_3.dtd (revision 911931) +++ api2/src/schema/javax/jdo/jdoconfig_2_3.dtd (working copy) @@ -43,6 +43,8 @@ + + Index: api2/src/schema/javax/jdo/jdoquery_2_3.xsd =================================================================== --- api2/src/schema/javax/jdo/jdoquery_2_3.xsd (revision 911931) +++ api2/src/schema/javax/jdo/jdoquery_2_3.xsd (working copy) @@ -93,6 +93,8 @@ + + Index: api2/src/schema/javax/jdo/jdoconfig_2_3.xsd =================================================================== --- api2/src/schema/javax/jdo/jdoconfig_2_3.xsd (revision 911931) +++ api2/src/schema/javax/jdo/jdoconfig_2_3.xsd (working copy) @@ -149,6 +149,10 @@ + + + + Index: api2/src/java/javax/jdo/Constants.java =================================================================== --- api2/src/java/javax/jdo/Constants.java (revision 911931) +++ api2/src/java/javax/jdo/Constants.java (working copy) @@ -268,14 +268,21 @@ = "server-time-zone-id"; /** * The name of the persistence manager factory element's - * "query-timeout-millis" attribute. + * "datastore-read-timeout-millis" attribute. * * @since 2.3 */ - static String PMF_ATTRIBUTE_QUERY_TIMEOUT - = "query-timeout-millis"; - + static String PMF_ATTRIBUTE_DATASTORE_READ_TIMEOUT_MILLIS + = "datastore-read-timeout-millis"; /** + * The name of the persistence manager factory element's + * "datastore-write-timeout-millis" attribute. + * + * @since 2.3 + */ + static String PMF_ATTRIBUTE_DATASTORE_WRITE_TIMEOUT_MILLIS + = "datastore-write-timeout-millis"; + /** * The name of the persistence manager factory property elements in the JDO * configuration file. */ @@ -475,6 +482,14 @@ static String OPTION_QUERY_SQL = "javax.jdo.query.SQL"; /** + * "javax.jdo.option.QueryCancel" + * + * @see PersistenceManagerFactory#supportedOptions() + * @since 2.3 + */ + static String OPTION_QUERY_CANCEL + = "javax.jdo.option.QueryCancel"; + /** * "javax.jdo.option.DatastoreTimeout" * * @see PersistenceManagerFactory#supportedOptions() @@ -860,30 +875,40 @@ = "javax.jdo.mapping.Schema"; /** - * Mapping "javax.jdo.option.ServerTimeZoneID" + * Specified value "javax.jdo.option.ServerTimeZoneID" * * @since 2.1 */ static String PROPERTY_SERVER_TIME_ZONE_ID = "javax.jdo.option.ServerTimeZoneID"; + /** - * Mapping "javax.jdo.option.QueryTimeoutMillis" + * Specified value "javax.jdo.option.DatastoreReadTimeoutMillis" * * @since 2.3 */ - static String PROPERTY_QUERY_TIMEOUT - = "javax.jdo.option.QueryTimeoutMillis"; + static String PROPERTY_DATASTORE_READ_TIMEOUT_MILLIS + = "javax.jdo.option.DatastoreReadTimeoutMillis"; /** - * Nonconfigurable property constanct "VendorName" + * Specified value "javax.jdo.option.DatastoreWriteTimeoutMillis" * + * @since 2.3 + */ + static String PROPERTY_DATASTORE_WRITE_TIMEOUT_MILLIS + = "javax.jdo.option.DatastoreWriteTimeoutMillis"; + + /** + * Nonconfigurable property constant "VendorName" + * * @see PersistenceManagerFactory#getProperties() * @since 2.1 */ static String NONCONFIGURABLE_PROPERTY_VENDOR_NAME = "VendorName"; + /** - * Nonconfigurable property constanct "VersionNumber" + * Nonconfigurable property constant "VersionNumber" * * @see PersistenceManagerFactory#getProperties() * @since 2.1 Index: api2/src/java/javax/jdo/JDOHelper.java =================================================================== --- api2/src/java/javax/jdo/JDOHelper.java (revision 911931) +++ api2/src/java/javax/jdo/JDOHelper.java (working copy) @@ -163,8 +163,11 @@ PMF_ATTRIBUTE_SERVER_TIME_ZONE_ID, PROPERTY_SERVER_TIME_ZONE_ID); xref.put( - PMF_ATTRIBUTE_QUERY_TIMEOUT, - PROPERTY_QUERY_TIMEOUT); + PMF_ATTRIBUTE_DATASTORE_READ_TIMEOUT_MILLIS, + PROPERTY_DATASTORE_READ_TIMEOUT_MILLIS); + xref.put( + PMF_ATTRIBUTE_DATASTORE_WRITE_TIMEOUT_MILLIS, + PROPERTY_DATASTORE_WRITE_TIMEOUT_MILLIS); return Collections.unmodifiableMap(xref); } Index: tck2/src/java/org/apache/jdo/tck/api/persistencemanager/DatastoreTimeout.java =================================================================== --- tck2/src/java/org/apache/jdo/tck/api/persistencemanager/DatastoreTimeout.java (revision 911931) +++ tck2/src/java/org/apache/jdo/tck/api/persistencemanager/DatastoreTimeout.java (working copy) @@ -95,8 +95,8 @@ Thread t = new Thread(group, runnable, "Parallel Writer"); t.start(); - // Wait for a second such that the other thread can lock the instancs - Thread.currentThread().sleep(MAIN_SLEEP_MILLIS); + // Wait for a second such that the other thread can lock the instances + Thread.sleep(MAIN_SLEEP_MILLIS); try { runQueryReadingPCPointInstances(READ_TIMEOUT); @@ -125,8 +125,8 @@ Thread t = new Thread(group, runnable, "Parallel Reader"); t.start(); - // Wait for a second such that the other thread can lock the instancs - Thread.currentThread().sleep(MAIN_SLEEP_MILLIS); + // Wait for a second such that the other thread can lock the instances + Thread.sleep(MAIN_SLEEP_MILLIS); try { runUpdatePCointInstance(WRITE_TIMEOUT); @@ -155,8 +155,8 @@ Thread t = new Thread(group, runnable, "Parallel Writer"); t.start(); - // Wait for a second such that the other thread can lock the instancs - Thread.currentThread().sleep(MAIN_SLEEP_MILLIS); + // Wait for a second such that the other thread can lock the instances + Thread.sleep(MAIN_SLEEP_MILLIS); try { runQueryReadingPCPointInstances(ZERO_TIMEOUT); @@ -183,8 +183,8 @@ Thread t = new Thread(group, runnable, "Parallel Reader"); t.start(); - // Wait for a second such that the other thread can lock the instancs - Thread.currentThread().sleep(MAIN_SLEEP_MILLIS); + // Wait for a second such that the other thread can lock the instances + Thread.sleep(MAIN_SLEEP_MILLIS); try { runUpdatePCointInstance(ZERO_TIMEOUT); @@ -236,7 +236,8 @@ pm.currentTransaction().begin(); Query q = pm.newQuery(PCPoint.class); q.setDatastoreReadTimeoutMillis(timeout); - List result = (List)q.execute(); + @SuppressWarnings("unused") + List result = (List)q.execute(); pm.currentTransaction().commit(); if (!isDatastoreTimeoutSupported()) { fail(ASSERTION_FAILED, "Query.setDatastoreReadTimeoutMillis should throw a " + @@ -269,6 +270,7 @@ try { pm.currentTransaction().begin(); pm.setDatastoreReadTimeoutMillis(timeout); + @SuppressWarnings("unused") PCPoint point1 = (PCPoint)pm.getObjectById(point1Oid, true); pm.currentTransaction().commit(); if (!isDatastoreTimeoutSupported()) { @@ -457,7 +459,7 @@ PCPoint p2 = (PCPoint)parallelPM.getObjectById(point2Oid, true); p2.name(); // Give the main thread a chance to try to write the instances - Thread.currentThread().sleep(sleepMillis); + Thread.sleep(sleepMillis); tx.commit(); } catch (InterruptedException ex) { @@ -494,7 +496,7 @@ // Flush will set a write lock on the instances parallelPM.flush(); // Give the main thread a chance to try to read the instances - Thread.currentThread().sleep(sleepMillis); + Thread.sleep(sleepMillis); tx.commit(); } catch (InterruptedException ex) { Index: tck2/src/java/org/apache/jdo/tck/JDO_Test.java =================================================================== --- tck2/src/java/org/apache/jdo/tck/JDO_Test.java (revision 911931) +++ tck2/src/java/org/apache/jdo/tck/JDO_Test.java (working copy) @@ -881,7 +881,7 @@ /** Reports whether setting a Datastore timout is supported. */ public boolean isDatastoreTimeoutSupported() { return supportedOptions.contains( - "javax.jdo.option.DatastoreTimeout"); + Constants.OPTION_DATASTORE_TIMEOUT); } /** Reports whether a feature is supported */ Index: tck2/src/conf/jdo-2_3-signatures.txt =================================================================== --- tck2/src/conf/jdo-2_3-signatures.txt (revision 911931) +++ tck2/src/conf/jdo-2_3-signatures.txt (working copy) @@ -74,8 +74,10 @@ = "mapping"; static String PMF_ATTRIBUTE_SERVER_TIME_ZONE_ID = "server-time-zone-id"; - static String PMF_ATTRIBUTE_QUERY_TIMEOUT - = "query-timeout-millis"; + static String PMF_ATTRIBUTE_DATASTORE_READ_TIMEOUT_MILLIS + = "datastore-read-timeout-millis"; + static String PMF_ATTRIBUTE_DATASTORE_WRITE_TIMEOUT_MILLIS + = "datastore-write-timeout-millis"; static String ELEMENT_PROPERTY = "property"; static String PROPERTY_ATTRIBUTE_NAME @@ -130,6 +132,8 @@ = "javax.jdo.option.DatastoreTimeout"; static String OPTION_QUERY_SQL = "javax.jdo.query.SQL"; + static String OPTION_QUERY_CANCEL + = "javax.jdo.option.QueryCancel"; static String OPTION_UNCONSTRAINED_QUERY_VARIABLES = "javax.jdo.option.UnconstrainedQueryVariables"; static String OPTION_VERSION_DATETIME @@ -214,8 +218,10 @@ = "javax.jdo.mapping.Schema"; static String PROPERTY_SERVER_TIME_ZONE_ID = "javax.jdo.option.ServerTimeZoneID"; - static String PROPERTY_QUERY_TIMEOUT - = "javax.jdo.option.QueryTimeoutMillis"; + static String PROPERTY_DATASTORE_READ_TIMEOUT_MILLIS + = "javax.jdo.option.DatastoreReadTimeoutMillis"; + static String PROPERTY_DATASTORE_WRITE_TIMEOUT_MILLIS + = "javax.jdo.option.DatastoreWriteTimeoutMillis"; static String NONCONFIGURABLE_PROPERTY_VENDOR_NAME = "VendorName"; static String NONCONFIGURABLE_PROPERTY_VERSION_NUMBER