internal void Rollback(SimpleTransaction tx) { tx.MakeInactive(); var parent = tx.parent; // Unlock all resources held by this transaction if (parent != null) { parent.MakeActive(); } _currentTransaction[tx.provider] = parent; // Unlock Store only when Top-most Tx Completes if (parent == null) { SimpleLockManager.UnlockAll(tx); } // In case of Rollback we fire off event even for nested Tx tx.FireCompleted(); }
internal void Commit(SimpleTransaction tx) { tx.MakeInactive(); var parent = tx.parent; // Unlock all resources held by this transaction if (parent != null) { parent.MakeActive(); } _currentTransaction[tx.provider] = parent; // Fire Events and unlock Store only when Top-most Tx commits if (parent == null) { SimpleLockManager.UnlockAll(tx); tx.FireCompleted(); } }