Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

TransactionSynchronizationManager Class

Internal class that manages resources and transaction synchronizations per thread.

For a list of all members of this type, see TransactionSynchronizationManager Members .


[Visual Basic]
Public NotInheritable Class TransactionSynchronizationManager
public sealed class TransactionSynchronizationManager

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.


Supports one resource per key without overwriting, i.e. a resource needs to be removed before a new one can be set for the same key. Supports a list of transaction synchronizations if synchronization is active.

Resource management code should check for thread-bound resources via GetResource(). It is normally not supposed to bind resources to threads, as this is the responsiblity of transaction managers. A further option is to lazily bind on first use if transaction synchronization is active, for performing transactions that span an arbitrary number of resources.

Transaction synchronization must be activated and deactivated by a transaction manager via InitSynchronization and ClearSynchronization. This is automatically supported by AbstractPlatformTransactionManager.

Resource management code should only register synchronizations when this manager is active, and perform resource cleanup immediately else. If transaction synchronization isn't active, there is either no current transaction, or the transaction manager doesn't support synchronizations.

Note that this class uses following naming convention for the named 'data slots' for storage of thread local data, 'Spring.Transaction:Name' where Name is either


Namespace: Spring.Transaction.Support

Assembly: Spring.Data (in Spring.Data.dll)

See Also

TransactionSynchronizationManager Members | Spring.Transaction.Support Namespace