Chapter 16
Upgrading COM+ Components
COM+ services and Microsoft Transaction Server components are the backbone of most major Microsoft Visual Basic business applications. This chapter starts with an introduction to implementing COM+ services in Microsoft .NET and then moves on to describe how to upgrade basic COM+ components. Although the emphasis is on transactional objects and object construction, the information here applies to the upgrading of all kinds of COM+ components. From this chapter you should take away a basic understanding of how COM+ components are implemented in Visual Basic .NET, and you should have an idea of the effort required to upgrade your existing components.
![]() | ![]() |
![]() | This chapter is definitely not for someone who is not familiar with COM+. It makes no attempt to introduce the concepts behind the code. For that, a wealth of resources is available through Microsoft Press publications and the MSDN documentation, both online and included with Visual Basic .NET. |
![]() | ![]() |
COM+ Application Types
To frame the discussion, let s start by taking a look at COM+ applications. According to the Microsoft Developer Network (MSDN), there are three basic types of user-creatable COM+ applications. Each has particular features, advantages, and restrictions that make it appropriate for specific application architectures. The three types are as follows:
Server application A COM+ application that runs in its own process. Server applications can support all COM+ services.
Library application A COM+ application that runs in the process of the client that creates it. More specifically, the components in a library application are always loaded into the process of the creator. Library applications can use role-based security but do not support remote access or queued components.
Application proxy A set of files containing registration information that allows a client to remotely access a server application. When run on a client computer, an application proxy file writes information about the COM+ server application including its CLSID, ProgID, RemoteServerName, and marshaling information to the client computer. The server application can then be accessed remotely from the client computer.
![]() | ![]() |
![]() | Server applications differ from library applications in how they are instantiated. A library application s components are created in the same process as the calling application. A server application s components are created out of process. When you attempt to instantiate an object remotely, it is not possible to create that component in the caller s process; therefore, only server applications are capable of instantiation by remote applications, due to their out-of-process nature. |
![]() | ![]() |
The vast majority of COM+ applications fall into the first two categories, and those will be the focus of the development content in this chapter. The third, application proxy, is a specialization of the server application and can be treated as a logical extension of the discussion contained here.