Summary

The .NET Framework provides many types to support building enterprise systems, defined under the namespace System.EnterpriseServices. The first release of .NET depends on COM+ to provide the needed enterprise services.

A .NET component that uses .NET/COM+ services is called a serviced component. Developing a serviced component is a four-step process:

1.
Create a serviced component class that inherits from a standard class ServicedComponent.

2.
Use declarative attributes on the class to indicate one or more COM+ services that are needed by the class.

3.
Configure the COM+ application by defining one or more assembly-level attributes such as the name of the application, the unique GUID of the application, the services the COM+ application intends to use, and so on.

4.
Register the assembly in the COM+ catalog. This can be done either manually by using the tool regsvcs.exe, programmatically by using the RegistrationHelper class, or automatically when the serviced component is used for the first time. Only strong-named assemblies can be registered in the COM+ catalog.

A client uses a serviced component object just as any other .NET object. The important thing to remember is to dispose the object after its use.

The .NET/COM+ plumbing provides many enterprise services. In this chapter we looked at some frequently used services such as JIT activation, object pooling, role-based security, queued components, and transaction support.

The COM+ infrastructure offers some other services such as synchronization, loosely coupled events, shared properties, and so on, that I haven't covered in this chapter. In particular, I haven't covered COM+ synchronization services, as .NET provides the same service natively. You should be able to use any other COM+ services using the .NET SDK documentation as a reference, combined with your knowledge of serviced components from this chapter. Interested readers may also wish to look at [EWA-01], [And-02], and [Mcc-02] to supplement their knowledge.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
52.15.59.163