/** * 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> */ @Override public Transaction beginTransaction() { return beginTransaction(TxScope.required()); }
/** * <p>switchToRequiredScope.</p> */ public void switchToRequiredScope() { txScope = TxScope.required(); }
/** * 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> */ @Override public Transaction beginTransaction() { return beginTransaction(TxScope.required()); }
@Override protected void doStartTx(Object delegate, boolean readOnly) { if (readOnly) { TxScope scope = TxScope.required().setReadOnly(true); ebeanReadOnly.beginTransaction(scope); } else { ebean.beginTransaction(); } }