Sybase Technical Library - Product Manuals Home
[Search Forms] [Previous Section with Hits] [Next Section with Hits] [Clear Search] Expand Search

Using the DTM XA Interface
with CICS [Table of Contents] Using the DTM XA Interface
with TUXEDO

XA Interface Integration Guide for CICS, Encina, and TUXEDO Adaptive Server Version 12.5

[-] Chapter 3 Configuring the XA Environment
[-] Using the DTM XA Interface with Encina

Using the DTM XA Interface with Encina

This section describes how to assign an open string and initialize an RM for use with the Encina. See also "XA configuration file for DTM XA Interface" for information on creating an XA configuration file.

Assigning an open string with monadmin create rm

The monadmin create rm command assigns each LRM a user name and password in the form of an open string. The user name and password allow the DTM XA Interface to control a particular connection's access to Adaptive Server resources. See "Open string parameters for DTM XA Interface" for more information about the contents of the open string.

The following shows sample screen contents of a monadmin create rm session:

echo "Creating connection_1 resource manager record"
monadmin delete rm connection_1 >>& demo_conf.log
monadmin create rm connection_1\
-open "-Usa -Psecret -Nconnection_1" \
-close "not used" >>& \
demo_conf.log
if ($status) then
echo "Failed to create lrm_1 resource mgr.";
exit 1;
endif

Your current version of Encina may have additional commands for specifying RMs. For detailed information, see the Encina Monitor System Administrator's Guide and Reference.

You can use Encina enconsole interactive command instead of the shell monadmin command.

Initializing LRMs with mon_RegisterRmi

From within your Encina Monitor application server, you must register each LRM with a call to mon_RegisterRmi. For example:

status = 
mon_RegisterRmi(&sybase_TXS_xa_switch,"connection_1",&
rmiID);
if (status != MON_SUCCESS)
{
fprintf(stderr, "mon_RegisterRmi failed (%s).\n",
mon_StatusToString(status));
bde_Exit(1);
}
fprintf(stderr, "mon_RegisterRmi complete\n");

For each LRM registered with a monadmin create rm command, there must be a mon_RegisterRmi command that initializes the LRM. The rmname specified in the monadmin create rm command must match the rmname in the mon_RegisterRmi command.

See the Encina Monitor Programmer's Guide for:

Linking applications with DTM XA Interface libraries

Link applications with the DTM XA Interface library, libxadtm.a.

Establishing connections

The TM, together with the DTM XA Interface library, establishes connections between applications and RMs in several steps:

  1. An application issues a mon_RegisterRmi function, thereby requesting use of an LRM.

  2. Using information contained in an open string, the TM issues an XA open call to the LRM (configured in the monadmin create rm command) whose name matches that issued in step 1, above.

  3. The TM passes the open string associated with each monadmin create rm command to the DTM XA Interface. The open string contains the LRM name.

  4. The DTM XA Interface looks up the LRM name in the XA configuration file and matches it to an actual RM name--that is, to an actual physical Adaptive Server. The RM name matches an entry in the Adaptive Server interfaces file.

  5. The DTM XA Interface establishes one logical connection to an Adaptive Server for each LRM entry. It then confers on any connection the preconnection properties and capabilities configured for the LRM.


Using the DTM XA Interface
with CICS [Table of Contents] Using the DTM XA Interface
with TUXEDO