1
プロセス指図:佐賀完了原因分散トランザクション完了エラー
- 佐賀メッセージハンドラはデータ項目を含む第一のメッセージを受信します。
- メッセージハンドラは、それ自身のデータベーストランザクションを持つビジネス・オブジェクトを使用します。
- 項目がOKに更新されている場合は、データベースのトランザクションのコミットとサガが完了します。
- 佐賀メッセージハンドラは、データ項目を含む第2のメッセージを受信します。
- メッセージハンドラは、上記のように、新しいデータベースのトランザクションを開こうとすると例外がスローされます。
エラーメッセージ:
System.Data.SqlClient.SqlException (0x80131904): Distributed transaction completed. Either enlist this session in a new transaction or the NULL transaction.
スタックトレース:
2012-01-27 14:07:47,407 [Worker.9] ERROR
LawCover.LISServices.LISBankAgent.SagaMessageHandler [(null)] - Exception details
System.Data.SqlClient.SqlException (0x80131904): Distributed transaction completed. Either enlist this session in a new transaction or the NULL transaction.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.TdsExecuteTransactionManagerRequest(Byte[] buffer, TransactionManagerRequestType request, String transactionName, TransactionManagerIsolationLevel isoLevel, Int32 timeout, SqlInternalTransaction transaction, TdsParserStateObject stateObj, Boolean isDelegateControlRequest)
at System.Data.SqlClient.SqlInternalConnectionTds.ExecuteTransactionYukon(TransactionRequest transactionRequest, String transactionName, IsolationLevel iso, SqlInternalTransaction internalTransaction, Boolean isDelegateControlRequest)
at System.Data.SqlClient.SqlInternalConnectionTds.ExecuteTransaction(TransactionRequest transactionRequest, String name, IsolationLevel iso, SqlInternalTransaction internalTransaction, Boolean isDelegateControlRequest)
at System.Data.SqlClient.SqlInternalConnection.BeginSqlTransaction(IsolationLevel iso, String transactionName)
at System.Data.SqlClient.SqlConnection.BeginTransaction(IsolationLevel iso, String transactionName)
at System.Data.SqlClient.SqlConnection.BeginTransaction()
at LawCover.LIS.DataAccess.ConnectionManager.BeginTransaction()
at LawCover.LISServices.LISBankAgent.LISMethods.AddCreditCardPaymentSettlementScheduleItemsAndReceiptsIntoLISForCurrentMessages(BankResponseFileProcessed message) in C:\Projects\LIS Improvements\LIS\Source\LISServices\LISBankAgent\LISMethods.cs:line 53
at LawCover.LISServices.LISBankAgent.SagaMessageHandler.Handle(BankResponseFileProcessed message) in C:\Projects\LIS Improvements\LIS\Source\LISServices\LISBankAgent\SagaMessageHandler.cs:line 177
あり上記の流れをカバーするコードのかなり多くがありますが、私は有用であろうものを投稿してうれしいです。
他の投稿への私のコメントを参照してください:http://stackoverflow.com/questions/9028331/why-does-nservicebus-saga-timeout-request-use-wrong-saga-id –