WebSphere Queue アトミックを更新しようとしていますが、次の問題が発生しています。これは、メソッド呼び出しを using (CommittableTransaction) ブロック内にラップしたために発生します。ブロックの外でメソッド呼び出しを行うと、正常に動作します。これは単に C# 内の Queue への書き込みの制限ですか?
using (CommittableTransaction transScope = new CommittableTransaction())
{
CommittableTransaction.Current = transScope;
try
{
foreach (string agentItem in qSqlContents.Values)
{
// Define a WebSphere MQ message, writing some text in UTF format
MQMessage mqMessage = new MQMessage();
mqMessage.Write(StrToByteArray(agentItem));
// Specify the message options
MQPutMessageOptions pmo = new MQPutMessageOptions();
// MQC.MQPMO_SYNCPOINT = provide transaction support for the Put.
pmo.Options = MQC.MQPMO_SYNCPOINT;
// Put the message on the queue
_outputQueue.Put(mqMessage, pmo);
}
}
catch (Exception)
{
transScope.Rollback();
}
finally
{
transScope.Commit();
}
}
ここで要求されているように、完全な例外情報は次のとおりです。
MQRC_FUNCTION_NOT_SUPPORTED
Exception | System.Exception
base {object} | object
Non-Public members |
_COMPlusExceptionCode = -532459699