Groups | Blog | Home
all groups > dotnet component services > february 2004 >

dotnet component services : DCOM Optimizations in EnterpriseServices



Brian Tyler
2/25/2004 10:15:20 AM
Short Question:
Is there any way to shut off the "DCOM optimization" that is used when
making a remote call from a .NET client to an ServicedComponent?

Longer Version:

From the recent MSDN article
(http://msdn.microsoft.com/msdnmag/issues/04/03/ExceptionsinCOM/default.aspx
) and from a blog I found searching around
(http://staff.newtelligence.net/clemensv/PermaLink.aspx?guid=189), it
appears that in most cases, Enterprise Services using .NET remoting for the
serialization/deserialization and DCOM for the transport when doing remote
calls to ServicedComponent objects (ie remote .NET COM+ applications).
However, there appears to be an optimization that takes place when the
method's API is simple enough (to quote the blog: "with two exceptions: QC
and calls with isomorphic call sigs").

For example, my test component has two methods:

ShowMessage()

and

ShowMessage(System.Text.StringBuilder b)

The first one is "optimized" and the second one is not.

KEY POINT: When the system is optimized, the LogicalCallContext is dropped.

If I attempt to get data stored in the LCC in the first method, it does not
appear - but it is there in the second method.

For various reasons, I want a consistent behavior where the LCC is
propogated. I am working on the assumption that it can only be done by
somehow turning off this optimization. Unfortunately, I can't get rid of the
LCC nor can I change the APIs. Any other options?

Thanks

Brian

Florin Lazar [MSFT]
3/16/2004 4:53:46 PM
Hi Brian,

First, ServicedComponents don't support (Logical)CallContext.
Second, I personally don't know of any way of disabling what you call "DCOM
optimizations" for very simple methods.

Regards,
--
Florin Lazar - Microsoft - [ http://blogs.msdn.com/florinlazar ]
Please do not send email directly to this alias. This alias is for newsgroup
purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.



[quoted text, click to view]

Brian Tyler
3/17/2004 9:17:32 AM
Thanks. Not the answer I was hoping for but it does at least close that
chapter.

Brian

[quoted text, click to view]

AddThis Social Bookmark Button