Skip navigation.

CORBA Programming Reference

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

 


TP::open_xa_rm()

Synopsis

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

C++ Binding

static void TP::open_xa_rm();

Arguments

None.

Exceptions

Tobj::RMFailed

The tx_open() call returned an error return code.

Note: Unlike other exceptions returned by the TP Framework, this exception is defined in tobj_c.h (which is derived from tobj.idl), not in 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.

Description

The open_xa_rm() method opens 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 method is also provided by Tobj::TransactionCurrent::close_xa_rm(). However, TP::open_xa_rm() 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::initialize() method for each server that participates in a global transaction. This includes servers that are linked with an XA resource manager, as well as servers that participate in a global transaction, but are not actually linked with an XA-compliant resource manager.

The open_xa_rm() method should be invoked in place of an open invocation that is specific to a resource manager. Because resource managers differ in their initialization semantics, the specific information needed to open a particular resource manager is placed in the OPENINFO parameter in the GROUPS section of the UBBCONFIG file.

The format of the OPENINFO 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.

Note: Only one resource manager can be linked to the invoking process.

Return Values

None.

 

Skip navigation bar  Back to Top Previous Next