Call context in asp.net C#
What is call context. How it is Used. (i tried to study it from msdn but not开发者_如何学JAVA that much clear.
http://msdn.microsoft.com/en-us/library/w61s16a1%28VS.71%29.aspx
CallContext is a specialized collection object similar to a Thread Local Storage for method calls, and provides data slots that are unique to each logical thread of execution. The slots are not shared across call contexts on other logical threads. Objects can be added to the CallContext as it travels down and back up the execution code path, and examined by various objects along the path.
When a remote method call is made to an object in another AppDomain, the CallContext class generates a LogicalCallContext instance that travels along with the remote call. Only objects that expose the ILogicalThreadAffinative interface and are stored in the CallContext are propagated outside the AppDomain in a LogicalCallContext. Objects that do not support this interface are not transmitted in LogicalCallContext instances with remote method calls.
this will resolve your query:
http://www1.cs.columbia.edu/~lok/csharp/refdocs/System.Runtime.Remoting.Messaging/types/CallContext.html
CallContext vs ThreadStatic
精彩评论