Synchronization

Synchronization is a logical thread of execution, sometimes called an activity. The COM+ Synchronization service provides synchronization that flows from object to object and prohibits more than one caller from entering the component at any given time. Synchronization determines when threads can dispatch calls to an object.

To use automatic synchronization, apply the SynchronizationAttribute attribute to a class that derives from System.EnterpriseServices.ServicedComponent.

If the caller is configured to support or require automatic transactions, the value of the SynchronizationOption enumeration is automatically set to Required. If the caller is configured to require a new transaction, the enumeration is set to RequiresNew.

The following example shows how to enable synchronization on instances of the TestSync class:

<Synchronization()> _
Public Class TestSync 
Inherits ServicedComponent
[C#][Synchronization]
public class TestSync : ServicedComponent

See Also

Summary of Available COM+ Services | SynchronizationAttribute | System.EnterpriseServices Namespace