Transaction.EnlistDurable Metodo
Definizione
Importante
Alcune informazioni sono relative alla release non definitiva del prodotto, che potrebbe subire modifiche significative prima della release definitiva. Microsoft non riconosce alcuna garanzia, espressa o implicita, in merito alle informazioni qui fornite.
Integra un gestore risorse durevole per partecipare a una transazione.
Overload
| Nome | Descrizione |
|---|---|
| EnlistDurable(Guid, IEnlistmentNotification, EnlistmentOptions) |
Integra un gestore risorse durevole che supporta il commit in due fasi per partecipare a una transazione. |
| EnlistDurable(Guid, ISinglePhaseNotification, EnlistmentOptions) |
Integra un gestore di risorse durevole che supporta l'ottimizzazione del commit a fase singola per partecipare a una transazione. |
Commenti
Note
Questo metodo usa LinkDemand per impedire che venga chiamato da codice non attendibile. Tuttavia, solo il chiamante immediato deve possedere il FullTrust set di autorizzazioni.
EnlistDurable(Guid, IEnlistmentNotification, EnlistmentOptions)
- Origine:
- Transaction.cs
- Origine:
- Transaction.cs
- Origine:
- Transaction.cs
- Origine:
- Transaction.cs
- Origine:
- Transaction.cs
Integra un gestore risorse durevole che supporta il commit in due fasi per partecipare a una transazione.
public:
System::Transactions::Enlistment ^ EnlistDurable(Guid resourceManagerIdentifier, System::Transactions::IEnlistmentNotification ^ enlistmentNotification, System::Transactions::EnlistmentOptions enlistmentOptions);
public System.Transactions.Enlistment EnlistDurable(Guid resourceManagerIdentifier, System.Transactions.IEnlistmentNotification enlistmentNotification, System.Transactions.EnlistmentOptions enlistmentOptions);
member this.EnlistDurable : Guid * System.Transactions.IEnlistmentNotification * System.Transactions.EnlistmentOptions -> System.Transactions.Enlistment
Public Function EnlistDurable (resourceManagerIdentifier As Guid, enlistmentNotification As IEnlistmentNotification, enlistmentOptions As EnlistmentOptions) As Enlistment
Parametri
- resourceManagerIdentifier
- Guid
Identificatore univoco per un resource manager, che deve essere persistente in caso di errore o riavvio di Resource Manager.
- enlistmentNotification
- IEnlistmentNotification
Oggetto che implementa l'interfaccia IEnlistmentNotification per ricevere notifiche di commit in due fasi.
- enlistmentOptions
- EnlistmentOptions
EnlistDuringPrepareRequired se resource manager vuole eseguire operazioni aggiuntive durante la fase di preparazione.
Valori restituiti
Oggetto Enlistment che descrive l'integrazione.
Commenti
I gestori di risorse con un'integrazione durevole devono essere in grado di eseguire il ripristino in caso di errore. Per altre informazioni sul ripristino, vedere Esecuzione del ripristino. Per altre informazioni sulle risorse volatili e durevoli, nonché su come integrare una risorsa, vedere Implementing A Resource Manager. Per altre informazioni su come un gestore risorse risponde alla notifica di commit e prepara il commit in un commit in due fasi, vedere Commiting A Transaction In Single-Phase and Multi-Phase( Commiting A Transaction In Single-Phase and Multi-Phase).
I gestori di risorse inseriti per la partecipazione a una transazione tramite questo metodo ricevono notifiche di commit in due fasi che corrispondono ai metodi definiti nell'interfaccia IEnlistmentNotification .
Si applica a
EnlistDurable(Guid, ISinglePhaseNotification, EnlistmentOptions)
- Origine:
- Transaction.cs
- Origine:
- Transaction.cs
- Origine:
- Transaction.cs
- Origine:
- Transaction.cs
- Origine:
- Transaction.cs
Integra un gestore di risorse durevole che supporta l'ottimizzazione del commit a fase singola per partecipare a una transazione.
public:
System::Transactions::Enlistment ^ EnlistDurable(Guid resourceManagerIdentifier, System::Transactions::ISinglePhaseNotification ^ singlePhaseNotification, System::Transactions::EnlistmentOptions enlistmentOptions);
public System.Transactions.Enlistment EnlistDurable(Guid resourceManagerIdentifier, System.Transactions.ISinglePhaseNotification singlePhaseNotification, System.Transactions.EnlistmentOptions enlistmentOptions);
member this.EnlistDurable : Guid * System.Transactions.ISinglePhaseNotification * System.Transactions.EnlistmentOptions -> System.Transactions.Enlistment
Public Function EnlistDurable (resourceManagerIdentifier As Guid, singlePhaseNotification As ISinglePhaseNotification, enlistmentOptions As EnlistmentOptions) As Enlistment
Parametri
- resourceManagerIdentifier
- Guid
Identificatore univoco per un resource manager, che deve essere persistente in caso di errore o riavvio di Resource Manager.
- singlePhaseNotification
- ISinglePhaseNotification
Oggetto che implementa l'interfaccia ISinglePhaseNotification che deve essere in grado di ricevere notifiche di commit a fase singola e commit in due fasi.
- enlistmentOptions
- EnlistmentOptions
EnlistDuringPrepareRequired se resource manager vuole eseguire operazioni aggiuntive durante la fase di preparazione.
Valori restituiti
Oggetto Enlistment che descrive l'integrazione.
Commenti
I gestori di risorse con un'integrazione durevole devono essere in grado di eseguire il ripristino in caso di errore. Per altre informazioni sul ripristino, vedere Esecuzione del ripristino. Per altre informazioni sulle risorse volatili e durevoli, nonché su come integrare una risorsa, vedere Implementing A Resource Manager.
È consigliabile notare che anche quando l'implementazione di Resource Manager si integra con questo metodo, non è garantito che riceva un singolo commit di fase. Il gestore delle transazioni può comunque inviare notifiche di commit in due fasi. Per altre informazioni sull'ottimizzazione del commit a singola fase, vedere Ottimizzazione tramite commit a fase singola e notifica di singola fase promozionale.