JustInTimeActivationAttribute クラス
アセンブリ: System.EnterpriseServices (system.enterpriseservices.dll 内)

<AttributeUsageAttribute(AttributeTargets.Class, Inherited:=True)> _ <ComVisibleAttribute(False)> _ Public NotInheritable Class JustInTimeActivationAttribute Inherits Attribute
[AttributeUsageAttribute(AttributeTargets.Class, Inherited=true)] [ComVisibleAttribute(false)] public sealed class JustInTimeActivationAttribute : Attribute
[AttributeUsageAttribute(AttributeTargets::Class, Inherited=true)] [ComVisibleAttribute(false)] public ref class JustInTimeActivationAttribute sealed : public Attribute

JIT アクティベーションを指定した場合、COM+ カタログでは無効にしないでください。逆も同様です。JIT アクティベーションを COM+ カタログで有効にした場合は、コンポーネントで指定する必要があります。
COM+ で構成したコンポーネントの JIT アクティベーションは、既定ではオフに設定されます。ただし、自動トランザクションが要求されると自動的に有効になります。

Imports System Imports System.EnterpriseServices Imports System.Windows.Forms <Assembly: ApplicationName("ObjectInspector")> <Assembly: ApplicationActivation(ActivationOption.Server)> <Assembly: System.Reflection.AssemblyKeyFile("Inspector.snk")> <JustInTimeActivation(), ObjectPooling(MinPoolSize := 2, MaxPoolSize := 100, CreationTimeout := 1000)> _ Public Class ObjectInspector Inherits ServicedComponent Public Function IdentifyObject(ByVal obj As [Object]) As String ' Return this object to the pool after use. ContextUtil.DeactivateOnReturn = True ' Get the supplied object's type. Dim objType As Type = obj.GetType() ' Return its name. Return objType.FullName End Function 'IdentifyObject Protected Overrides Sub Activate() MessageBox.Show(String.Format("Now entering..." + vbLf + "Application: {0}" + vbLf + "Instance: {1}" + vbLf + "Context: {2}" + vbLf, ContextUtil.ApplicationId.ToString(), ContextUtil.ApplicationInstanceId.ToString(), ContextUtil.ContextId.ToString())) End Sub 'Activate Protected Overrides Sub Deactivate() MessageBox.Show("Bye Bye!") End Sub 'Deactivate ' This object can be pooled. Protected Overrides Function CanBePooled() As Boolean Return True End Function 'CanBePooled End Class 'ObjectInspector
using System; using System.EnterpriseServices; using System.Windows.Forms; [assembly: ApplicationName("ObjectInspector")] [assembly: ApplicationActivation(ActivationOption.Server)] [assembly: System.Reflection.AssemblyKeyFile("Inspector.snk")] [JustInTimeActivation] [ObjectPooling(MinPoolSize=2, MaxPoolSize=100, CreationTimeout=1000)] public class ObjectInspector : ServicedComponent { public string IdentifyObject (Object obj) { // Return this object to the pool after use. ContextUtil.DeactivateOnReturn = true; // Get the supplied object's type. Type objType = obj.GetType(); // Return its name. return(objType.FullName); } protected override void Activate() { MessageBox.Show( String.Format("Now entering...\nApplication: {0}\nInstance: {1}\nContext: {2}\n", ContextUtil.ApplicationId.ToString(), ContextUtil.ApplicationInstanceId.ToString() , ContextUtil.ContextId.ToString() ) ); } protected override void Deactivate() { MessageBox.Show("Bye Bye!"); } // This object can be pooled. protected override bool CanBePooled() { return(true); } }
#using <System.Windows.Forms.dll> #using <System.Transactions.dll> #using <System.EnterpriseServices.dll> using namespace System; using namespace System::EnterpriseServices; using namespace System::Windows::Forms; [assembly:ApplicationName("ObjectInspector")]; [assembly:ApplicationActivation(ActivationOption::Server)]; [assembly:System::Reflection::AssemblyKeyFile("Inspector.snk")]; [JustInTimeActivation] [ObjectPooling(MinPoolSize=2,MaxPoolSize=100,CreationTimeout=1000)] public ref class ObjectInspector: public ServicedComponent { public: String^ IdentifyObject( Object^ obj ) { // Return this object to the pool after use. ContextUtil::DeactivateOnReturn = true; // Get the supplied object's type. Type^ objType = obj->GetType(); // Return its name. return (objType->FullName); } protected: virtual void Activate() override { MessageBox::Show( String::Format( "Now entering...\nApplication: {0}\nInstance: {1}\nContext: {2}\n", ContextUtil::ApplicationId.ToString(), ContextUtil::ApplicationInstanceId.ToString(), ContextUtil::ContextId.ToString() ) ); } virtual void Deactivate() override { MessageBox::Show( "Bye Bye!" ); } // This object can be pooled. virtual bool CanBePooled() override { return (true); } };
import System.*; import System.EnterpriseServices.*; import System.Windows.Forms.*; /** @assembly ApplicationName("ObjectInspector") */ /** @assembly ApplicationActivation(ActivationOption.Server) */ /** @assembly System.Reflection.AssemblyKeyFile("Inspector.snk") */ /** @attribute JustInTimeActivation() */ /** @attribute ObjectPooling(MinPoolSize = 2, MaxPoolSize = 100, CreationTimeout = 1000) */ public class ObjectInspector extends ServicedComponent { public String IdentifyObject(Object obj) { // Return this object to the pool after use. ContextUtil.set_DeactivateOnReturn(true); // Get the supplied object's type. Type objType = obj.GetType(); // Return its name. return objType.get_FullName(); } //IdentifyObject protected void Activate() { MessageBox.Show(String.Format("Now entering...\nApplication: {0}\n" + "Instance: {1}\nContext: {2}\n", ContextUtil.get_ApplicationId().ToString(), ContextUtil.get_ApplicationInstanceId().ToString(), ContextUtil.get_ContextId().ToString())); } //Activate protected void Deactivate() { MessageBox.Show("Bye Bye!"); } //Deactivate // This object can be pooled. protected boolean CanBePooled() { return true; } //CanBePooled } //ObjectInspector

System.Attribute
System.EnterpriseServices.JustInTimeActivationAttribute


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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


JustInTimeActivationAttribute コンストラクタ ()
アセンブリ: System.EnterpriseServices (system.enterpriseservices.dll 内)




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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


JustInTimeActivationAttribute クラス
JustInTimeActivationAttribute メンバ
System.EnterpriseServices 名前空間
JustInTimeActivationAttribute コンストラクタ

名前 | 説明 |
---|---|
JustInTimeActivationAttribute () | JustInTimeActivationAttribute クラスの新しいインスタンスを初期化します。既定のコンストラクタによってジャスト イン タイム (JIT: Just-In-Time) アクティベーションが有効にされます。 |
JustInTimeActivationAttribute (Boolean) | JustInTimeActivationAttribute クラスの新しいインスタンスを初期化して、false をパラメータとして渡すことにより、オプションでジャスト イン タイム (JIT) アクティベーションを無効にできるようにします。 |

関連項目
JustInTimeActivationAttribute クラスJustInTimeActivationAttribute メンバ
System.EnterpriseServices 名前空間
JustInTimeActivationAttribute コンストラクタ (Boolean)
アセンブリ: System.EnterpriseServices (system.enterpriseservices.dll 内)


トランザクションの TransactionOption 値が Supported、Required、RequiresNew のいずれかである場合は JIT アクティベーションが必要であり、val は false に設定できません。



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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


JustInTimeActivationAttribute クラス
JustInTimeActivationAttribute メンバ
System.EnterpriseServices 名前空間
JustInTimeActivationAttribute プロパティ

名前 | 説明 | |
---|---|---|
![]() | TypeId | 派生クラスに実装されている場合は、この Attribute の一意の識別子を取得します。 ( Attribute から継承されます。) |
![]() | Value | JustInTimeActivationAttribute 設定の値を取得します。 |

JustInTimeActivationAttribute メソッド

名前 | 説明 | |
---|---|---|
![]() | Equals | オーバーロードされます。 ( Attribute から継承されます。) |
![]() | GetCustomAttribute | オーバーロードされます。 アセンブリ、モジュール、型のメンバ、またはメソッド パラメータに適用された指定した型のカスタム属性を取得します。 ( Attribute から継承されます。) |
![]() | GetCustomAttributes | オーバーロードされます。 アセンブリ、モジュール、型のメンバ、またはメソッド パラメータに適用されたカスタム属性の配列を取得します。 ( Attribute から継承されます。) |
![]() | GetHashCode | このインスタンスのハッシュ コードを返します。 ( Attribute から継承されます。) |
![]() | GetType | 現在のインスタンスの Type を取得します。 ( Object から継承されます。) |
![]() | IsDefaultAttribute | 派生クラス内でオーバーライドされたときに、このインスタンスの値が派生クラスの既定値かどうかを示します。 ( Attribute から継承されます。) |
![]() | IsDefined | オーバーロードされます。 指定した型のカスタム属性が、アセンブリ、モジュール、型のメンバ、またはメソッド パラメータに適用されているかどうかを判断します。 ( Attribute から継承されます。) |
![]() | Match | 派生クラス内でオーバーライドされたときに、指定したオブジェクトとこのインスタンスが等しいかどうかを示す値を返します。 ( Attribute から継承されます。) |
![]() | ReferenceEquals | 指定した複数の Object インスタンスが同一かどうかを判断します。 ( Object から継承されます。) |
![]() | ToString | 現在の Object を表す String を返します。 ( Object から継承されます。) |

名前 | 説明 | |
---|---|---|
![]() | Finalize | Object がガベージ コレクションにより収集される前に、その Object がリソースを解放し、その他のクリーンアップ操作を実行できるようにします。 ( Object から継承されます。) |
![]() | MemberwiseClone | 現在の Object の簡易コピーを作成します。 ( Object から継承されます。) |

JustInTimeActivationAttribute メンバ
ジャスト イン タイム (JIT: Just-In-Time) のアクティベーションをオンまたはオフにします。このクラスは継承できません。
JustInTimeActivationAttribute データ型で公開されるメンバを以下の表に示します。

名前 | 説明 | |
---|---|---|
![]() | JustInTimeActivationAttribute | オーバーロードされます。 JustInTimeActivationAttribute クラスの新しいインスタンスを初期化します。 |

名前 | 説明 | |
---|---|---|
![]() | TypeId | 派生クラスに実装されている場合は、この Attribute の一意の識別子を取得します。(Attribute から継承されます。) |
![]() | Value | JustInTimeActivationAttribute 設定の値を取得します。 |

名前 | 説明 | |
---|---|---|
![]() | Equals | オーバーロードされます。 ( Attribute から継承されます。) |
![]() | GetCustomAttribute | オーバーロードされます。 アセンブリ、モジュール、型のメンバ、またはメソッド パラメータに適用された指定した型のカスタム属性を取得します。 (Attribute から継承されます。) |
![]() | GetCustomAttributes | オーバーロードされます。 アセンブリ、モジュール、型のメンバ、またはメソッド パラメータに適用されたカスタム属性の配列を取得します。 (Attribute から継承されます。) |
![]() | GetHashCode | このインスタンスのハッシュ コードを返します。 (Attribute から継承されます。) |
![]() | GetType | 現在のインスタンスの Type を取得します。 (Object から継承されます。) |
![]() | IsDefaultAttribute | 派生クラス内でオーバーライドされたときに、このインスタンスの値が派生クラスの既定値かどうかを示します。 (Attribute から継承されます。) |
![]() | IsDefined | オーバーロードされます。 指定した型のカスタム属性が、アセンブリ、モジュール、型のメンバ、またはメソッド パラメータに適用されているかどうかを判断します。 (Attribute から継承されます。) |
![]() | Match | 派生クラス内でオーバーライドされたときに、指定したオブジェクトとこのインスタンスが等しいかどうかを示す値を返します。 (Attribute から継承されます。) |
![]() | ReferenceEquals | 指定した複数の Object インスタンスが同一かどうかを判断します。 (Object から継承されます。) |
![]() | ToString | 現在の Object を表す String を返します。 (Object から継承されます。) |

名前 | 説明 | |
---|---|---|
![]() | Finalize | Object がガベージ コレクションにより収集される前に、その Object がリソースを解放し、その他のクリーンアップ操作を実行できるようにします。 (Object から継承されます。) |
![]() | MemberwiseClone | 現在の Object の簡易コピーを作成します。 (Object から継承されます。) |

- JustInTimeActivationAttributeのページへのリンク