Compartir a través de


Transaction.EnlistPromotableSinglePhase Método

Definición

Inscribe a un administrador de recursos que tiene una transacción interna mediante una inscripción de fase única promocional (PSPE).

Sobrecargas

EnlistPromotableSinglePhase(IPromotableSinglePhaseNotification)

Inscribe a un administrador de recursos que tiene una transacción interna mediante una inscripción de fase única promocional (PSPE).

EnlistPromotableSinglePhase(IPromotableSinglePhaseNotification, Guid)

Inscribe a un administrador de recursos que tiene una transacción interna mediante una inscripción de fase única promocional (PSPE).

EnlistPromotableSinglePhase(IPromotableSinglePhaseNotification)

Source:
Transaction.cs
Source:
Transaction.cs
Source:
Transaction.cs

Inscribe a un administrador de recursos que tiene una transacción interna mediante una inscripción de fase única promocional (PSPE).

public:
 bool EnlistPromotableSinglePhase(System::Transactions::IPromotableSinglePhaseNotification ^ promotableSinglePhaseNotification);
public bool EnlistPromotableSinglePhase (System.Transactions.IPromotableSinglePhaseNotification promotableSinglePhaseNotification);
member this.EnlistPromotableSinglePhase : System.Transactions.IPromotableSinglePhaseNotification -> bool
Public Function EnlistPromotableSinglePhase (promotableSinglePhaseNotification As IPromotableSinglePhaseNotification) As Boolean

Parámetros

promotableSinglePhaseNotification
IPromotableSinglePhaseNotification

Interfaz IPromotableSinglePhaseNotification implementada por el participante.

Devoluciones

Implementación de SinglePhaseEnlistment interfaz que describe la inscripción.

Comentarios

Las inscripciones en una transacción son volátiles; es decir, no sobreviven al fracaso del participante. Además, este método solo sugiere al administrador de transacciones escalar el control, pero no se garantiza la escalación en sí. Si se produce un error en la escalación, el usuario no recibe una notificación y la transacción se revierte.

El parámetro promotableSinglePhaseNotification se usa para comunicar al administrador de transacciones el resultado de intentar confirmar la transacción interna del administrador de recursos. Si se notifican datos incoherentes, el administrador de transacciones produce una excepción. Si se notifica un resultado InDoubt, el administrador de transacciones busca la notificación de resultados en su propia inscripción interna y omite la respuesta notificada.

Para obtener más información sobre las inscripciones y la escalación de una transacción, consulte Escalación de administración de transacciones. Para obtener más información sobre PSPE, consulte optimización de mediante confirmación de fase única y notificación de fase única promocionable.

Se aplica a

EnlistPromotableSinglePhase(IPromotableSinglePhaseNotification, Guid)

Source:
Transaction.cs
Source:
Transaction.cs
Source:
Transaction.cs

Inscribe a un administrador de recursos que tiene una transacción interna mediante una inscripción de fase única promocional (PSPE).

public:
 bool EnlistPromotableSinglePhase(System::Transactions::IPromotableSinglePhaseNotification ^ promotableSinglePhaseNotification, Guid promoterType);
public bool EnlistPromotableSinglePhase (System.Transactions.IPromotableSinglePhaseNotification promotableSinglePhaseNotification, Guid promoterType);
member this.EnlistPromotableSinglePhase : System.Transactions.IPromotableSinglePhaseNotification * Guid -> bool
Public Function EnlistPromotableSinglePhase (promotableSinglePhaseNotification As IPromotableSinglePhaseNotification, promoterType As Guid) As Boolean

Parámetros

promotableSinglePhaseNotification
IPromotableSinglePhaseNotification

Interfaz IPromotableSinglePhaseNotification implementada por el participante.

promoterType
Guid

Tipo del procesador de transacciones distribuidas.

Devoluciones

Implementación de SinglePhaseEnlistment interfaz que describe la inscripción.

Comentarios

Si el valor especificado para el parámetro promoterType es TransactionInterop.PromoterTypeDtc, el de transacción debe promoverse por MSDTC y el byte[] devuelto desde el método IPromotableSinglePhaseNotification.Promotedebe ser un token de propagación de transacciones MSDTC.

Si el valor especificado para el parámetro promoterType es noTransactionInterop.PromoterTypeDTC, msDTC no promoverá la transacción, sino la implementación del autor de la llamada de IPromotableSinglePhaseNotification. Si esta llamada se realiza correctamente, hay un conjunto de operaciones posteriores en la transacción que devolverá un TransactionPromotionException. Estas operaciones son:

  • Transaction.EnlistDurable

  • TransactionInterop.GetDtcTransaction

  • TransactionInterop.GetExportCookie

  • TransactionInterop.GetTransmitterPropagationToken

  • Serialización de un objeto Transaction

Se aplica a