Condividi tramite


xa_close

 

Applies To: Windows 10, Windows 7, Windows 8, Windows 8.1, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2, Windows Server Technical Preview, Windows Vista

Called by the XA-based transaction manager, or any XA application that wants to close the currently open resource manager in the calling thread of control.

Implemented by: MSDTC
Object This is a helper function, not a method on an object.
Interface Source N/A
Called by: XA-based transaction manager.

Syntax

  
int __cdecl xa_close  (  __in LPSTR xa_info,  int  rmid,  long flags);  

Parameters

xa_info
[in] A string that contains a set of name/value pairs. In each name/value pair, the name is separated from the value by an equals sign, and each pair is separated by a comma. The name/value pairs are shown in the following table.

Name/value pair Description
TM The key that is used to determine the calling TP Monitor.
RMRecoveryGuid The key that is used to determine the Resource Manager Recovery GUID. The GUID must be specified without braces as shown in the following example. RmRecoveryGuid=b3a7647d-8ade-4816-9872-217f01b92071
Timeout The key that is used to determine the time-out value. The time-out value is specified in milliseconds. A value 0 implies no time-out and is the default value. This name/value pair is optional.
BrIso The key that is used to determine whether the XA branch is tightly coupled or loosely coupled. Loose coupling is a scheme for mapping XA Transaction Branches to atomic transactions in which each loosely coupled XA Transaction Branch is treated as operating under a different atomic transaction by the XA Subordinate Transaction Manager. Tight coupling is a scheme for mapping XA Transaction Branches to atomic transactions, in which all tightly coupled XA Transaction Branches with the same XA Global Transaction Identifier are treated as operating under one atomic transaction by the XA Subordinate Transaction Manager Facet. BrIso is an optional name value pair. By default the behavior is loosely coupled. BrIso is not supported on Windows 2000 or Windows XP.

Tight: The expected open string value for branch isolation when the xa branch is tightly coupled.

The following is an example of the xa_info open string.

TM=computerName, RmRecoveryGuid=b3a7647d-8ade-4816-9872-217f01b92071, Timeout=100, BrIso=Tight  

rmid
[in] Resource Manager ID.

flags
[in] Flags defined in [XAOpen – DTP] Chapter 4.4.

Return Values

Return code defined in Chapter 4.5 of [XAOpen – DTP].

Remarks

The transaction manager or XA application must call xa_close only after calling xa_end, and must call xa_close from the same thread that was used to access the resource manager. Once closed, a resource manager cannot participate in a distributed transaction.

Requirements

For an explanation of the requirement values, see Requirements (Component Services).

Platforms: Windows Server 2016, Windows 10, Windows Server 2012 R2, Windows 8.1, Windows Server 2012, Windows 8, Windows Server 2008 R2, Windows 7, Windows Server 2008, Windows Vista

Header: Declared in xa.h