Chapter 14
In this chapter, we'll tell you what you have to do to adapt your server applications to Microsoft's first application server, which is Microsoft Transaction Server (MTS). MTS is a server application that runs COM components in Microsoft Windows NT 4. MTS adds to COM components behavior that you don't have to code yourself and that isn't the natural way for a COM component to behave.
A good example of such behavior is the way an MTS component manages transactions. As a developer, you don't have to add any code to such a component for managing transactions. Instead, you install the component in an MTS package, making it an MTS component, and set its transactional attribute to a suitable value. Then you write very simple code to have the component tell MTS when the component has finished its work and whether the work was successful. Exactly how you do all this is the subject of this chapter.
COM+ is the next version of COM. COM+ integrates the services of MTS, making MTS component behavior the natural thing for COM+ components. Programming such components for COM+ is even easier than programming the same components for MTS, which is the main reason we deal with MTS before we deal with COM+ in the next chapter. Everything you do in MTS works equally well in COM+. The opposite is not true.
Today you can find quite a lot of material about MTS. There's not only the official documentation, offered through the Microsoft Developer Network (MSDN), but also several books written by independent authors. Therefore, in this book we feel free to skip the basics of MTS. Instead, we'll just tell you about the code you'll have to write for your components to make them run well under MTS.
Before we go into that, let's list three good books that you might be interested in reading: