Skip to content
This repository has been archived by the owner on Mar 9, 2021. It is now read-only.

TransactionManager is not Thread Safe #17

Open
duereg opened this issue Aug 23, 2010 · 1 comment
Open

TransactionManager is not Thread Safe #17

duereg opened this issue Aug 23, 2010 · 1 comment

Comments

@duereg
Copy link

duereg commented Aug 23, 2010

The TransactionManager class is not Thread Safe. I've added locks to the following methods to solve the problem.

    public UnitOfWorkTransaction CurrentTransaction
    public void EnlistScope(IUnitOfWorkScope scope, TransactionMode mode)
    void OnTransactionDisposing(UnitOfWorkTransaction transaction)
    void Dispose(bool disposing)

Basically, anywhere the underlying _transactions object is changed needs to have a lock added.

@ghost
Copy link

ghost commented Feb 3, 2012

Would use one type of collections in System.Collections.Concurrent (NET 4.0 ) solve the problem?
But that binds NCommon to .net 4.0 only.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant