Configuring Tuxedo to Use TimesTen XA

There are tasks to configure Tuxedo to use the TimesTen resource managers.

Introductory Notes and Cautions

The examples in the sections that follow use the direct driver. You can also use the client/server library or driver manager library with the XA extension library.

Information on configuring TimesTen for object-relational mapping frameworks and application servers, including Oracle WebLogic Application Server, is available in the TimesTen Classic Quick Start. See About TimesTen Quick Start and Sample Applications.

Note:

Though TimesTen XA has been demonstrated to work with the Oracle Tuxedo transaction manager, TimesTen cannot guarantee the operation of DTP software beyond the TimesTen implementation of XA.

Update the $TUXDIR/udataobj/RM File

To integrate the TimesTen XA resource manager into the Oracle Tuxedo system, update the $TUXDIR/udataobj/RM file to identify the TimesTen resource manager, the name of the TimesTen resource manager switch (tt_xa_switch), and the name of the library for the resource manager.

On Linux or UNIX platforms, add:

TimesTen:tt_xa_switch:-Ltimesten_home/install/lib -ltten

On Windows platforms, add:

TimesTen;tt_xa_switch;timesten_home\install\lib\ttdv221.lib

Note:

  • The timesten_home/install directory is a symbolic link to installation_dir, the path to the TimesTen installation directory.

  • On Windows, there is only one TimesTen instance, and timesten_home refers to installation_dir\instance.

Build the Tuxedo Transaction Manager Server

Use the buildtms command to build a transaction manager server for the TimesTen resource manager. Then copy the TMS_TT file created by buildtms to the $TUXDIR/bin directory.

On Linux or UNIX platforms, the commands are the following:

buildtms -o TMS_TT -r TimesTen -v
cp TMS_TT $TUXDIR/bin

On Windows platforms, the commands are the following:

buildtms -o TMS_TT -r TimesTen -v
copy TMS_TT.exe %TUXDIR%\bin

Update the GROUPS Section in the UBBCONFIG File

For TMSNAME, specify the TMS_TT file created by the buildtms command.

TMSNAME=TMS_TT

Enter a line for each TimesTen resource manager that specifies a group name, followed by the LMID, GRPNO, and OPENINFO parameters. Your OPENINFO string should look like this:

OPENINFO="TimesTen:DSN=DSNname"

Where DSNname is the name of the database.

Note that on Windows, Tuxedo servers run as user SYSTEM. Add the UID general connection attribute to the OPENINFO string to specify a user other than SYSTEM:

OPENINFO="TimesTen:DSN=DSNname;UID=user"

Do not specify a CLOSEINFO parameter for any TimesTen resource manager.

The following example shows the portions of a UBBCONFIG file used to configure two TimesTen resource managers, GROUP1 and GROUP2.

*RESOURCES
...
*MACHINES
...
ENGSERV LMID=simple
*GROUPS
DEFAULT: TMSNAME=TMS_TT TMSCOUNT=2
GROUP1
    LMID=simple GRPNO=1 OPENINFO="TimesTen:DSN=MyDSN1;UID=MyName"
GROUP2
    LMID=simple GRPNO=2 OPENINFO="TimesTen:DSN=MyDSN2;UID=MyName"
*SERVERS
DEFAULT:
    CLOPT="-A"
simpserv1 SRVGRP=GROUP1 SRVID=1
simpserv2 SRVGRP=GROUP2 SRVID=2

*SERVICES
TOUPPER
TOLOWER

Compile the Servers

Set the CFLAGS environment variable to include the timesten_home/install/include directory that contains the TimesTen include files. Then use the buildserver command to construct an Oracle Tuxedo ATMI server load module.

On Linux or UNIX platforms, enter the following.

export CFLAGS=-Itimesten_home/install
buildserver -o server -f server.c -r TimesTen -s SERVICE

On Windows platforms, enter the following.

set CFLAGS=-Itimesten_home\install
buildserver -o server -f server.c -r TimesTen -s SERVICE

Note:

  • The timesten_home/install directory is a symbolic link to installation_dir, the path to the TimesTen installation directory.

  • On Windows, there is only one TimesTen instance, and timesten_home refers to installation_dir\instance.

The following example shows how to use the buildclient command to construct the client module (simpcl) and the buildserver command to construct the two server modules described in the UBBCONFIG file in the example in the preceding section, Update the GROUPS Section in the UBBCONFIG File.

set CFLAGS=-Itimesten_home\install
buildclient -o simpcl -f simpcl.c
buildserver -v -t -o simpserv1 -f simpserv1.c -r TimesTen -s TOUPPER
buildserver -v -t -o simpserv2 -f simpserv2.c -r TimesTen -s TOLOWER