db-jdo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c..@apache.org
Subject svn commit: r189773 - /incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/query/MultipleActiveQueryInstanceInSamePersistenceManager.java
Date Thu, 09 Jun 2005 16:25:44 GMT
Author: clr
Date: Thu Jun  9 09:25:43 2005
New Revision: 189773

URL: http://svn.apache.org/viewcvs?rev=189773&view=rev
Log:
JDO-63 fixed by Michael Watzek

Modified:
    incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/query/MultipleActiveQueryInstanceInSamePersistenceManager.java

Modified: incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/query/MultipleActiveQueryInstanceInSamePersistenceManager.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/query/MultipleActiveQueryInstanceInSamePersistenceManager.java?rev=189773&r1=189772&r2=189773&view=diff
==============================================================================
--- incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/query/MultipleActiveQueryInstanceInSamePersistenceManager.java
(original)
+++ incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/query/MultipleActiveQueryInstanceInSamePersistenceManager.java
Thu Jun  9 09:25:43 2005
@@ -72,26 +72,16 @@
         if (debug) 
             logger.debug("\nExecuting test MultipleActiveQueryInstanceInSamePersistenceManager()...");
 
-        Transaction tx = pm.currentTransaction();
-        try {
-            tx.begin();
+        executeQueries(pm);
 
-            executeQueries(pm);
-
-            if (debug)
-                logger.debug("Test MultipleActiveQueryInstanceInSamePersistenceManager: Passed");
-            tx.commit();
-            tx = null;
-        }
-        finally {
-            if ((tx != null) && tx.isActive())
-                tx.rollback();
-        }
+        if (debug)
+            logger.debug("Test MultipleActiveQueryInstanceInSamePersistenceManager: Passed");
     }
 
     /** */
     void executeQueries(PersistenceManager pm) {
         // query selecting all point instances
+        pm.currentTransaction().begin();
         Query query = pm.newQuery();
         query.setClass(PCPoint.class);
         query.setCandidates(pm.getExtent(PCPoint.class, false));
@@ -123,6 +113,7 @@
         expected2.add(new PCPoint(0, 0));
         expected2 = getFromInserted(expected2);
         checkQueryResultWithoutOrder(ASSERTION_FAILED, results2, expected2);
+        pm.currentTransaction().commit();
     }
 }
 



Mime
View raw message