/// <summary> /// Release the savepoint that is held for the transaction. /// </summary> /// <exception cref="Spring.Transaction.TransactionUsageException"> /// If no save point has been created. /// </exception> public void ReleaseHeldSavepoint() { if (!HasSavepoint) { throw new TransactionUsageException("No savepoint associated with current transaction"); } SavepointManager.ReleaseSavepoint(Savepoint); }
/// <summary> /// Create a savepoint and hold it for the transaction. /// </summary> /// <exception cref="Spring.Transaction.NestedTransactionNotSupportedException"> /// If the underlying transaction does not support savepoints. /// </exception> public void CreateAndHoldSavepoint(string savepoint) { SavepointManager.CreateSavepoint(savepoint); Savepoint = savepoint; }
/// <summary> /// This implementation delegates to the underlying transaction object /// (if it implements the <see cref="Spring.Transaction.ISavepointManager"/> interface) /// to rollback to the supplied <paramref name="savepoint"/>. /// </summary> /// <param name="savepoint">The savepoint to rollback to.</param> public void RollbackToSavepoint(string savepoint) { SavepointManager.RollbackToSavepoint(savepoint); }
/// <summary> /// This implementation delegates to the underlying transaction object /// (if it implements the <see cref="Spring.Transaction.ISavepointManager"/> interface) /// to release the supplied <paramref name="savepoint"/>. /// </summary> /// <param name="savepoint">The savepoint to release.</param> public void ReleaseSavepoint(string savepoint) { SavepointManager.ReleaseSavepoint(savepoint); }
/// <summary> /// This implementation delegates to the underlying transaction object /// (if it implements the <see cref="Spring.Transaction.ISavepointManager"/> interface) /// to create a savepoint. /// </summary> /// <exception cref="Spring.Transaction.NestedTransactionNotSupportedException"> /// If the underlying transaction does not support savepoints. /// </exception> public void CreateSavepoint(string savepoint) { SavepointManager.CreateSavepoint(savepoint); }