Atlanta Custom Software Development 

 
   Search        Code/Page
 

User Login
Email

Password

 

Forgot the Password?
Services
» Web Development
» Maintenance
» Data Integration/BI
» Information Management
Programming
  Database
Automation
OS/Networking
Graphics
Links
Tools
» Regular Expr Tester
» Free Tools

Reduce COM+ context overhead: activate in the caller's context

Total Hit ( 2680)

Rate this article:     Poor     Excellent 

 Submit Your Question/Comment about this article

Rating


 


Even though you may want to use some COM+ services, it doesn't mean that you have to have a unique context for each and every instance. The root instance, that is, the instance that the client uses, must have a context, but the secondary instances can often co-locate within the first context.

In Component Services Explorer there is a checkbox called "Must be activated in the callers context" that you can check for secondary components. It won't force your instances to be co-located, but you will get an error message, when they can't be.

By the way, in .NET, you can decorate the class with an attribute to get the checkbox selected. In Visual Basic. NET it looks like this:


Public Class MyServicedComponent
  Inherits ServicedComponent

For a component to have its instances co-located, the following must be true:
The COM+ application may not use component level security
The component may not use JIT activation
The component may not use COM+ transactions.
The component may not use events and statistics.
The component may not use synchronization.
The word 'use' above is a bit misleading. What I mean is that those services should be disabled. Since the instances will be co-located in another context and that context might use COM+ transactions, then the secondary instances will participate in the same transactions. In COM+ 1.5, Component Services Explorer helps you to avoid using incompatible settings. If you enable "Must be activated in the callers context", the necessary changes will be made.


Submitted By : Nayan Patel  (Member Since : 5/26/2004 12:23:06 PM)

Job Description : He is the moderator of this site and currently working as an independent consultant. He works with VB.net/ASP.net, SQL Server and other MS technologies. He is MCSD.net, MCDBA and MCSE. In his free time he likes to watch funny movies and doing oil painting.
View all (893) submissions by this author  (Birth Date : 7/14/1981 )


Home   |  Comment   |  Contact Us   |  Privacy Policy   |  Terms & Conditions   |  BlogsZappySys

© 2008 BinaryWorld LLC. All rights reserved.