TransactionManager.Reenlist(Guid, Byte[], IEnlistmentNotification) メソッド

定義

トランザクションに永続的な参加要素を再参加させます。

public:
 static System::Transactions::Enlistment ^ Reenlist(Guid resourceManagerIdentifier, cli::array <System::Byte> ^ recoveryInformation, System::Transactions::IEnlistmentNotification ^ enlistmentNotification);
public:
 static System::Transactions::Enlistment ^ Reenlist(Guid manager, cli::array <System::Byte> ^ recoveryInfo, System::Transactions::IEnlistmentNotification ^ notification);
public static System.Transactions.Enlistment Reenlist (Guid resourceManagerIdentifier, byte[] recoveryInformation, System.Transactions.IEnlistmentNotification enlistmentNotification);
public static System.Transactions.Enlistment Reenlist (Guid manager, byte[] recoveryInfo, System.Transactions.IEnlistmentNotification notification);
static member Reenlist : Guid * byte[] * System.Transactions.IEnlistmentNotification -> System.Transactions.Enlistment
static member Reenlist : Guid * byte[] * System.Transactions.IEnlistmentNotification -> System.Transactions.Enlistment
Public Shared Function Reenlist (resourceManagerIdentifier As Guid, recoveryInformation As Byte(), enlistmentNotification As IEnlistmentNotification) As Enlistment
Public Shared Function Reenlist (manager As Guid, recoveryInfo As Byte(), notification As IEnlistmentNotification) As Enlistment

パラメーター

resourceManagerIdentifiermanager
Guid

リソース マネージャーを一意に識別する Guid

recoveryInformationrecoveryInfo
Byte[]

回復情報の追加情報を格納します。

enlistmentNotificationnotification
IEnlistmentNotification

IEnlistmentNotification を実装して通知を受け取るリソース オブジェクト。

戻り値

Enlistment

参加リストを示す Enlistment

例外

recoveryInformation が無効です。

  • または - recoveryInformation 内のトランザクション マネージャー情報が、構成済みのトランザクション マネージャーと一致しません。

  • または - RecoveryInformationSystem.Transactions によって認識されません。

指定した resourceManagerIdentifier に対して、RecoveryComplete(Guid) が既に呼び出されています。 再参加が拒否されました。

resourceManagerIdentifier が、recoveryInformation 内で指定した回復情報の内容と一致しません。

注釈

重要

信頼されていないデータを指定してこのメソッドを呼び出すことは、セキュリティ上のリスクが伴います。 このメソッドは信頼されたデータでのみ呼び出してください。 詳細については、「 すべての入力を検証する」を参照してください。

リソース マネージャーは、リソース障害の後にトランザクション参加要素を再参加させることにより、トランザクションの永続参加リストの解決を容易にします。

この resourceManagerIdentifier パラメーターは、リソース障害が発生した場合にトランザクションの参加要素に一貫してラベルを付けるために使用されます。 メソッドをReenlist呼び出すとき、リソース マネージャーは、最初に参加中にメソッドを呼び出EnlistDurableしたとき、または a がスローされたときに使用されたものと同じものresourceManagerIdentifierTransactionException提供する必要があります。

参加要素がこのメソッドを使用して再参加すると、トランザクションの結果に対応した IEnlistmentNotification のフェーズ 2 のメソッド (つまり、CommitRollback、または InDoubt) が必要に応じて呼び出されます。

参加者が正常に再登録されたら、呼び出 RecoveryComplete して復旧を完了する必要があります。

このメソッドは、リソース マネージャーがエラーから再起動した場合にのみ呼び出す必要があります。 また、2 フェーズ コミットの最初の準備フェーズ中に、リソース マネージャーによってログ記録された未解決トランザクションのみを再参加させる必要があります。 無効な時間にこのメソッドを呼び出した場合、間違った結果が生成される可能性があります。

トランザクション マネージャーが失敗し、Two-Phase コミット プロトコルのフェーズ 1 の参加リストでメソッドを呼び出Preparedした後、リソース マネージャーが短時間だけ復旧を実行した場合、リソース マネージャーは、そのメソッドまたはRollbackコールバックをInDoubt受け取る可能性があります。

回復の詳細については、「回復の実行」を参照してください。

メモ このメソッドは、信頼されていないコードから呼び出されないようにするために使用 LinkDemand します。ただし、アクセス許可セットを持つ FullTrust 必要があるのは直接の呼び出し元のみです。

適用対象

こちらもご覧ください