Article ID: 829211 - Last Review: April 19, 2007 - Revision: 1.4 MiniJIT allows just-in-time activated COM+ components to join the context of callerOn This PageSYMPTOMSThis article describes a new Microsoft COM+ feature that is named MiniJIT, and how it can be used to set components with just-in-time (JIT) to be instantiated in the context of the caller. When you use the JIT Activation service in COM+, the COM+ component must join its own context. To allow JIT-activated components to join the context of its caller, MiniJIT is included in the COM+ 1.0 Rollup fix 28. With MiniJIT enabled, a component can take part in JIT activation and can still be activated in the context of its caller. MiniJIT also makes sure that the IObjectControl::Activate method and the IObjectControl::Deactivate method are appropriately called, and that the transaction and the state of the parent (component of the caller) are not affected when the child component calls any of the following methods:
261096
(http://support.microsoft.com/kb/261096/
)
How to activate a COM+ component in the context of its caller
Steps to enable MiniJIT
0x80004024: The specified activation could not occur in the client context as specified. Differences between normal JIT and MiniJIT
MORE INFORMATIONContexts, which are specific reference entities where objects reside, were introduced in COM+ 1.0. In Microsoft Transaction Server (MTS), the most specific reference entity
was an Apartment. In COM+, more than one context can be in an Apartment. Two components that are in the same Apartment can reside in two different contexts. Any calls between these two components are marshaled if they do not reside in the same context. The marshaling process can introduce a performance overhead based on the number of new contexts that are created, cross-context calls that are made, and the type and the amount of data that is transferred in those calls. Contexts were introduced in COM+ to provide interception logic for COM+ features. Any object that uses interception-based COM+ services has its own context.
For more information about Contexts and COM+ threading models, visit the following Microsoft Developer Network (MSDN) Web site: http://msdn2.microsoft.com/en-us/library/ms809826.aspx
(http://msdn2.microsoft.com/en-us/library/ms809826.aspx)
Because the services that are set on a component and its package may end up creating a new context for that component, every call that is made to such a component from other components outside its context must cross the context and must be marshaled. If a component in a DLL is registered with COM but does not belong to any COM+ package, it will be invoked in the context of the caller component. This component is an unconfigured component. Calls to this component do not cause the overhead of cross-context marshaling. A component that belongs to a COM+ package can be made to instantiate in the context of the caller by disabling the COM+ services that requires interception. These are raw-configured components. For additional information, click the following article number to view the article in the Microsoft Knowledge Base: 261096
(http://support.microsoft.com/kb/261096/
)
How to activate a COM+ component in the context of its caller
Raw-configured components do not cause the overhead of cross-context marshaling.
| Article Translations
|
Back to the top
