Transaction.EnlistPromotableSinglePhase Método
Definição
Importante
Algumas informações dizem respeito a um produto pré-lançado que pode ser substancialmente modificado antes de ser lançado. A Microsoft não faz garantias, de forma expressa ou implícita, em relação à informação aqui apresentada.
Recruta um gestor de recursos que tem uma transação interna usando um alistamento promocional de fase única (PSPE).
Sobrecargas
| Name | Descrição |
|---|---|
| EnlistPromotableSinglePhase(IPromotableSinglePhaseNotification) |
Recruta um gestor de recursos que tem uma transação interna usando um alistamento promocional de fase única (PSPE). |
| EnlistPromotableSinglePhase(IPromotableSinglePhaseNotification, Guid) |
Recruta um gestor de recursos que tem uma transação interna usando um alistamento promocional de fase única (PSPE). |
EnlistPromotableSinglePhase(IPromotableSinglePhaseNotification)
- Origem:
- Transaction.cs
- Origem:
- Transaction.cs
- Origem:
- Transaction.cs
- Origem:
- Transaction.cs
- Origem:
- Transaction.cs
Recruta um gestor de recursos que tem uma transação interna usando um alistamento promocional de fase única (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
Uma IPromotableSinglePhaseNotification interface implementada pelo participante.
Devoluções
Uma SinglePhaseEnlistment implementação de interface que descreve o alistamento.
Observações
Os alistamentos numa transação são voláteis; ou seja, não sobrevivem ao fracasso do participante. Além disso, este método apenas sugere ao gestor de transações que escale o controlo, mas a escalada em si não é garantida. Se a escalada falhar, o utilizador não é notificado e a transação é revertida.
O parâmetro promotableSinglePhaseNotification é usado para comunicar ao gestor de transações o resultado da tentativa de comprometer a transação interna do gestor de recursos. Se forem reportados dados inconsistentes, o gestor de transações lança uma exceção. Se um InDoubt resultado for reportado, o gestor da transação procura a notificação de resultado na sua própria inscrição interna e ignora a resposta reportada.
Para mais informações sobre inscrições e escalonamento de uma transação, consulte Escalonamento de Gestão de Transações. Para mais informações sobre PSPE, consulte Otimização Usando Commit de Fase Única e Notificação de Fase Única Promotível.
Aplica-se a
EnlistPromotableSinglePhase(IPromotableSinglePhaseNotification, Guid)
- Origem:
- Transaction.cs
- Origem:
- Transaction.cs
- Origem:
- Transaction.cs
- Origem:
- Transaction.cs
- Origem:
- Transaction.cs
Recruta um gestor de recursos que tem uma transação interna usando um alistamento promocional de fase única (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
Uma IPromotableSinglePhaseNotification interface implementada pelo participante.
- promoterType
- Guid
O tipo de processador de transações distribuído.
Devoluções
Uma SinglePhaseEnlistment implementação de interface que descreve o alistamento.
Observações
Se o valor especificado para o promoterType parâmetro for TransactionInterop.PromoterTypeDtc, a transação deve ser promovida pelo MSDTC e o byte[] retorno do IPromotableSinglePhaseNotification.Promote método deve ser um token de propagação de transação MSDTC.
Se o valor especificado para o promoterType parâmetro nãoTransactionInterop.PromoterTypeDTC for, a transação não será promovida pelo MSDTC, mas sim pela implementação de IPromotableSinglePhaseNotification. Se esta chamada for bem-sucedida, existe um conjunto de operações subsequentes na transação que devolverá um TransactionPromotionException. Estas operações são:
Transaction.EnlistDurableTransactionInterop.GetDtcTransactionTransactionInterop.GetExportCookieTransactionInterop.GetTransmitterPropagationTokenSerialização de um objeto de transação