diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jta/ContainerTest.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jta/ContainerTest.java
index badb77ed7..ea3de889b 100644
--- a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jta/ContainerTest.java
+++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jta/ContainerTest.java
@@ -24,7 +24,7 @@ import org.apache.openjpa.ee.ManagedRuntime;
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:
*
They must configure openjpa.ManagedRuntime in setUp() properties as
diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jta/JTAManagedRuntime.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jta/JTAManagedRuntime.java
index 84b24dff6..84811e054 100644
--- a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jta/JTAManagedRuntime.java
+++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jta/JTAManagedRuntime.java
@@ -53,5 +53,4 @@ public class JTAManagedRuntime implements ManagedRuntime {
public void setRollbackOnly(Throwable cause) throws Exception {
txm.getTransaction().setRollbackOnly(cause);
}
-
}
diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jta/SimpleTransaction.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jta/SimpleTransaction.java
index 019dc3754..cbe6fb41f 100644
--- a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jta/SimpleTransaction.java
+++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jta/SimpleTransaction.java
@@ -60,9 +60,10 @@ public class SimpleTransaction implements Transaction {
}
}
// 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);
}
diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jta/SimpleTransactionManager.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jta/SimpleTransactionManager.java
index fb3649b0a..a8af12f89 100644
--- a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jta/SimpleTransactionManager.java
+++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/jta/SimpleTransactionManager.java
@@ -29,8 +29,7 @@ import javax.transaction.Transaction;
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.
*
* Provides a single transaction per-thread model.
*