Configuring Tmax
This appendix describes the Tmax configuration file.
1. Configuration File
The Tmax configuration file enables you to configure Tmax. It is created by a Tmax administrator. This file is used to create a service table and to start Tmax.
The configuration file includes the following sections.
| Section | Description | Required |
|---|---|---|
DOMAIN |
Configures the entire environment for a single independent Tmax system. |
Required |
NODE |
Configures the environment for each node that comprises the DOMAIN section. |
Required |
SVRGROUP |
Configures server groups and databases. |
Required |
SERVER |
Configures servers. |
Required |
SERVICE |
Configures services. |
Required |
GATEWAY |
Configures gateways between domains. |
Optional |
ROUTING |
Configures data-dependent routings. |
Optional |
RQ |
Configures reliable queues. |
Optional |
The name of each section starts with an asterisk (*) (for example, *DOMAIN, *NODE) and must start from the first space of a line. In a section, the definition of each item is separated by a comma (,), which indicates that the definition of items continues.
|
For more information about the Tmax configuration file, refer to Tmax Administration Guide. |
The configuration file is created as a regular text file and compiled using the cfl command. The binary file, created after compilation, is referenced to create a service table and to start Tmax.
cfl -i Tmax_Configuration_File_Name
The following is an example of a Tmax configuration file (items inside angle brackets (< >) can be changed).
*DOMAIN
<resrc_name> SHMKEY = <UNIQUE IPCKEY>,
MAXUSER = 256
*NODE
<uname> TMAXDIR = "<TMAX installed directory>"
APPDIR = "<APPLICATION DIRECTORY>",
PATHDIR = "<path directory>"
*SVRGROUP
<svg_name> NODENAME = <uname> ,
OPENINFO = "Oracle_XA+Acc=P/scott/tiger+SesTm=60"
*SERVER
<svr_name> SVGNAME = <sgrpname> , MIN = 1, MAX = 3
*SERVICE
<svc_name> SVRNAME = <svrname>
1.1. DOMAIN Section
Configures the Tmax system.
*DOMAIN
<resrc_name> SHMKEY = <UNIQUE IPCKEY>,
MAXUSER = 256
| Item | Description |
|---|---|
<resrc_name> |
Unique name for the Tmax system (Domain). The name must be 63 characters or less. |
SHMKEY |
Value to internally allocate shared memory. The value must be unique to the entire system and fall within the range of 32,768 to 262,143. |
MAXUSER |
Maximum number of users that are allowed to concurrently connect to Domain. |
1.2. NODE Section
Configures the environment for each node that comprises DOMAIN.
*NODE
<uname> TMAXDIR = "<TMAX installed directory>"
APPDIR = "<APPLICATION DIRECTORY>",
PATHDIR = "<path directory>"
| Item | Description |
|---|---|
<uname> |
Name up to 63 characters in length. It uses the value returned by the uname –n command. The return values of hostname and "uname -n" must be the same. |
TMAXDIR |
Full path of the Tmax installation directory. |
APPDIR |
Full path of the Tmax application directory. |
PATHDIR |
Full path of the directory for internal communication between Tmax processes. |
1.3. SVRGROUP Section
Configures a group of servers logically related on another. A server group is the basic unit for database utilization, load balancing, and fault tolerance. At least one server group is defined for each server.
*SVRGROUP
<svg_name> NODENAME = <uname> ,
OPENINFO = "Oracle_XA+Acc=P/scott/tiger+SesTm=60",
DBNAME = ORACLE,
TMSNAME = tms_ora
| Item | Description |
|---|---|
<svg_name> |
Server group name up to 63 characters in length. It must be unique in the SVRGROUP section. |
NODENAME |
Name of the node where a server group exists. Since a server group requires specification of a database, the following three items must be specified when a database is used: DBNAME, OPENINFO, and TMSNAME. |
DBNAME |
Database name (for example, ORACLE). |
OPENINFO |
Registers information in Tmax to connect to a database. The information can be up to 256 characters in length and the registration varies depending on the database type.
|
CLOSEINFO |
Registers information to disconnect the server group from a database. The information can be up to 256 characters in length. The registration process varies depending on the database type.
|
TMSNAME |
TMS process name. The name can be up to 63 characters in length. |
1.4. SERVER Section
Configures the application servers.
*SERVER <svr_name> SVGNAME = <sgrpname> , MIN = 1, MAX = 3
| Item | Description |
|---|---|
<svr_name> |
Name of the executable file of the server that provides services. The name can be up to 63 characters in length. |
SVGNAME |
Server group name to which the server process belongs. SVGNAME must be defined in *SVRGROUP. |
CLOPT |
Parameter that processes the options of a command line. A hyphen (—) is used as a delimiter to separate system options from user options. This line is processed by the tpsvrinit() function. |
MIN |
Number of servers that start by default when a user wants to start multiple servers. |
MAX |
Maximum number of servers that can be dynamically started in addition to the default number. |
CONV |
Indicates whether interactive servers are participating in interactive communication (Default value: N). |
1.5. SERVICE Section
Configures services.
*SERVICE <svc_name> SVRNAME = <svrname>
| Item | Description |
|---|---|
<svc_name> |
Name of the function called by a client when specified with a name. The name can be up to 63 characters in length and must be unique. Only services registered in the SERVICE section are supported. |
SVRNAME |
Name of a server that provides specific services. |
2. Makefile
This section describes TMS Makefile for Oracle and Informix.
TMS Makefile for Oracle
The following is an example of a TMS Makefile (Solaris 32-bit) for Oracle.
#
include $(ORACLE_HOME)/precomp/lib/env_precomp.mk
ORALIBDIR = $(LIBHOME)
ORALIB = $(PROLDLIBS) $(LIBCLNTSH)
TARGET = tms_ora
APOBJ = dumy.o
APPDIR = $(TMAXDIR)/appbin
TMAXLIBD= $(TMAXDIR)/lib
TMAXLIBS = -ltms –loras –lsocket -lnsl
all: $(TARGET)
$(TARGET): $(APOBJ)
$(CC) -L$(TMAXLIBD) -o $(TARGET) -L$(ORALIBDIR) $(ORALIB) $(APOBJ)
$(TMAXLIBS)
mv $(TARGET) $(APPDIR)
$(APOBJ):
$(CC) -c dumy.c
#
clean:
-rm -f *.o core $(TARGET)
TMS Makefile for Informix
The following is an example of a TMS Makefile (Solaris 32-bit) for Informix.
TARGET = tms_info
INFOLIBDIR = ${INFORMIXDIR}/lib
INFOELIBDIR = ${INFORMIXDIR}/esql
INFOLIBD = ${INFORMIXDIR}/lib/esql
INFOLIBS = -lifsql -lifasf -lifgen -lifgls -lifos –lnsl –lsocket –laio –elf -lm –ldl
${INFOLIBDIR}/esql/checkapi.o -lifglx -lifxa
TMAXLIBDIR = $(TMAXDIR)/lib
TMAXLIBS = -ltms -linfs
$(TARGET):
$(CC) -o $(TARGET) -L$(TMAXLIBDIR) -L$(INFOLIBD) -L$(INFOLIBDIR)
–L$(INFOELIBDIR) $(TMAXLIBS) $(INFOLIBS)
cp $(TARGET) $(TMAXDIR)/appbin
#
clean:
-rm -f core $(TARGET)