Explanation of COM + and MTS in. NET Framework

Source: Internet
Author: User

"Does. Net Support com? "

"How does COM + and MTS exist on. NET? "

"What is the difference between the. NET component and the COM component? "

COM + still exists in. net. If the applicationProgramIf you really need to use the features of COM + and MTS, you can choose the appropriate technology to work with. NET components. In fact, components are part of any type of solution, whether distributed or non-distributed. Components are very similar to a COM component in the. NET environment. They are all DLL and contain one or more classes that can be instantiated by other applications. The main difference between the two lies in their implementation methods. Here we will not discuss the technical details in detail.

There are multiple options to consider which components to use in the application. Use COM + or MTS. Both COM + and MTS can work with COM components. Therefore, when creating a component, the component must comply with the binary standards of COM and must be registered with the registry before use.

. NET Framework supports COM + and MTS through COM InterOP (COM interoperation) technology. A traditional com application can call a. NET component, and A. NET Component (called. Net assembly in. Net) can also call a COM component. This powerful bidirectional interoperability feature allows you to mix two types of technologies in your applications.

COM + and MTS work together with COM components. When you place. to an MTS package or a COM + application. NET application calls. At this time, you will not realize the existence of COM + and MTS.

Next let's take a look at the performance overhead when using COM InterOP .. . NET and COM use different execution mechanisms (. NET uses the Common Language Runtime when the general language is used, while com does not ).. The. NET component and the COM component are implemented in different standards (. NET components use general type standards, while com uses binary standards ). Mutual calls between the two will increase some performance overhead. In fact, every interoperability call takes about 20 to 30 CPU commands. When you call a class method that exists in COM +, these performance overhead will occur for each call.

If you must use the features of COM + and MTS, store the components in COM + and MTS and confirm that you need all the features. If a component only processes transactions in a single database and is always working in a single database environment, you do not need to use COM + for transaction management, but only use ADO. net. Otherwise, if you need an object pool and transaction processing support between multiple databases, then the application needs COM + and MTS.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.