openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ppod...@apache.org
Subject svn commit: r824384 - in /openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jta: ContainerTest.java JTAManagedRuntime.java SimpleTransaction.java SimpleTransactionManager.java
Date Mon, 12 Oct 2009 15:28:03 GMT
Author: ppoddar
Date: Mon Oct 12 15:28:02 2009
New Revision: 824384

URL: http://svn.apache.org/viewvc?rev=824384&view=rev
Log:
OPENJPA-1342: A simple mechanics to test with container managed transaction semantics

Modified:
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jta/ContainerTest.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jta/JTAManagedRuntime.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jta/SimpleTransaction.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jta/SimpleTransactionManager.java

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jta/ContainerTest.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jta/ContainerTest.java?rev=824384&r1=824383&r2=824384&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jta/ContainerTest.java
(original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jta/ContainerTest.java
Mon Oct 12 15:28:02 2009
@@ -24,7 +24,7 @@
 import org.apache.openjpa.persistence.test.SingleEMFTestCase;
 
 /**
- * Simulates a container transaction around a test method.
+ * Simulates a container transaction around a test method. 
  * 
  * The concrete tests derived from this class must adhere to the following guidelines:
  * <LI>They must configure openjpa.ManagedRuntime in setUp() properties as

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jta/JTAManagedRuntime.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jta/JTAManagedRuntime.java?rev=824384&r1=824383&r2=824384&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jta/JTAManagedRuntime.java
(original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jta/JTAManagedRuntime.java
Mon Oct 12 15:28:02 2009
@@ -53,5 +53,4 @@
     public void setRollbackOnly(Throwable cause) throws Exception {
         txm.getTransaction().setRollbackOnly(cause);
     }
-
 }

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jta/SimpleTransaction.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jta/SimpleTransaction.java?rev=824384&r1=824383&r2=824384&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jta/SimpleTransaction.java
(original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jta/SimpleTransaction.java
Mon Oct 12 15:28:02 2009
@@ -60,9 +60,10 @@
             }
         }
         // do nothing
+        status = errors.isEmpty() ? Status.STATUS_COMMITTED : Status.STATUS_ROLLEDBACK;
         for (Synchronization synch : synchs) {
             try {
-                synch.afterCompletion(Status.STATUS_COMMITTED);
+                synch.afterCompletion(status);
             } catch (Throwable t) {
                 errors.add(t);
             }

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jta/SimpleTransactionManager.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jta/SimpleTransactionManager.java?rev=824384&r1=824383&r2=824384&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jta/SimpleTransactionManager.java
(original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jta/SimpleTransactionManager.java
Mon Oct 12 15:28:02 2009
@@ -29,8 +29,7 @@
 import javax.transaction.TransactionManager;
 
 /**
- * A very very simple Transaction Manager for testing JTA resource 
- * without a container.
+ * A very simple Transaction Manager for testing JTA resource without a container.
  * <br>
  * Provides a single transaction per-thread model.
  * 



Mime
View raw message