やや複雑なプログラムを改造しています。リフレクションを使用してメソッドのリストを呼び出す UI は何百もあります。一部のメソッドは、本質的にサード パーティの DLL を呼び出します。一部の DLL は例外をスローします。
明らかに完了したと言うために例外をスローする DLL が 1 つあります。データベースの観点からは、この例外は安全に無視できます。ただし、トランザクションスコープにそれを無視させることはできないようです。または、トランザクションスコープ環境の動作を知りません。
ここまでのロジック
トランザクションスコープの使用が必要
for each item in the methods list..
... lots of code hitting databases.. that works
one of the methods..
using transactionscope suppress
try
dagnamit.dll
catch exception -- this exception I want transactionscope to ignore
end try
transactionscope Completed
end using
... more code .. that works when dagnamit.dll isn't called
but fails when called, reporting can't call a "disposed object: Transaction:
transactionscope Completed
使用を終了する
タイムアウトは問題ではありません。はい、複数のサーバーが関係しています。当然、DLL ソースにはアクセスできません。