Assembly: System.Transactions (in system.transactions.dll)
You should note that even when your resource manager implements this interface to support single phase commit optimization, it is not guaranteed that it receives a single phase commit. The transaction manager can still send two phase commit notifications instead. For more information on the single phase commit optimization, see Optimization Using Single Phase Commit and Promotable Single Phase Notification.
To enlist your resource manager as a participant in a transaction, call the EnlistVolatile method or the EnlistDurable method of the Transaction class. Specifically, the EnlistmentOptions parameter should equal to None to ensure that a single phase commit is performed. If it is mistakenly set to EnlistDuringPrepareRequired, no single phase commit occurs.
Since the ISinglePhaseNotification interface derives from the IEnlistmentNotification interface, the resource manager must also implement all the methods of the latter for two phase commit notifications. It is the transaction manager's choice as to whether two phase commit or the single phase commit optimization is used with this resource manager. However, implementing this interface gives the resource manager the opportunity to take advantage of the optimization when it is available.
If the optimization is used and the transaction manager calls the SinglePhaseCommit method of the enlisted resource, the resource manager should respond to this call by using various methods of the SinglePhaseEnlistment class to inform the transaction manager if the transaction is to be committed or rolled back.
Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter EditionThe Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.