Transaction.EnlistPromotableSinglePhase Metodo

Definizione

Inserisce un gestore risorse con una transazione interna che usa un'integrazione PSPE (Promotable Single Phase Enlistment).Enlists a resource manager that has an internal transaction using a promotable single phase enlistment (PSPE).

Overload

EnlistPromotableSinglePhase(IPromotableSinglePhaseNotification, Guid)

Inserisce un gestore risorse con una transazione interna che usa un'integrazione PSPE (Promotable Single Phase Enlistment).Enlists a resource manager that has an internal transaction using a promotable single phase enlistment (PSPE).

EnlistPromotableSinglePhase(IPromotableSinglePhaseNotification)

Inserisce un gestore risorse con una transazione interna che usa un'integrazione PSPE (Promotable Single Phase Enlistment).Enlists a resource manager that has an internal transaction using a promotable single phase enlistment (PSPE).

EnlistPromotableSinglePhase(IPromotableSinglePhaseNotification, Guid)

Inserisce un gestore risorse con una transazione interna che usa un'integrazione PSPE (Promotable Single Phase Enlistment).Enlists a resource manager that has an internal transaction using a promotable single phase enlistment (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

Parametri

promotableSinglePhaseNotification
IPromotableSinglePhaseNotification

Interfaccia IPromotableSinglePhaseNotification implementata dal partecipante.A IPromotableSinglePhaseNotification interface implemented by the participant.

promoterType
Guid

Tipo di elaborazione delle transazioni distribuite.The type of the distributed transaction processor.

Restituisce

Boolean

Implementazione di un'interfaccia SinglePhaseEnlistment che descrive l'integrazione.A SinglePhaseEnlistment interface implementation that describes the enlistment.

Commenti

Se il valore specificato per il promoterType parametro è TransactionInterop.PromoterTypeDtc , la transazione deve essere promossa da MSDTC e l'oggetto byte[] restituito dal IPromotableSinglePhaseNotification.Promote metodo deve essere un token di propagazione delle transazioni MSDTC.If the value specified for the promoterType parameter is TransactionInterop.PromoterTypeDtc, the transaction must be promoted by MSDTC and the byte[] returned from the IPromotableSinglePhaseNotification.Promote method must be an MSDTC transaction propagation token.

Se il valore specificato per il promoterType parametro nonè TransactionInterop.PromoterTypeDTC , la transazione non verrà innalzata di servizio da MSDTC, bensì dall'implementazione del chiamante di IPromotableSinglePhaseNotification .If the value specified for the promoterType parameter is notTransactionInterop.PromoterTypeDTC, the transaction will not be promoted by MSDTC, but rather by the caller's implementation of IPromotableSinglePhaseNotification. Se la chiamata ha esito positivo, nella transazione verrà restituito un set di operazioni successive che restituiscono TransactionPromotionException .If this call is successful, there is a set of subsequent operations on the transaction that will return a TransactionPromotionException. Queste operazioni sono:These operations are:

  • Transaction.EnlistDurable

  • TransactionInterop.GetDtcTransaction

  • TransactionInterop.GetExportCookie

  • TransactionInterop.GetTransmitterPropagationToken

  • Serializzazione di un oggetto transazioneSerialization of a Transaction object

Si applica a

EnlistPromotableSinglePhase(IPromotableSinglePhaseNotification)

Inserisce un gestore risorse con una transazione interna che usa un'integrazione PSPE (Promotable Single Phase Enlistment).Enlists a resource manager that has an internal transaction using a promotable single phase enlistment (PSPE).

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

Parametri

promotableSinglePhaseNotificationnotification
IPromotableSinglePhaseNotification

Interfaccia IPromotableSinglePhaseNotification implementata dal partecipante.A IPromotableSinglePhaseNotification interface implemented by the participant.

Restituisce

Boolean

Implementazione di un'interfaccia SinglePhaseEnlistment che descrive l'integrazione.A SinglePhaseEnlistment interface implementation that describes the enlistment.

Commenti

Gli elenchi in una transazione sono volatili. ovvero, non sopravvivono al fallimento del partecipante.Enlistments in a transaction are volatile; that is, they do not survive the failure of the participant. Inoltre, questo metodo suggerisce solo alla gestione transazioni di eseguire l'escalation del controllo, ma l'escalation non è garantita.In addition, this method only suggests the transaction manager to escalate control, but the escalation itself is not guaranteed. Se l'escalation non riesce, l'utente non riceve una notifica e viene eseguito il rollback della transazione.If escalation fails, the user is not notified and the transaction is rolled back.

Il parametro promotableSinglePhaseNotification viene utilizzato per comunicare con la gestione transazioni il risultato del tentativo di eseguire il commit della transazione interna di Resource Manager.The parameter promotableSinglePhaseNotification is used to communicate to the transaction manager the outcome of attempting to commit the resource manager's internal transaction. Se vengono restituiti dati incoerenti, la gestione transazioni genera un'eccezione.If inconsistent data is reported, the transaction manager throws an exception. Se InDoubt viene restituito un risultato, la gestione transazioni cerca la notifica del risultato nella propria integrazione interna e ignora la risposta segnalata.If an InDoubt outcome is reported, the transaction manager looks for the outcome notification in its own internal enlistment and ignores the reported response.

Per ulteriori informazioni sulle integrazioni e sull'escalation di una transazione, vedere Transaction Management Escalation.For more information on enlistments and escalation of a transaction, please see Transaction Management Escalation. Per altre informazioni su PSPE, vedere Ottimizzazione mediante commit a fase singola e notifica promuovibile a fase singola.For more information on PSPE, see Optimization Using Single Phase Commit and Promotable Single Phase Notification.

Nota Questo metodo usa LinkDemand per impedire che venga chiamato da codice non attendibile; tuttavia, è necessario solo il chiamante immediato per possedere il FullTrust set di autorizzazioni.Note This method uses LinkDemand to prevent it from being called from untrusted code; however, only the immediate caller is required to possess the FullTrust permission set.

Si applica a