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 Encina [Table of Contents] Build COBOL runtime
environment

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 TUXEDO

Using the DTM XA Interface with TUXEDO

The following sections explain the application-specific steps you need to take to integrate the XA Interface with TUXEDO.

The application-specific part of the integration involves:

It is assumed that TUXEDO is installed in the $TUXDIR directory and that any resource managers are also installed on the system.

In the following procedures, replace the environment variables with the actual TUXEDO paths as follows: replace $TUXDIR with your actual root directory path, and replace $SYBASE with the path to the DTM XA Interface installation directory.

Table 3-7 provides the Sybase-specific information you need to perform the TUXEDO integration. The TUXEDO Installation Guide discusses this information in "Integrating a Resource Manager With System/T".

Information needed to integrate the TUXEDO System

Type of Information

Sybase Specific

Description

RM name

SYBASE_XA_SERVER

The name of the resource manager in the name element of the xa_switch_t structure.

XA structure name

sybase_TUX_xa_switch

The name of the xa_switch_t structure that contains the resource manager identifier, the flags for the resource manager's capabilities, and the function pointers of the XA functions.

Library name

The library files ct_r, cs_r, comn_r, tcl_r, and intl_r which are located in $SYBASE/$SYBASE_OCS/lib

The list of files needed to support the DTM XA Interface, and a full path name.

Open string contents

See " Open string parameters for DTM XA Interface" in this document for more information..

The format of the information string passed to the functions.

The DTM XA Interface has been fully tested with the reentrant libraries, ct_r, cs_r, comn_r, tcl_r, and intl_r. If you are using the non-reentrant libraries and experience problems, use the reentrant versions of the libraries instead.

See also "XA configuration file for DTM XA Interface" for information on creating an XA configuration file.

Linking

The TUXEDO RM file provides information used by TUXEDO utilities to link TUXEDO servers. Make sure that the RM file contains an appropriate set of specifications for linking Sybase applications.

  1. Use the text editor of your choice to open the $TUXDIR/udataobj/RM file for editing.

  2. Update the file with XA information by adding/verifying entries for Sybase resource managers. For most Sybase applications, including the simprpc.ct sample application, one entry for SYBASE_XA_SERVER is all that you need. If you are going to build and run the rentapp sample, you may want to go ahead and add the second entry for SCRAP_XA_SERVER, as required for rentapp.

Replace $SYBASE/$SYBASE_OCS with the fully qualified path to the Sybase installation directory containing the XA Interface:

SYBASE_XA_SERVER:sybase_TUX_xa_switch:-t -Bstatic -L$SYBASE/$SYBASE_OCS/lib 
-lcobct -lxadtm -lct_r -lcs_r -lcomn_r -ltcl_r -lintl_r -Bdynamic -ldl
SCRAP_XA_SERVER:sybase_TUX_xa_switch:-t -Bstatic -L$SYBASE/$SYBASE_OCS/lib 
-lcobct -lxadtm -lct_r -lcs_r -lcomn_r -ltcl_r -lintl_r -Bdynamic -ldl

Each entry must be a single continuous line.

The cobct libraries are only needed if you are building ESQL/COBOL application servers. If you are not using ESQL/COBOL, you can remove the -lcobct specification.

If you want your TUXEDO servers to load and execute all Sybase libraries dynamically, you can use entries like the following. Dynamic libraries may increase CPU overhead for TUXEDO server execution.

 SYBASE_XA_SERVER:sybase_TUX_xa_switch:-L$SYBASE/$SYBASE_OCS/lib -lxadtm 
-lct_r -lcobct -lcs_r -lcomn_r -ltcl_r -lintl_r
 SCRAP_XA_SERVER:sybase_TUX_xa_switch:-L$SYBASE/$SYBASE_OCS/lib -lxadtm 
-lct_r -lcobct -lcs_r -lcomn_r -ltcl_r -lintl_r

Each entry must be a single continuous line.

You can add a comment line by identifying it with a leading pound sign (#) character.

Setting up the UBBCONFIG file

This section provides specific examples for setting up the TUXEDO UBBCONFIG file with the XA Interface.

For the simprpc.ct sample application, the pubs2 database must be installed on Adaptive Server. Use the installation script in the Adaptive Server directory under scripts/installpubs2.

"Open string parameters for DTM XA Interface" explains the open string in the UBBCONFIG file.

  1. Use the ASCII text editor of your choice to open $SYBASE/$SYBASE_OCS/sample/xa-dtm/tuxedo/simprpc.ct/ubbsimpct for editing. The file is shown here with line numbers to facilitate the discussion:

     1  *RESOURCES
     2  IPCKEY          123456
     3
     4  MASTER          sybsite
     5  MAXACCESSERS    5
     6  MAXSERVERS      5
     7  MAXSERVICES     10
     8  MODEL           SHM
     9
     10 MAXGTT          5
     11
     12 *MACHINES
     13 yourmachine     LMID=sybsite
     14 TUXDIR="$TUXDIR"
     15 APPDIR="$SYBASE/$SYBASE_OCS/sample/xa-dtm/tuxedo/simprpc.ct"
     16 TLOGDEVICE="$SYBASE/$SYBASE_OCS/sample/xadtm/tuxedo/
        simprpc.ct/tuxlog"
     17 TLOGNAME=TLOG
     18 TUXCONFIG="$SYBASE/$SYBASE_OCS/sample/xa-dtm/tuxedo
        /simprpc.ct/tuxconfig"
     19 ULOGPFX="$SYBASE/$SYBASE_OCS/sample/xa-dtm/tuxedo/simprpc.ct/ULOG"
     20
     21 *GROUPS
     22 DEFAULT:        TMSNAME=simprpccttms TMSCOUNT=2
     23
     24 GROUP1          LMID=sybsite    GRPNO=1
     25 OPENINFO="SYBASE_XA_SERVER: -Uuserid1 -Ppassword1 -Nconnection1"
     26
     27 *SERVERS
     28 simpsrv         SRVGRP=GROUP1   SRVID=1
     29
     30 *SERVICES

  2. Replace entries in the file with entries appropriate for your environment as shown in this table:

    Line number

    Entry

    Replace with

    13

    yourmachine

    Replace with the name of the machine that contains the XA Interface installation. Remember that the machine name is case-sensitive.

    14

    $TUXDIR

    Replace with the actual TUXEDO root directory path.

    15, 16, 18, 19

    $SYBASE/$SYBASE_OCS

    Replace with the XA Interface installation directory.

    22

    simprpccttms

    This parameter is specific to the simprpc.ct example. In general, this parameter should relate to the value specified in the -o parameter of the buildtms command described on "Building the TMS".

    25

    Open string parameters

    See "Open string parameters for DTM XA Interface" for more information.

See the TUXEDO Installation Guide for a detailed discussion of the UBBCONFIG file.

Creating the TUXEDO configuration file

Set the $TUXCONFIG environment variable to a value that matches the entry in ubbsimpct by issuing this command:

setenv TUXCONFIG $SYBASE/$SYBASE_OCS/sample/xa-dtm/tuxedo/simprpc.ct/tuxconfig

Create a TUXEDO configuration file from the UBBCONFIG file by executing this command:

$TUXDIR/bin/tmloadcf -y ubbconfig_file_name

For this verification, using the simprpc.ct sample, replace ubbconfig_file_name with ubbsimpct.

Building the TMS

Build the transaction monitor server (TMS) by executing this command:

$TUXDIR/bin/buildtms -r SYBASE_XA_SERVER -o $TUXDIR/bin/output_filetms

where output_file is a name you choose for the transaction monitor server program. It is helpful to append tms to the name as shown here, so it is easily identified. Choose a unique name for the program so that it does not conflict with TMS programs for other resource managers (TMS, TMS_D, and TMS_SQL are reserved).

For the simprpc.ct example verification, the UBBCONFIG file uses simprpccttms, which is line 18 in the table on page 10.

The program is stored in $TUXDIR/bin so that the TUXEDO System/T start program can find it.


Using the DTM XA Interface
with Encina [Table of Contents] Build COBOL runtime
environment