Blog Stats
  • Posts - 42
  • Articles - 0
  • Comments - 61
  • Trackbacks - 36

 

ServicedComponent

A serviced component is the mechanism that enables COM+ services to be available to .NET Framework classes. This section describes how to configure and register serviced components for access to COM+ services.

Just-in-Time (JIT) Activation, Synchronization, Object Pooling, Transactions, and Shared Property Management are examples of well-known COM+ services that are available for you to use. There are also other COM+ services, such as loosely coupled events, Queued Components, and role-based security, that you can use to write flexible, Web-based applications.

Note   You can modify any Common Language Specification (CLS)–compliant class to use COM+ services. The System.EnterpriseServices namespace provides custom attributes and classes for accessing these services from managed code.

Example: http://www.kbalertz.com/kb_306296.aspx

.Net objects and COM+ components

.NET classes are regular objects. They live in the same process with their
caller, and that's that.

COM+ Components offer some more advanced functionality, for instance:

1) Transactions. Imagine a process that needs to get some data through say 5
objects for processing. If one of them fails, you don't want to "save" the
changes the ones before it have made, and you don't want to process the data
any further. COM+ will allow you to do that ( in simple terms )

2) Clustering/Load Balancing: In cases of high loads, the container can pool
instances of your object, even in different machines, and re-use them. That
saves you a lot of instantiation overhead.

3) Synchronization: You can define how your object is accessed from
different caller threads.

COM+ will give you all that, with an added overhead in coding & complexity.
It takes a while to get acquainted with all it's little idiosyncracies &
tricks. In addition, you can create COM+ components using .NET relatively
easily.

In any case that you absolutely need all the above, COM+ will do the trick
for you. If you want to develop something simple that will not have to
process thousands of requests in 3 milliseconds ( I wish !), go for
plain-old-.NET-objects.

via MSDN and Google groups for reference..


Feedback

No comments posted yet.


Post a comment





 

 

 

Copyright © Vinayak