문제

Let's assume that I got two ServiceComponent classes which I use like this:

using (var outer = new MyComponent1())
{
    string data;
    using (var inner = new MyComponent2())
    {
        data = inner.GetFromQueue();
    }

    outer.Process(data);
}

Both MyComponent1 and MyComponent2 uses the [AutoComplete] attributes on their methods.

Will MyComponent2 commit when being disposed or will it wait on the transaction started by MyComponent1?

도움이 되었습니까?

해결책

AutoComplete is not required. COM+ works fine as long as you let exceptions propagate up the call stack.

Just make sure that all components are disposed properly or the transactions will timeout.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top