AfterTransactionCompletion called twice if a distributed transaction is rolled back

Description

If a session is opened and closed within a System.Transaction transaction, and that transaction is allowed to rollback, there will be two calls to the interceptor's AfterTransactionCompletion().

This is because DistributedTransactionContext.Rollback() will call sessionImplementor.AfterTransactionCompletion(false, null), which will then be called again by the TransactionCompleted event handler attached in AdoNetWithDistributedTransactionFactory.EnlistInDistributedTransactionIfNeeded().

Environment

None

Activity

Show:

Oskar Berggren November 16, 2013 at 8:37 PM

Fix in 12676c1a97023e5d1e1751ba0a8f3a69ebc51790.

Fixed

Details

Assignee

Reporter

Labels

Components

Fix versions

Affects versions

Priority

Who's Looking?

Open Who's Looking?
Created November 16, 2013 at 6:54 PM
Updated June 9, 2016 at 4:17 AM
Resolved November 16, 2013 at 8:37 PM
Who's Looking?