• List Price: $39.95
  • Save: $6.04 (15%)
FREE Shipping on orders over $35.
Only 1 left in stock (more on the way).
Ships from and sold by Amazon.com.
Gift-wrap available.
Transactional COM+: Build... has been added to your Cart
+ $3.99 shipping
Used: Very Good | Details
Condition: Used: Very Good
Comment: Book in great condition, lightly read. Get more book for your bucks!
Access codes and supplements are not guaranteed with used items.
Have one to sell? Sell on Amazon
Flip to back Flip to front
Listen Playing... Paused   You're listening to a sample of the Audible audio edition.
Learn more
See this image

Transactional COM+: Building Scalable Applications Paperback – March 16, 2001

ISBN-13: 978-0201615944 ISBN-10: 0201615940 Edition: 1st

Buy New
Price: $33.91
13 New from $14.39 32 Used from $0.01 1 Collectible from $9.96
Amazon Price New from Used from
"Please retry"
$14.39 $0.01
Free Two-Day Shipping for College Students with Amazon Student Free%20Two-Day%20Shipping%20for%20College%20Students%20with%20Amazon%20Student

Spring Books
The Big Books of Spring
See our editors' picks for the books you'll want to read this season, from blockbusters and biographies to new fiction and children's books.
$33.91 FREE Shipping on orders over $35. Only 1 left in stock (more on the way). Ships from and sold by Amazon.com. Gift-wrap available.

Shop the new tech.book(store)
New! Introducing the tech.book(store), a hub for Software Developers and Architects, Networking Administrators, TPMs, and other technology professionals to find highly-rated and highly-relevant career resources. Shop books on programming and big data, or read this week's blog posts by authors and thought-leaders in the tech industry. > Shop now

Product Details

  • Paperback: 464 pages
  • Publisher: Addison-Wesley Professional; 1 edition (March 16, 2001)
  • Language: English
  • ISBN-10: 0201615940
  • ISBN-13: 978-0201615944
  • Product Dimensions: 7.3 x 1.3 x 9 inches
  • Shipping Weight: 2.1 pounds (View shipping rates and policies)
  • Average Customer Review: 4.8 out of 5 stars  See all reviews (10 customer reviews)
  • Amazon Best Sellers Rank: #3,164,403 in Books (See Top 100 in Books)

Editorial Reviews

Amazon.com Review

Aimed at the advanced C++ or Visual Basic programmer, Transactional COM+ explores the inner workings of Microsoft's COM+ components and provides expert tips and strategies for improving performance across the enterprise.

The most remarkable feature of this book is its extremely detailed guide to how COM+ components make use of system resources like contacts, threads, transactions, and objects. After providing in-depth background (and possible bottlenecks for each type of resource), the author provides a number of tips for better performance. Though sometimes densely written, this text will let COM+ component builders think about and get more performance. Snippets of code in C++ and Visual Basic show key concepts. The book also provides a handful of formulas to predict performance on a system using components.

There's plenty of expertise on display in this book for configuring and applying COM+ components using Microsoft Management Console (MMC) tools. Expert information on these tools is hard to find, and the author covers all the bases with options for pooling, transactions, and the like while recommending how to reduce the overhead of your components. You learn how to limit the use of contexts and transactions to improve performance when necessary. Sections on designing scalable applications on today's multitiered distributed architectures will help you plan for your next project. There's also advice for developing and testing distributed applications. A short appendix previews what's different on Microsoft's upcoming .NET platform (which supersedes the COM+ standard, but is backward-compatible).

In all, Transactional COM+ delivers what you need to become a truly advanced COM+ enterprise developer while making you think through performance and scalability issues on the Windows platform. For anyone faced with squeezing more performance out of existing hardware, the in-depth set of best practices and design expertise in this book will help you create leaner, meaner, and more scalable software. --Richard Dragan

Topics covered:

  • Scalability basics in COM+
  • Sharing identities remotely with COM objects
  • The object-per-client model
  • Transactions
  • Processor objects
  • Objects and contexts
  • The COM+ catalog
  • The Global Interface Table (GIT)
  • Optimizing contexts (including raw-configured contexts)
  • In-depth guide to threads and apartments (including activities and apartment types)
  • Object pooling (including reusing objects and guidelines)
  • Just-in-Time (JIT) activation objects
  • Transactions (including local and distributed transactions, transaction streams, and declarative transactions)
  • Isolation levels and performance (including deadlocks and timeouts)
  • Optimistic and pessimistic application-level locking
  • Performance issues with common protocols (HTTP, ASPs, SOAP, and message queuing)
  • Designing scalable systems (including machine and process architecture)
  • Processor and helper objects
  • Managing middle-tier state
  • Performance tips
  • Introduction to .NET used with COM+
  • Pooled connections
  • Debugging
  • Catalog attributes and COM+ administration tools

From the Inside Flap

I am (metaphorically speaking) the man on the cover of this book. Or at least I was four years ago. That's when I first encountered the Microsoft Transaction Server (MTS), the precursor to COM+, and knew that my life as a COM developer had changed forever. I very rapidly discovered that the traditional COM object models I was used to did not work in the MTS environment. That annoyed and fascinated me, so I set out to understand why. At first I was blind in my belief that the MTS team had things all wrong--that its creators did not understand distributed objects at all. Over time, however, I came to see why MTS worked the way it did. The answer, quite simply, was scalability.

MTS was designed to simplify the development of scalable distributed applications, and everything it did was in service of that goal. Viewed in that light, the things MTS did with objects (e.g., not sharing them between clients and deactivating them when their transactions ended) finally made sense to me. While all of this was happening, I was spending a lot of time writing and teaching classes about MTS. I met a number of developers who were struggling the same way I had and who needed help. Like me, they wanted to know how MTS worked, why it worked that way, and, most important, how to design systems that used it. It became clear to me that I had a story to tell and that I had to write this book.

It took a long time. In fact, the writing process took so long that this book isn't about MTS at all, but its descendant, COM+. What Is COM+?

COM+ is a runtime environment that provides services to instances of classes that declare their desire to use the services. For example, if a class declares that it needs causality-based call synchronization, the COM+ runtime makes sure that only one logical thread of action invokes an instance's methods at a time. Or, if a class declares that it needs a distributed transaction, the COM+ runtime makes sure that one is available. COM+-based systems can be written in C++, Visual Basic 6, or any other COM-friendly language today; and the systems in C#, Visual Basic 7, or any other Common Language Runtime-friendly language tomorrow. The COM+ runtime serves as the foundation for many higher-level technologies, including Internet Information Server (IIS), Active Server Pages (ASP), Site Server, Application Center 2000, and Biztalk Server 2000.

COM+ is the cornerstone of a framework of technologies designed to support the development of large-scale distributed applications on the Windows platform. The current, shipping version of the framework is called Windows DNA. The next version is called .NET. Both versions have similar overall architectures that are based on three assumptions about the needs of scalable systems:

They must be accessible by multiple users on internal networks' machines and the Internet, running both browser-based and custom client applications. They must use multiple server machines to handle a high volume of client requests concurrently. They must be robust in the face of failure.

From these assumptions, both frameworks derive three basic principles:

System logic is consolidated on servers, not on clients or in backend databases. Servers can share resources (e.g., database connections), encapsulate database schemas and data access technologies, and offer a tightly controlled security environment. Transactions are at the center of the programming model. They provide a standard model for protecting distributed system state in the face of both concurrent access and system failure. The majority of system state must be kept under transactional control (e.g., in a database). The components in a system communicate using a variety of protocols. Clients typically communicate with servers using HTTP and, increasingly, Simple Object Access Protocol (SOAP); DCOM and Microsoft Message Queue (MSMQ) also are sometimes used. Servers typically communicate with one another using DCOM, MSMQ, and database-specific data access protocols; in addition, sometimes HTTP and SOAP are used.

COM+ is designed to make it easier to develop systems that adhere to these principles. It first assumed this position in the Windows DNA framework, and it retains it as we move forward into the .NET arena. What This Book Is About

Transactional COM+: Building Scalable Applications is about how and why COM+ works and how to build COM+-based applications. You cannot write software to solve a problem unless you understand the problem's essential nature and general solution, as well as the full details of the technology you are using. To that end, in the abstract, this book is about the design of scalable systems. In the concrete, it is about the mechanics of the COM+ runtime, including its use of processes, contexts, causalities, threads, objects, transactions, and communication protocols. What to Expect

Here is a brief description of each chapter in the book.

Chapter 1, Scalability, describes the basic problem of scalability, explains why scalable systems use transactions, and why they do not use traditional object models. It evolves the basic object model used in COM+-based systems.

Chapter 2, Atoms, describes context and causality, the two basic constructs on top of which all of the COM+ runtime services are built. It explains how both constructs relate to objects and how objects can interact with them.

Chapter 3, Mechanics, examines the relationship between contexts and objects, including the context relativity of interface pointers and the overhead that contexts represent in both time and space.

Chapter 4, Threads, introduces apartments and activities, the two higher-level constructs COM+ uses to regulate an object's degree of thread affinity and synchronization, respectively.

Chapter 5, Objects, focuses on object pooling and just-in-time activation (JITA) and how these services change the lifecycle of an object in order to use resources more efficiently. Special attention is paid to deconstructing the myths about the scalability benefits that JITA provides.

Chapter 6, Transactions, explores the mechanics of local and distributed transactions and introduces transaction streams, the higher-level construct COM+ uses to associate objects with distributed transactions.

Chapter 7, Isolation, discusses the basic techniques databases use to stop transactions from interfering with one another while at the same time maximizing concurrency and therefore throughput. Cross-transaction application-level locking schemes are also covered.

Chapter 8, Protocols, examines the integration between the Internet Information Server and COM+, including how ISAPI DLLs and ASP pages relate to contexts, apartments, activities, and transaction streams. In addition, SOAP and MSMQ are covered.

Chapter 9, Design, provides general advice on the design of COM+-based systems. Topics include implementing client tasks using one or more transactions; efficient data access; middle-tier, shared-state, and per-client conversation state management; and the inherent tension between scalability and reusability.

There are also four appendices. Appendix A, Toward .NET, covers the shift to .NET and explains how CLR classes take advantage of COM+. Appendix B, Building a Better Connection Pool, shows how to use object pooling to build a database connection pool that is more flexible than the one provided by OLE DB (and used by ADO). Appendix C, Debugging, provides useful information that makes debugging COM+ code easier. Appendix D, Catalog Attributes and Component Services Explorer Property Pages contains diagrams that map catalog attributes to the user interface elements on Component Services Explorer property pages. What Not to Expect

This book is intended for developers who are designing and implementing COM+-based systems. It assumes that you know how to implement COM classes and how to write a simple ASP page. It also assumes that you know how to use the COM+ and IIS administration tools, the Component Services Explorer (CSE), and the Internet Services Manager, respectively.

There are three COM+ topics that I did not include in this book. First, while this book mentions COM+ role-based security at a couple of points in the narrative where it becomes relevant, it does not include a complete treatment of the topic because it has already been covered in detail in Keith Brown's excellent book, Programming Windows Security.

Second, I chose to ignore the two ancillary COM+ services--Queued Components (QCs) and Loosely Coupled Events (LCEs)--because both mechanisms have significant limitations that render them useless in the general case. Specifically, although QCs can be used to send messages asynchronously into a COM+ server process, they cannot be used to send messages to other processes, that is, back to a client process. Although LCEs make it possible for a publisher to send an event to multiple subscribers without having to know who they are, the default delivery mechanism is a synchronous, blocking method call. You can make LCEs asynchronous by using them with QCs, but then events can only be fired into COM+ server processes. These problems make both services essentially useless for bidirectional client-server communication (they may in some circumstances be useful for server-server communication). In general, I discard both QCs and LCEs in favor of the Microsoft Message Queue, which makes it easy to build equivalent functionality without these unfortunate limitations.

Third, I did not include Compensating Resource Managers (CRMs) because of a lack of both time and space. Rules

This is not a COM+ cookbook. However, I have done my best to provide as much concrete advice as possible to help you understand how to design and implement COM+-based systems. Specific pieces of advice are identified as "Rules."

There are fewer rules in later chapters, a simple reflection of the fact that as topics get more complex there are fewer concrete guidelines on how to do things. The final chapter compensates for this by offering general advice on system design that follows the rules defined earlier. A Note about Source Code

Like COM+, this book is programming language-neutral. It speaks in generic terms whenever possible, but covers language-specific issues when necessary. Most of the sample source code in this book is written in C++, although there are some examples in Visual Basic and JavaScript . I chose C++ partly because it is the only language that allows you to explore all the dark corners of COM+ and partly because it is my personal language of choice (or it was until C# came along). Also, most of the sample code in this book is written in a style I picked up from my friend Chris Sells. It makes heavy use of ATL smart types (e.g., CComPtr, CComBSTR, etc.) and poor-man's exception handling, that is, returning from the middle of functions. Neither my language nor my style should be seen as significant in any way; you should write your COM+ classes in whatever language and style you desire. More Information and Errata

This book includes a Web site, which features sample code and other resources. The URL is develop/books/.

I have done my best to ensure that this book is free of errors. However, given the scope of the work, especially spelunking through the dark corners of the COM+ runtime, there are bound to be some issues. If you find a bug, please post it to the book's Web site, where I'll maintain an up-to-date list of fixes. Acknowledgments

First and foremost, I would like to thank Sarah Shor for sharing her life with me. Never doubt that you come before all technology. Thank you also to the rest of my family for letting me ignore you for so long. And a special thank you to Alan Ewald for always being willing to share his experiences and insights about the design of distributed systems.

Thank you to all of my technical colleagues at DevelopMentor, the incredibly special community in which I am privileged enough to work. By participating in seemingly endless conversations about how COM+ works, you have influenced this work more than you know. A special thank you to Craig Andera, Dan Sullivan, Martin Gudgin, Jon Flanders, Bob Beauchamin, Stu Halloway, Simon Horrell, Keith Brown, and Chris Sells for believing that I had an interesting story to tell. And an incredibly special thank you to Don Box for knowing I had a song in my heart that I needed to sing and for helping me live a rich and fulfilling technical life. Thank you to everyone else at DevelopMentor, too. You have all been very patient with me while I finished this project. Thanks especially to Mike Abercrombie for understanding that my technical work had to come first.

Thank you to Simon Horrell, Dan Sullivan, Bob Beauchamin, Stu Halloway, Martin Gudgin, Alan Ewald, and Mary Kirtland of Microsoft for reviewing chapters and providing feedback. Thank you to all the students, conference attendees, and mailing list participants who have provided feedback about different parts of this story too. Thank you to Joe Long of Microsoft for answering questions about the mechanics of various COM+ runtime services and to Jonathan Hawkins of Microsoft for explaining the relationship between .NET and COM+.

Thank you to David Chappell for writing my foreword and for dressing so well. You give us all something to aspire too.

Thank you to everyone at Addison-Wesley who helped produce this book, including Marilyn Rash for speeding production despite my endless delays; John Wait for explaining some of the inner workings of the technical publishing industry; Carter Shanklin for signing my contract (before leaving Addison-Wesley to pursue other aims); and, most importantly, my editor Kristin Erickson for suffering through this with me and for still being willing to accept my phone calls.

And finally, thank you to Microsoft for creating the technologies that have kept me occupied for the past ten years. COM+ was quite a puzzle; keep them coming.

Customer Reviews

4.8 out of 5 stars
5 star
4 star
3 star
2 star
1 star
See all 10 customer reviews
It explains the basic concepts in a very clear way, and develops them briniantly.
Khaled Hassounah
Any serious VB developer looking to grasp COM+ at this level should be able to at least read C++ and map it over to VB implementation (where applicable).
Sanin Saracevic
If only all computer book authors were as smart, as conscientious, and as intellectually honest as Tim Ewald.

Most Helpful Customer Reviews

15 of 15 people found the following review helpful By "test94" on July 6, 2001
Format: Paperback
...What the hell is the IMarshal3 interface?
The previous reviewer seems to be disappointed that most of the book's sample code is written in C++. Alas, at this time (and until the moment, perhaps in the second release of .NET, when the COM+ component services are implemented in managed code) a significant part of the COM+ infrastructure is simply inaccesible from Visual Basic.
As the title and the preface state, the book's focus is on transactions in the COM+ environment of Windows 2000. Perhaps a list of "requirements", and don't take these too serious, will decrease the number of disappointed readers:
The reader should:
-know the basics of COM
-be comfortable reading C++ code (Although VB or JScript is used now and then)
-know, or read up on, the ATL util classes (CComPtr, CComBSTR)
-same thing for OLE DB (& the ATL consumer wrappers)
What the book does not cover (and again, this is stated in the preface):
-LCE (COM+ Events) and QC
-Security topics
The structure loosly resembles "Essential COM". (that's a compliment :-) )
In my opinion the book delivers on it's promises.
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again
12 of 12 people found the following review helpful By drowninginbooks on November 21, 2001
Format: Paperback
I'm a professional software engineer with twenty years experience, so I've read my share of computer books and dipped into hundreds more.
This is quite simply one of the best computer books I've ever encountered. A classic.
So many computer books are just rehashes of vendor documentation, vague or misleading or wrong in all the same places the vendor documentation is. This book is different. The author clearly has tested every assertion with his own "spelunking" code. He explores every nook and cranny of COM+, and every sentence is carefully considered, clearly stated, and as far as I can tell, absolutely accurate. There's no "hand-waving", no BS, it's just absolutely solid. Crystal clear, razor sharp.
It's a shame, really, that the title is "Transactional" COM+. I had the book for quite a while before I got around to reading it, because the title misled me into thinking that if I wasn't using transactions then it didn't apply to me. Wrong! This book covers COM+ generally, not just transactions, with particular emphasis on the elements of COM+ that are most likely to affect scalability of middle tier applications. Want to know what threading models to use in components called from ASPs? Want to really understand why? This is where to find out.
It's a serious work and really deserves to be studied with some care, but whatever effort you put into studying it will be amply rewarded.
If only all computer book authors were as smart, as conscientious, and as intellectually honest as Tim Ewald. Bravo!
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again
5 of 5 people found the following review helpful By Sanin Saracevic on June 25, 2001
Format: Paperback
Dispelling myths, exposing guts of COM+, testing one's ability to read it in one go, this book has it all.
After reading thousands of pages on COM/COM+ I can safely claim that this is the best COM+ book ever. It is one of best programming books I have read in my 15+ years of serious programming activities.
Tim Ewald is the author that delivers the content on the level expected by professional developers, and he does not treat you like a kid talking about stuff that you can learn in five-minutes browsing sessions on MSDN. He goes deep into COM+ and takes you with him in a fast, challenging pace. This book makes you read it in one night, cover to cover, and after you figure out that you got lost just around chapter 6, you start over and read it again.
"Transactional COM+" is invaluable reading for any serious architect or developer using COM+ as their environment of choice. Examples are clear, and, although written in C++, should not be hard to understand. Any serious VB developer looking to grasp COM+ at this level should be able to at least read C++ and map it over to VB implementation (where applicable).
Thank you, Tim, for this wonderful book.
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again
7 of 8 people found the following review helpful By Richard Anderson on March 31, 2001
Format: Paperback
If you're an architect or developer working on a COM+ application that needs to be scalable, you should read this book. If defines what scalability is, explains how COM+ applications should be written to achieve scalability, and explains in clear and concise detail, COM+ concepts such as apartments, contexts, activities and causality.
A lot of people just don't get COM+. Whether this is due to the absolute trash that is written about COM+ in a lot of others books or MSDN, I don't know. You simply cannot stick all of your components into a COM+ application and expect it to scale. It just doesn't work like that. Even if you think you've got your design right, there are lots of hidden caveats to catch you out. You need to understand what COM+ does with your components, how it manages context, the cost of this management vs traditional non-configured components etc
This book presents a clear picture of how to do things the right way. It starts at a nice high level, and drills down into more detail as the chapters fly past. Further more, it gives you a warm feeling that the author really has worked on real world applications, and not just written `play and experimental' applications. Other books have come close to this (the Richard Grimes and James Conard books sprint to mind) but this is the best to date.
In Summary....
If you think you know COM+ inside out, read this book and see how your understanding of COM+ fits with what Tim has to say. I'm glad to say I fully agreed with nearly every word, and couldn't put the book down. I learnt a couple of things too, so I'll certainly be changing our applications in future releases.
Thank you Tim.
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again

More About the Author

Discover books, learn about writers, read author blogs, and more.

Set up an Amazon Giveaway

Amazon Giveaway allows you to run promotional giveaways in order to create buzz, reward your audience, and attract new followers and customers. Learn more
Transactional COM+: Building Scalable Applications
This item: Transactional COM+: Building Scalable Applications
Price: $33.91
Ships from and sold by Amazon.com