#303 - Change beginTransaction() to use REQUIRED scope by default

This commit is contained in:
rbygrave committed 2015-05-30 20:10:56 +12:00
1 parent 12833bc918
commit dcb7054248
6 files changed
+34 -11

No files matched your search

@@ -756,16 +756,16 @@ public final class DefaultServer implements SpiEbeanServer {
}
/**
* Start a transaction.
* Start a transaction with 'REQUIRED' semantics.
* <p>
* If a transaction already exists that transaction will be used.
* </p>
* <p>
* Note that the transaction is stored in a ThreadLocal variable.
* </p>
*/
public Transaction beginTransaction() {
// start an explicit transaction
SpiTransaction t = transactionManager.createTransaction(true, -1);
transactionScopeManager.set(t);
return t;
return beginTransaction(TxScope.required());
}
public Transaction beginTransaction(TxScope scope) {