Skip navigation.

CORBA Programming Reference

  Previous Next vertical dots separating previous/next from contents/index/pdf Contents View as PDF   Get Adobe Reader

 


TP::close_xa_rm()

Synopsis

Closes the XA resource manager to which the invoking process is linked.

C++ Binding

static void TP::close_xa_rm ();

Arguments

None.

Description

The close_xa_rm() method closes the XA resource manager to which the invoking process is linked. XA resource managers are provided by database vendors, such as Oracle and Informix.

Note: The functionality of this call is also provided by Tobj::TransactionCurrent::close_xa_rm(). The TP::close_xa_rm() method provides a more convenient way for a server application to close a resource manager because there is no need to obtain an object reference to the TransactionCurrent object. A reference to the TransactionCurrent object can be obtained from the Bootstrap object. See TP::bootstrap() for an explanation of how to obtain a reference to the Bootstrap object. For more information about the TransactionCurrent object, see the CORBA Bootstrapping Programming Reference section and Using CORBA Transactions.

This method should be invoked once from the Server::release() method for each server that is involved in global transactions. This includes servers that are linked with an XA resource manager, as well as servers that are involved in global transactions, but are not actually linked with an XA-compliant resource manager.

The close_xa_rm() method should be invoked in place of a close invocation that is specific to the resource manager. Because resource managers differ in their initialization semantics, the specific information needed to close a particular resource manager is placed in the CLOSEINFO parameter in the GROUPS section of the BEA Tuxedo system UBBCONFIG file.

The format of the CLOSEINFO string is dependent on the requirements of the database vendor providing the underlying resource manager. For more information about the CLOSEINFO parameter, see Setting Up a BEA Tuxedo Application and the ubbconfig(5) reference page in the File Formats, Data Descriptions, MIBs, and System Processes Reference. Also, refer to database vendor documentation for information about how to develop and install applications that use the XA libraries.

Return Values

None.

Exceptions

CORBA::BAD_INV_ORDER

There is an active transaction. The resource manager cannot be closed while a transaction is active.

Tobj::RMFailed

The tx_close() call returned an error return code.

Note: Unlike other exceptions returned by the TP Framework, the Tobj::RMFailed exception is defined in tobj_c.h (which is derived from tobj.idl), not TobjS_c.h (which is derived from TobjS.idl). This is because native clients can also open XA resource managers. Therefore, the exception returned is consistent with the exception expected by native client code and by Server::release() if it uses the alternate mechanism, TransactionCurrent::close_xa_rm, which is shared with native clients.

 

Skip navigation bar  Back to Top Previous Next