Chapter 6 -- Working with Configured Components

[Previous] [Next]

Chapter 6

Chapter 1 presented a high-level overview of the fundamental principles of the COM+ programming model. In Chapter 3, we looked more closely at how COM's programming model relies on interfaces, dynamic class loading, and the transparent creation of RPC-based connections between clients and objects. This chapter focuses on a crucial aspect of the programming model that wasn't part of COM in the early days—the principle that platform services are exposed through declarative attributes. The primary goal of this chapter is to demonstrate how this principle affects the way you write code and deploy your components.

Declarative attributes first debuted in MTS, where they provide support for distributed transactions and integrated security. COM+ builds on this idea by exposing additional services through declarative attributes. For readers who are transitioning from MTS to COM+, I've included a few sidebars to illustrate the most significant differences between the two platforms. For those of you who are starting fresh with Microsoft Windows 2000, you don't have to worry about how the details of MTS differ from those of COM+. COM+ has been reengineered to be simpler and less confusing.

In this chapter, we'll examine how COM+ tracks and makes use of attribute settings for components and applications. We'll also look at how COM+ allows you to activate objects from configured components in out-of-process and remote deployment scenarios. I'll cover the fundamentals of creating COM+ components with Visual Basic as well as configuring them to run in a COM+ application.

It's important that you understand how the COM+ runtime uses contexts and interception. The interception scheme allows COM+ to provide the services requested through declarative attributes. In addition to setting attributes, you must also write some code against the COM+ Services Type Library. I'll take some time to show you the most common interfaces and system-supplied objects you'll use when you interact with the COM+ runtime.

At the end of the chapter, we'll take a brief look at how to test and debug configured components created with Visual Basic. You'll see that debugging configured components inside the Visual Basic debugger is relatively easy but that you face one or two limitations. You'll also learn a few other debugging techniques that are more tedious and complicated but provide a better simulation of what really happens when your code runs in production.



Programming Distributed Applications with COM+ and Microsoft Visual Basic 6.0
Programming Distributed Applications with Com and Microsoft Visual Basic 6.0 (Programming/Visual Basic)
ISBN: 1572319615
EAN: 2147483647
Year: 2000
Pages: 70
Authors: Ted Pattison

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net