HighTechTalks DotNet Forums  

ServiceDomain.Enter and ServiceDomain.Leave in multi-threadedapplication.

Dotnet Framework (Component Services) microsoft.public.dotnet.framework.component_services


Discuss ServiceDomain.Enter and ServiceDomain.Leave in multi-threadedapplication. in the Dotnet Framework (Component Services) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Travis
 
Posts: n/a

Default ServiceDomain.Enter and ServiceDomain.Leave in multi-threadedapplication. - 08-21-2009 , 10:20 AM






If I have two threads t1 and t2, and they use ServiceDomain.Enter and
ServiceDomain.Leave, will they potentially participate in the same
distributed transaction? Consider the following sequence of events:

t1: ServiceDomain.Enter
t1: PerformDBOperation
t2: ServiceDomain.Enter
t1: PerformSomeOtherDBOperation
t2: PerformT2DBOperation
t1: ServiceDomain.Leave // Which "ServiceDomain.Enter" does this
correspond to? t1 or t2?

The documentation says "Code that is enclosed between calls to Enter
and Leave runs in its own context and behaves as if it were a method
that is called on an object created within the context." So my
question is "Does 'Code that is enclosed between calls' refer to code
on the same thread, or code in the same executable?

Thanks in advance.
Travis

Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.