Registrations are now open. Join us today!
There is still a lot of work to do on the wiki yet! More information about editing can be found here.
Already have an account?

Microsoft KB Archive/253669

From BetaArchive Wiki

Article ID: 253669

Article Last Modified on 8/28/2006



APPLIES TO

  • Microsoft COM+ 1.0



This article was previously published under Q253669

SUMMARY

This article highlights changes in COM and Microsoft Transaction Server introduced by COM+ 1.0.

MORE INFORMATION

Component Services

COM + Queued Components

Queued Components (QC) is a service that makes it easier to develop asynchronous and offline applications. A client can create an instance of a server object in a special way so that the method calls aren't executed but are "recorded" on the client and dispatched transparently by Microsoft Message Queue Server (MSMQ) to the server. Once there, they are "replayed" on the server object and its implementation is executed.

Queued Components provides complete client-side and server-side exception handling. It also integrates the sending and receiving of messages transparently with the sending and receiving of transactions. For additional information, visit the following MSDN Web site:

Loosely Coupled Events (LCE)

Loosely Coupled Events, another new COM+ service, allows you to change the "fan-out" of a method call. In this case, a class supporting a certain interface is marked as an "event class," and other classes are configured to be "subscribers" to this event. Whenever a client (called publisher) calls the interface's methods on the event class, all the subscriber objects will receive the call. Subscribers can be added administratively or at run time.

This service has advanced options, such as allowing for sequential or parallel event firing, run-time subscriptions, subscriber filtering, and fine-grained control of subscribers by a publisher. For additional information, visit the following MSDN Web site:

Object constructors

COM+ allows your object to retrieve a string that you specify from the administrative console when it is being created. In many cases, this feature makes it unnecessary for your component to load registry strings or INI files. It also allows developers to be able to specify their object's behavior administratively, depending on the string contents, without requiring a full recompile. For additional information, visit the following MSDN Web site:

246138 How to use COM+ 1.0 constructor strings from Visual Basic


Object Pooling

Object Pooling allows you to configure a certain object as a shareable resource. Instead of creating and destroying objects every time, COM+ will keep a pool of instances and provide these as required. You can configure minimum and maximum pool sizes and the creation timeout for pooled objects. Objects need to be thread-neutral to be pooled.

Note Microsoft Visual Basic 6.0 cannot produce this type of object.

For additional information, visit the following MSDN Web site:

Configurable Just-in-Time (JIT) Activation

You can configure components in COM+ to support just-in-time activation. If an object is so-configured, its methods can be specified to deactivate the object upon completion. This allows you to specify JIT in a more administrative fashion, and you will not have to call SetComplete/SetAbort (COM+ will deactivate the object and commit the transaction if the method succeeds or abort it if the method returns an error).

Note Objects have to be designed to support JIT, so confirm that before checking the method-level configuration.

For additional information, visit the following MSDN Web site:

ObjectContext and Shared Property Manager Under COM+ 1.0 Services Type Library

With Microsoft Transaction Server (MTS), you typically used two type libraries, one for the MTS objects and interfaces and another one for the shared property manager. In COM+, both are together in the COM+ 1.0 Services Type Library.

For additional information, visit the following MSDN Web site:

Shared Property Managerhttp://msdn.microsoft.com/library/en-us/cossdk/htm/pgservices_spm_5stu.asp


CreateInstance and CreateObject

In COM+, the use of CreateObject (or CoCreateInstance[Ex]) within DLLHOST makes the child object inherit the context of the parent. This means that ObjectContext.CreateInstance is not needed anymore.

SafeRef Is Not Needed Anymore
Unlike MTS, under COM+ you do not have to use SafRef in those strange cases in which an object had to give out a reference to itself.

Transactions

Finer-Grained Configuration of Transaction Timeouts

In MTS, you used to be able to set transaction timeout at the computer level. COM+ allows you to specify a different transaction timeout for objects that require, or require new, transactions. This solves conflicting timeout scenarios of forcing short transactions versus allowing long-running batch stored procedures.

More properties and control from ObjectContext

MTS allowed you to query for transaction status (IsInTransaction) and to call SetComplet/SetAbort/DisableCommit/EnableCommit. COM+ adds a new property to the ObjectContext called ContextInfo. This allows you to retrieve the transaction ID and to obtain a reference to the current ITransaction reference. These can be used for finer-grained transaction control and BYOT. For additional information, visit the following MSDN Web site:

Bring Your Own Transactions (BYOT)

Bring Your Own Transactions allows COM+ components to set a preexisting Microsoft Distributed Transaction Coordinator (DTC) or transaction Internet protocol (TIP) transaction as the transaction property of a new component's context. This allows COM+ components to be associated with transactions whose lifetimes are controlled by a transaction processing (TP) monitor, Object Transaction Service (OTS) or database management system (DBMS). BYOT is also useful in integrating with transactions coordinated by TIP. For additional information, visit the following MSDN Web site:

Compensating Resource Managers (CRM)

The Compensating Resource Managers (CRM) feature of Component Services provides a quick and easy way to integrate application resources with DTC transactions. It is an alternative to developing a full Microsoft Transaction Services resource manager. By developing a pair of COM components and implementing specific interfaces, your application resources can vote on the outcome of the transaction and can receive final notification of the transaction outcome. A durable log is provided so that your application resources can write records that survive failures. Recovery on this log file is provided automatically by the CRM feature when the application restarts. For additional information, visit the following MSDN Web site:

COM+ Compensating Resource Managerhttp://msdn.microsoft.com/library/en-us/cossdk/htm/pgservices_crm_5len.asp


Improved Concurrency, Synchronization and Threading models

COM+ provides new options for concurrency management, synchronization, and threading models. The Thread-Neutral threading model is introduced. It is also possible to do asynchronous calls from Microsoft Visual C++. For additional information, visit the following MSDN Web site:

Security

Method-level role setting

In COM+, you can set the roles that can call into an object at the method-level. This allows for a much more flexible security configuration and makes it easier to distribute functionality among objects. In COM+, roles can be administratively set to allow roles to activate objects, acquire object interfaces, and call methods. For additional information, visit the following MSDN Web site:

More properties on ObjectContext

The ObjectContext exposes a SecurityCallContext object that exposes detailed information on direct callers, creators, authentication levels, and other information for the whole activity stack. It also enables you to check user names, user security identifiers (SIDs), authentication levels and services in run time. For additional information, visit the following MSDN Web site:

Delegation-level impersonation

This allows your object to run under the identity of the caller, even for remote requests. In this way, you can specify Windows NT security to an external resource and the object will be granted or denied access based on the identity using it. For additional information, visit the following MSDN Web site:

Development, administration & deployment

COM+ and DCOMCNFG integration

The DCOM configuration is now integrated with the properties for "My Computer" and is available from the COM+ Administration objects. This makes it unnecessary to switch tools.

Easier debugging with Visual Basic

Issues regarding setting breakpoints, debugging multiple DLLs, and unexpected behavior of Class_Initialize and Class_Terminate have been solved, adding to other features that make Visual Basic COM+ component debugging easy at last. For additional information, visit the following MSDN Web site:

COM+ Visual Basic debugging support contrasted with MTS
http://msdn.microsoft.com/library/en-us/cossdk/htm/pgdebuggingapplications_38mr.asp


More catalog objects

The COM+ Administration objects and collections expose all the new configuration information and tasks. This makes it possible to write all common administrative tasks as scripts, no matter how complex the operations. For additional information, visit the following MSDN Web site:

More status information in MMC

The Microsoft Management Console (MMC) Snap-In for Component Services exposes much more information during run time. Some notable items are application process PID and number of pooled objects.

Dllhost.exe instead of Mtx.exe

The process name for COM+ applications is Dllhost.exe. This differs from MTS, where it was named Mtx.exe.

Other Windows 2000 services

XML Parser and Microsoft Data Access Components 2.5

Windows 2000 includes an XML parser that can be used to create, manipulate, transform, and query XML documents. Windows 2000 also includes Microsoft Data Access Components (MDAC) 2.5. In this new version, ActiveX Data Objects (ADO) has tighter XML integration, better URL support for naming resources, and an improved hierarchical navigation model. For additional information, visit the following MSDN Web site:

Data Access and Storage Developer Center
http://msdn.microsoft.com/data


DTC Performance Monitor counters

These DTC counters allow you to monitor the number of active connections, the number of transactions being processed per second, the number of in-doubt transactions, and so forth, at any moment in time. Since this information is managed by Performance Monitor, you can set alarms, alerts, and notifications for threshold values.

Windows Installer-based "Pull" installation of clients

By correctly configuring Active Directory, you can take advantage of the "Class Store" services Windows 2000 provides. Using these, your clients can install the user interface applications and your component references from scratch or update/fix versions transparently; it all happens when an application calls CreateObject or the application icons are clicked.

Terminal Services as a Remote Administration Tool

You can configure Microsoft Terminal Server on a Windows 2000 server so that remote administration is made easier. Terminal Server can also be configured specifically for this task so that the terminal management does not affect the quality of service of the server. Terminal Services can also be used to control another user's session, enabling joint-administration and helpdesk scenarios. For additional information, visit the following Microsoft Web site:

Using Terminal Services for Remote Administration of the Windows 2000 Server Familyhttp://www.microsoft.com/technet/prodtechnol/win2kts/maintain/tsremote.mspx


For additional information, click the following article number to view the article in the Microsoft Knowledge Base:

232792 How to use the Terminal Services Remote Control Feature


REFERENCES

For additional information, visit the following Microsoft Web sites:

For additional information, click the following article number to view the article in the Microsoft Knowledge Base:

252318 How to search for COM+ Knowledge Base articles


Keywords: kbcompluslce kbcomplusqc kbdtc kbinfo kbsysadmin KB253669