#791 - ENH: Add transaction.setRollbackOnly() ... (and Ebean.setRollbackOnly())

This commit is contained in:
Robin Bygrave committed 2016-07-31 21:24:31 +12:00
1 parent d82148248c
commit b4a1d52067
6 files changed
+93

No files matched your search

@@ -181,6 +181,15 @@ public class ScopeTrans implements Thread.UncaughtExceptionHandler {
return e;
}
/**
* Mark the underlying transaction as rollback only.
*/
public void setRollbackOnly() {
if (transaction != null) {
transaction.setRollbackOnly();
}
}
/**
* An Exception was caught and may or may not cause a rollback to occur.
* Returns the exception and this should be thrown by the calling code.