ContextUtil.MyTransactionVote プロパティ
アセンブリ: System.EnterpriseServices (system.enterpriseservices.dll 内)
構文Dim value As TransactionVote value = ContextUtil.MyTransactionVote ContextUtil.MyTransactionVote = value
public: static property TransactionVote MyTransactionVote { TransactionVote get (); void set (TransactionVote value); }
/** @property */ public static TransactionVote get_MyTransactionVote () /** @property */ public static void set_MyTransactionVote (TransactionVote value)
public static function get MyTransactionVote () : TransactionVote public static function set MyTransactionVote (value : TransactionVote)
TransactionVote 値である、Commit または Abort のいずれか。
例外
解説MyTransactionVote が Commit に設定されると、COM+ の consistent ビットが true に設定され、COM+ コンテキストはトランザクションをコミットしようとします。MyTransactionVote が Abort に設定されると、consistent ビットが false に設定され、COM+ コンテキストはトランザクションを中止しようとします。consistent ビットの既定値は、true です。
consistent ビットは、対象トランザクションをコミットするかアボートするかを判断し、done ビットはその処理を確定します。COM+ は、メソッド呼び出しが返されるときに done ビットが true に設定された場合、またはオブジェクトが非アクティブになった場合に consistent ビットを検査します。オブジェクトの consistent ビットは各メソッド内での呼び出しで繰り返し変更できますが、最後の変更だけが有効となります。
使用例MyTransactionVote プロパティを使用してトランザクション ServicedComponent を作成する方法を次のコード例に示します。
<Transaction()> _ Public Class TransactionalComponent Inherits ServicedComponent Public Sub TransactionalMethod(ByVal data As String) ContextUtil.DeactivateOnReturn = True ContextUtil.MyTransactionVote = TransactionVote.Abort ' Do work with data. Return if any errors occur. ' Vote to commit. If any errors occur, this code will not execute. ContextUtil.MyTransactionVote = TransactionVote.Commit End Sub 'TransactionalMethod End Class 'TransactionalComponent
[Transaction] public class TransactionalComponent : ServicedComponent { public void TransactionalMethod (string data) { ContextUtil.DeactivateOnReturn = true; ContextUtil.MyTransactionVote = TransactionVote.Abort; // Do work with data. Return if any errors occur. // Vote to commit. If any errors occur, this code will not execute. ContextUtil.MyTransactionVote = TransactionVote.Commit; } }
[assembly:System::Reflection::AssemblyKeyFile("Transaction.snk")]; [Transaction] public ref class TransactionalComponent: public ServicedComponent { public: void TransactionalMethod( String^ data ) { ContextUtil::DeactivateOnReturn = true; ContextUtil::MyTransactionVote = TransactionVote::Abort; // do work with data ContextUtil::MyTransactionVote = TransactionVote::Commit; } };
/** @attribute Transaction() */ public class TransactionalComponent extends ServicedComponent { public void TransactionalMethod(String data) { ContextUtil.set_DeactivateOnReturn(true); ContextUtil.set_MyTransactionVote(TransactionVote.Abort); // Do work with data. Return if any errors occur. // Vote to commit. If any errors occur, this code will not execute. ContextUtil.set_MyTransactionVote(TransactionVote.Commit); } //TransactionalMethod } //TransactionalComponent
.NET Framework のセキュリティ
プラットフォームWindows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
バージョン情報
参照Weblioに収録されているすべての辞書からContextUtil.MyTransactionVote プロパティを検索する場合は、下記のリンクをクリックしてください。
全ての辞書からContextUtil.MyTransactionVote プロパティ
を検索
- ContextUtil.MyTransactionVote プロパティのページへのリンク