PRB: Error 8004e002 When You Call SetComplete on an MTS Component (286414)
The information in this article applies to:
- Microsoft COM+ 1.0
- Microsoft COM+ 1.5
- Microsoft Transaction Server 2.0
This article was previously published under Q286414 SYMPTOMS
When a method that calls SetComplete returns, you may receive the following error message in Microsoft Visual Basic:
-2147164158 Automation error
The root transaction wanted to commit, but transaction aborted
or the following error message in Microsoft Active Server Pages (ASP):
(0x8004E002)
The root transaction wanted to commit, but transaction aborted
/test/abort.asp, line 5
CAUSE
Microsoft Transaction Server and COM+ check consistency between the SetAbort and SetComplete methods along the call chain. If a transaction is doomed because a non-root component called SetAbort, it is not appropriate to call SetComplete from the root.
For example, suppose that two components (component A and component B) are both set to require a transaction, and suppose that component A is called from an ASP page. Component A calls component B, which calls SetAbort. When control returns to component A, which calls SetComplete, the above-mentioned error is returned to the client. Note that the error is not raised in component A.
RESOLUTION
To resolve this problem, propagate an error back to the root component whenever component B calls SetAbort. For example:
Err.Raise vbObjectError + 1, "Component B", "Transaction Aborted"
STATUS
This behavior is by design.
Modification Type: | Major | Last Reviewed: | 2/20/2002 |
---|
Keywords: | kbDSupport kberrmsg kbprb KB286414 |
---|
|