Home Page Icon
Home Page
Table of Contents for
Dedication
Close
Dedication
by Juval Lowy
COM & .NET Component Services
COM and .NET Component Services
Dedication
Foreword
Preface
Scope of This Book
Some Assumptions About the Reader
Definitions and Text Conventions
Other COM+ Books and References
How to Contact Us
Acknowledgments
1. COM+ Component Services
COM+ Component Services
The Component Services Explorer
Hello COM+
Building a COM Component
Creating a COM+ Application
Adding a Component to a COM+ Application
Writing a Test Client
COM+ Configured Components
Applications, DLLs, and Components
Configuring COM+ Applications
COM+ Application Types
COM+ Surrogate Processes
Idle Time Management
Debugging COM+ Applications
Deploying COM+ Applications
Proxy COM+ Applications
Installing and Uninstalling an Exported Application
Summary
2. COM+ Context
Encapsulation via Marshaling in COM
Encapsulation via Interception in COM+
Lightweight Proxies
Assigning Objects to Contexts
The Context Object
The Call Object
Cross-Context Manual Marshaling
The Global Interface Table
The GIT Wrapper Class
Summary
3. COM+ Instance Management
Client Types
Scaling Up with Rich Clients
Scaling Up with Internet Clients
Instance Management and Scaling
Object Pooling
Pooled Object Life Cycle
Configuring Pool Parameters
Pooled Object Design Requirements
Object Pooling and Context
Just-in-Time Activation
How JITA Works
Benefits of Using JITA
Using JITA
JITA and IObjectControl
Combining JITA with Object Pooling
Object Constructor String
COM+ Instance Management Pitfalls
Idle Time Management
Too Large a Minimum Pool Size
Requesting a JITA Object in the Caller’s Context
Failing to Release Pooled Object Data Members
Pooled Objects and Aggregation
Tracking Instance Activity
4. COM+ Transactions
Transaction Basics
Transaction Properties
The Atomic Property
The Consistent Property
The Isolated Property
The Durable Property
Transaction Scenarios
Single Object/Single Resource Transaction
Multiple Objects/Single Resource Transaction
Multiple Objects/Multiple Resources Transaction
COM+ Transactions Architecture
Resource Managers
Transaction Root
The Two-Phase Commit Protocol
The Distributed Transaction Coordinator
Transactions and Context
COM+ Transactions Architecture Benefits
Configuring Transactions
Transaction Disabled
Transaction Not Supported
Transaction Supported
Transaction Required
Transaction Requires New
Transaction Support IDL Extension
Voting on a Transaction
Transactional Object Life Cycle
State-Aware Objects
Transactions and JITA
Collecting Objects’ Votes
The IObjectContext Interface
Method Auto-Deactivation
Object Life Cycle Example
Designing Transactional Components
Designing Transactional Interfaces
Acquiring Resources
Nontransactional Clients
Transactions and Object Pooling
Compensating Transactions
Transaction Execution Time
Tracing Transactions
In-Doubt Transactions
Transaction Statistics
COM+ Transactions Pitfalls
Accessing Nontransactional Resources
Passing Subroot Objects to Clients
Accessing Objects Outside the Transaction
5. COM+ Concurrency Model
Object-Oriented Programming and Multiple Threads
Apartments: The Classic COM Solution
Activities: The COM+ Innovation
Causality-Based Lock
Activities and Contexts
COM+ Configuration Settings
Synchronization Disabled
Synchronization Not Supported
Synchronization Supported
Synchronization Required
Synchronization Requires New
Required Versus Requires New
Activities and JITA
Activities and Transactions
Tracing Activities
The Neutral Threaded Apartment
The NTA and Other COM Threading Models
COM+ and Threading Model
Summary
6. Programming the COM+ Catalog
Why Program the Catalog?
The Catalog Programming Model
Catalog Structure
Interacting with the Catalog
The Catalog Root Object
The ICatalogCollection Interface
The ICatalogObject Interface
Using the Catalog Interfaces
Saving Changes
Object Properties Interdependencies
Features of COMAdminCatalog
The COM+ Catalog and Transactions
Summary
7. COM+ Security
The Need for Security
Basic Security Terms
Security Identity
Authentication
Authorization
Launch Security
Impersonation
Role-Based Security
Configuring Role-Based Security
Role-Based Security Benefits
Designing Role-Based Security
Deploying and Administering Role-Based Security
Securing a Server Application
Configuring the Server Application Identity
Enabling Authorization
Setting the Security Level
Setting the Authentication Level
Authentication = None
Authentication = Connect
Authentication = Call
Authentication = Packet
Authentication = Packet Integrity
Authentication = Packet Privacy
Deciding on the authentication level
Client authentication level compatibility
Setting the Impersonation Level
Impersonation = Anonymous
Impersonation = Identify
Impersonation = Impersonate
Impersonation = Delegate
Securing a Library Application
Both Role-Based Security and Global Authentication
Global Authentication Without Role-Based Security
Role-Based Security Without Global Authentication
Neither Role-Based Security nor Authentication
Programmatic Role-Based Security
Security Boundaries
Advanced COM+ Security
Server-Side Impersonation
Programmatic Client-Side Security
COM+ Security Pitfalls
Machine-Wide Security Settings
Calling CoInitializeSecurity( )
Disabling Changes to the Application Configuration
Avoid Sensitive Work at the Object Constructor
Changing Application Activation Mode
IsCallerInRole( ) Returns TRUE When Security Is Not Enabled
Disabling Application-Level Authorization
Enabling Application-Level Authorization
Summary
8. COM+ Queued Components
Major Benefits of Queued Components
Disconnected Work
Real Life Business Model
Component Availability
MSMQ Participates in Transactions
Auto-Retry Mechanism
Scalability
Workload Buffering
When Should You Use Queued Components?
Queued Components Architecture
The Recorder
The Player
The Listener
Component Services Explorer Configuration
Application Configuration
Queued Component Interface Configuration
Invoking Queued Components on the Client Side
Designing Queued Component Interfaces
Receiving Output from a Queued Component
Queued Component Error Handling
Handling Poison Calls
Queued Component Exception Classes
Client-side exception handling
Server-side exception handling
The MessageMover class
Queued Components and Transactions
Synchronous Versus Asynchronous Components
Changes in Transaction Semantics
Changes in Workflow
Queued Components Security
Queued Calls Authentication
Queued Components and Role-Based Security
Queued Components Security Limitations
Queued Components Pitfalls
MSMQ Setup
Queued Component Client
Visual Basic Persistable Objects
IDispatch Considerations
Queued Component Application Startup
Summary
9. COM+ Event Service
Classic COM Events
COM+ Event Model
The Event Class
Adding an Event Class
Supplying the Event Class Definition
Event Class Interface Design Guidelines
Subscription Types
Adding a Persistent Subscription
Adding a Transient Subscription
Delivering Events
Serial Versus Parallel Publishing
Error Handling
Publishing Order
Event Filtering
Publisher Filtering
Implementing a publisher filter
The CGenericFilter helper class
Parameters-based publisher filtering
Custom subscription properties
Installing a publisher filter
Static association of a publisher filter with an event class
Dynamic association of a publisher filter with an event class
Subscriber-Side Filtering
Persistent subscriber-side filtering
Transient subscriber-side filtering
Distributed COM+ Events
Solution 1: One Machine for All the Subscribers and Event Classes
Solution 2: Machine-Specific Event Classes
Solution 3: COM+ Routing
Asynchronous Events
Asynchronous Publishing
Asynchronous Subscribers
COM+ Events and Transactions
Persistent Subscribers and Transactions
Transient Subscribers and Transactions
COM+ Events and Security
The Event Class and Role-Based Security
Subscribers and Role-Based Security
In-Process Subscribers
Per-User Subscriptions
COM+ Events Limitation
Summary
10. .NET Serviced Components
Developing Serviced Components
.NET Assemblies and COM+ Applications
Registering Assemblies
Specifying Application Name
Understanding Serviced Component Versions
Manual Registration
Dynamic Registration
Programmatic Registration
The ApplicationID Attribute
The Guid Attribute
The ProgId Attribute
Configuring Serviced Components
Application Activation Type
The Description Attribute
Accessing the COM+ Context
COM+ Context Attributes
COM+ Object Pooling
COM+ Just-in-Time Activation
Using IObjectControl
IObjectControl, JITA, and Deterministic Finalization
COM+ Constructor String
COM+ Transactions
Voting on the Transaction
The AutoComplete Attribute
The TransactionContext Object
COM+ Transactions and Nonserviced Components
Web services and transactions
ASP.NET and transactions
COM+ Synchronization
Programming the COM+ Catalog
COM+ Security
Configuring Application-Level Security Settings
Component-Level Access Checks
Adding Roles to an Application
Assigning Roles to Component, Interface, and Method
Verifying Caller’s Role Membership
COM+ Queued Components
Configuring Queued Interfaces
A Queued Component’s Managed Client
Queued Component Error Handling
Queued component exception class
The MessageMover class
COM+ Loosely Coupled Events
Summary
A. The COM+ Logbook
Logbook Requirements
Log File Example
Using the Logbook
Configuring the Logbook
How Does the Logbook Work?
Summary
B. COM+ 1.5
Improved User Interface Usability
Legacy Applications and Components
Legacy Applications
Legacy Components
Disabling Applications and Components
Pausing Applications
Service Activation Type
Improved Queuing Support
Application Pooling and Recycling
Application pooling
Application Recycling
Programmatic Recycling
Application Dump
Application Partitioning
Aliasing Components
Configurable Transaction Isolation Level
Improved Context Activation Setting
Private Components
Web Services in COM+ 1.5
Summary
C. Introduction to .NET
.NET Programming Languages
Packaging .NET Components: Assemblies
Developing .NET Components
Using Namespaces
Using Interfaces
Writing .NET Client-Side Code
.NET as a Component Technology
Simplified Component Development
The .NET base classes
Component inheritance
Component visibility
Attribute-based programming
Component-oriented security
Simplified Component Deployment
Simplified Object Life Cycle Management
Nondeterministic Finalization
COM and Windows Interoperability
Composing Assemblies
Sharing Assemblies
Assembly Metadata
Assembly Manifest
Assembly Files
Index
Colophon
Search in book...
Toggle Font Controls
Playlists
Add To
Create new playlist
Name your new playlist
Playlist description (optional)
Cancel
Create playlist
Sign In
Email address
Password
Forgot Password?
Create account
Login
or
Continue with Facebook
Continue with Google
Sign Up
Full Name
Email address
Confirm Email Address
Password
Login
Create account
or
Continue with Facebook
Continue with Google
Prev
Previous Chapter
COM and .NET Component Services
Next
Next Chapter
Foreword
Dedication
To my wife, Dana
Add Highlight
No Comment
..................Content has been hidden....................
You can't read the all page of ebook, please click
here
login for view all page.
Day Mode
Cloud Mode
Night Mode
Reset