Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ServiceDomain.Enter and ServiceDomain.Leave in multi-threaded application.

8 views
Skip to first unread message

Travis

unread,
Aug 21, 2009, 11:20:54 AM8/21/09
to
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

0 new messages