mirror of https://github.com/apache/openjpa.git
OPENJPA-1342: A simple mechanics to test with container managed transaction semantics
git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@824384 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
eb41b03ff4
commit
60b8e64ec9
|
@ -53,5 +53,4 @@ public class JTAManagedRuntime implements ManagedRuntime {
|
|||
public void setRollbackOnly(Throwable cause) throws Exception {
|
||||
txm.getTransaction().setRollbackOnly(cause);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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.
|
||||
* <br>
|
||||
* Provides a single transaction per-thread model.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue