Microsoft KB Archive/812775

= HOW TO: Handle a Transaction in the BizTalk AIC =

Article ID: 812775

Article Last Modified on 10/9/2003

-

APPLIES TO


 * Microsoft BizTalk Server 2002 Standard Edition

-



SUMMARY
Each interchange in Microsoft BizTalk Server has its own transaction. A BizTalk Application Integration Component (AIC) can participate in this transaction through COM+ Service. When the AIC experiences an error, you can do one of the following:
 * Option 1

Return an HRESULT error code.

-or-
 * Option 2

Abort the transaction in the AIC and return an HRESULT error code.



MORE INFORMATION
If you use option 1, BizTalk moves the message to the retry queue, and then BizTalk will retry the interchange. If you use option 2, the message immediately moves to the suspended queue and does not enter the BizTalk retry mechanism.

If you decide to abort the transaction in the AIC, install the hotfix that is described in the following Knowledge Base article:

812149 FIX: Transaction Abortion in AIC could Cause Message Stuck in Work Queue

How to Raise an HRESULT Error in Visual Basic
Use the Err.Raise method to make Visual Basic return an HRESULT error. Set the severity parameter to ERROR. To do this, add vbObjectError (-2147221504) to your own custom error number when you call Err.Raise:

Err.Raise vbObjectError + 1000

Visual Basic can raise standard HRESULT COM errors because it supports the ISupportErrorInfo interface that COM requires. When you call the Err.Raise method, Visual Basic does the following:
 * 1) Calls the CreateErrorInfo function to create a COM error object.
 * 2) Provides the error information (such as source and description) to the COM error object.
 * 3) Calls the SetErrorInfo function to provide the object to the client.
 * 4) Returns an HRESULT error to the client. The value is the error number that you specified in the Err.Raise call.

Keywords: kbhowto KB812775

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.