[Top] [Previous Page] [Next Page] [Bottom]



Chapter 3. Creating a Configuration File

Configuring each BEA TUXEDO application is a central task of the administrator. By configuring a file, you are describing your application using a set of parameters that the software interprets to create a runnable application.

This chapter discusses the following topics:

What Is the Configuration File?

An application consists of four basic parts:

This section discusses the configuration file.

Two Forms of the Configuration File

Contents of the Configuration File

At its maximum, a configuration file can consist of eight sections. At its minimum, it must contain three required sections:

The file must also contain a minimum of nine parameters. There are 80 different parameters, and in all sections but the first, there can be multiple entries, each with its own selection of parameters. In all sections other than RESOURCES, the first section, you can use a DEFAULT parameter to specify parameters that repeat from one entry to the next.

Setting Domain-wide Parameters

This section explains how to set RESOURCES parameters that control the application as a whole. Some of these parameters serve as system-wide defaults and can be overridden on a per-machine basis in the MACHINES section.

Identifying Information in the RESOURCES Section

The RESOURCES section is a required section and must appear as the first section in the configuration file. Information in this section includes the following:

Some of these parameters serve as system-wide defaults (UID, GID, PERM, MAXACCESSERS, and MAXCONV) and can be overridden on a per-machine basis. For more information about the ubbconfig(5) reference page, see Section 5 of the BEA TUXEDO Reference Manual.

Description of Parameters in a Sample RESOURCES Section

The following table provides sample parameters and values in the RESOURCES section of a configuration file for a BEA TUXEDO application.

Parameter Value Meaning
IPCKEY 39211 A number greater than 32769 unique to this application on this system.
UID 0 The user ID of the BEA TUXEDO administrator.

Note: On Windows NT, this must be set to 0.

GID 1 The group ID of other.

Note: On Windows NT, this must be set to 0.

PERM 0660 Allows read/write access to those in the group of the administrator.
MAXACCESSERS 15 Allows up to 15 processes to be run at this site.
MAXSERVICES 25 Allows up to 25 services to be advertised at all sites.
MASTER SITE1, SITE2 Specifying LMID SITE1 means the machine is the master. If LMID SITE2 is specified, the machine is the backup.
MODEL MP This application has more than one machine in the configuration.
OPTIONS LAN, MIGRATE This is a networked application; servers can be migrated to alternate processors.
SECURITY APP_PW This is a secure application; clients are required to supply a password to join.
AUTHSVC "AUTHSVC" In addition to the password, clients must pass authentication from a service called "AUTHSVC".
NOTIFY DIPIN Clients receive unsolicited messages by dip-in.
SYSTEM_ACCESS PROTECTED, NO _OVERRIDE The application code does not attach to shared memory. (This cannot be changed.)
LDBAL Y Indicates that load balancing is on.

Sample RESOURCES Section

RESOURCES
IPCKEY         39211
UID            0
GID            1
PERM           0660
MAXACCESSERS   75
MAXSERVERS     40
MAXSERVICES    55
MASTER         SITE1, SITE2
MODEL          MP
OPTIONS        LAN, MIGRATE
SECURITY       APP_PW
AUTHSVC        "AUTHSVC"
NOTIFY         DIPIN
SYSTEM_ACCESS  PROTECTED, NO_OVERRIDE
LDBAL          Y

Setting the Address of Shared Memory

You set the address of shared memory using the IPCKEY parameter. This parameter is used by the BEA TUXEDO system to allocate application IPC resources such that they may be located easily by new processes joining the application. This key and its variations are used internally to allocate the Bulletin Board, message queues, and semaphores that must be available to new application processes. In a single processor mode, this key names the Bulletin Board; in a multiprocessor mode, this key names the message queue of the DBBL.

Characteristics of the IPCKEY Parameter

The IPCKEY parameter has the following characteristics:

Identifying the Master Machine

You must specify a master machine for all configurations (MASTER). The master machine controls the booting and administration of the entire application. This machine is specified as a Logical Machine Identifier (LMID). This is an alphanumeric name chosen by the administrator. (LMIDs are discussed further in the section "Configuring Machines" in this chapter.)

Two LMIDs are specified if migration of the master site is to be allowed. If it is necessary to bring down the master site without shutting down the application, it is necessary to specify the backup master site.

Characteristics of the MASTER Parameter

The MASTER parameter has the following characteristics:

Setting the Application Type

Among the architectural decisions needed for a BEA TUXEDO application are the following:

The MODEL parameter specifies whether an application runs on a single processor. It is set to SHM for uniprocessors and also for multiprocessors with global shared memory. A MODEL value of MP is used for multiprocessors that do not have global shared memory, as well as for networked applications. This is a required parameter.

The OPTIONS parameter is a comma-separated list of application configuration options. Two available options are LAN (indicating a networked configuration) and MIGRATE (indicating that application server migration is allowed).

Characteristics of the MODEL and OPTIONS Parameters

The MODEL and OPTIONS parameters have the following characteristics.

Parameter Characteristics
MODEL It is a required parameter.

A value of SHM indicates a single machine with global shared memory.

A value of MP indicates multiple machines or a nonglobal shared memory multiprocessor.

OPTIONS It is a comma-separated list of application configuration options.

A value of LAN indicates a local area network.

A value of MIGRATE enables server migration.

In the sample RESOURCES section, model is MP; options is set to LAN and MIGRATE.

Note: No OPTIONS are specified for the SHM model.

Defining Access Control

You can provide basic access to a BEA TUXEDO application using three parameters: UID, GID, and PERM:

Characteristics of the UID, GID, and PERM Parameters

The UID, GID, and PERM parameters have the following characteristics.

Parameter Characteristics
UID The user ID of the administrator.

The default is the ID of the person who runs tmloadcf(1).

Example: UID=3002

On Windows NT, this value is always 0.

GID The group ID of the administrator.

The default is the ID of the person who runs tmloadcf(1).

Example: GID=100

PERM The permissions for access to IPC structures.

The default is 0666.

Example: PERM=0660

On Windows NT, this value is always 0.

Note: You can overwrite values on remote machines.

Defining IPC Limits

Because most IPC and Shared Memory Bulletin Board tables are statically allocated for speedy processing, it is important to tune them correctly. If they are sized too generously, memory and IPC resources are consumed to excess; if they are set too small, the process fails when the limits are eclipsed.

The following tunable parameters related to IPC sizing are currently available in the RESOURCES section:

The cost incurred by increasing MAXACCESSERS is one additional semaphore per site per accesser. There is a small fixed semaphore overhead for system processes in addition to that added by the MAXACCESSERS value. The cost of increasing MAXSERVERS and MAXSERVICES is a small amount of shared memory that is kept for each server, service, and client entry, respectively. The general idea for these parameters is to allow for future growth of the application. It is more important to scrutinize MAXACCESSERS.

Note: Two additional parameters, MAXGTT and MAXCONV, affect shared memory.

Characteristics of MAXACCESSERS, MAXSERVERS, and MAXSERVICES Parameters

The MAXACCESSERS, MAXSERVERS, and MAXSERVICES parameters have the following characteristics.

Parameter Characteristics
MAXACCESSERS Number of processes on the site that is running the most processes.

You can overwrite the value on a per-machine basis in the MACHINES section.

The cost is one additional semaphore per accesser.

MAXSERVERS Maximum number of server processes in an application (sum of all sites).

The cost is a small amount of shared memory.

MAXSERVICES Maximum number of BEA TUXEDO services advertised in the application (sum of all sites).

The cost is a small amount of shared memory.

Default is 100.

Enabling Load Balancing

You can control whether a load balancing algorithm is used on the BEA TUXEDO system as a whole. Using load balancing, a load factor is applied to each service within the system, and you can track the total load on every server. Every service request is sent to the qualified server that is least loaded.

This algorithm, although effective, is expensive and should be used only if it is needed. It is needed only when a service is offered by servers that use more than one queue. Services offered by only one server, or by servers in an MSSQ (multiple server single queue) set do not need load balancing. Their LDBAL parameter should be set to N. In other cases, you may want to set LDBAL to Y.

If LDBAL is set to N and multiple queues offer the same service, the first available queue is selected.

If LDBAL is set to Y and the application is networked, the TMNETLOAD environment variable can be used to give preference to local sites.

Characteristics of the LDBAL Parameter

The LDBAL parameter has the following characteristics:

Setting Buffer Type and Subtype Limits

You can control the number of buffer types and subtypes allowed in the application with the MAXBUFTYPE and MAXBUFSTYPE parameters, respectively. The current default for MAXBUFTYPE is 16. Unless you are creating many user-defined buffer types, you can omit MAXBUFTYPE. However, if you intend to use many different VIEW subtypes, you may want to set MAXBUFSTYPE to exceed its current default of 32.

Characteristics of the MAXBUFTYPE and MAXBUFSTYPES Parameters

The MAXBUFTYPE and MAXBUFSTYPES parameters have the following characteristics.

Parameter Characteristics
MAXBUFTYPE Maximum number of buffer types allowed in the system.

Use only if you create 8 or more user-defined buffer types.

Default is 16.

Example: MAXBUFTYPE 20

MAXBUFSTYPE Maximum number of buffer subtypes allowed in the system.

Default is 32.

Example: MAXBUFSTYPE 40

Setting the Number of Sanity Checks and Blocking Timeouts

You can set the number of times the administrative server (BBL) will periodically check the sanity of servers local to its machine. In addition, you can set the number of timeout periods for blocking messages, transactions, and other system activities.

You use the SCANUNIT parameter to control the granularity of such checks and timeouts. Its value (in seconds) can be a positive multiple of 5. Its default is 10.

You use the SANITYSCAN parameter to specify how many SCANUNITs elapse between sanity checks of the servers. It must not be set so that SANITYSCAN * SCANUNIT exceeds 300; its current default is set so that SANITYSCAN * SCANUNIT is approximately 120 seconds.

Example: Setting Sanity Checks and Timeouts

A SCANUNIT of 10 and a BLOCKTIME of 3 allows 30 seconds before the client application times out. The BLOCKTIME default is set so that BLOCKTIME * SCANUNIT is approximately 60 seconds. The value of BLOCKTIME is the total of the following times:

Characteristics of the SCANUNIT, SANITYSCAN, and BLOCKTIME Parameters

The SCANUNIT, SANITYSCAN, and BLOCKTIME parameters have the following characteristics.

Parameter Characteristics
SCANUNIT Establishes granularity of check intervals and timeouts.

Value must be multiples of 5 seconds.

Example: SCANUNIT 10

If not set, the default is 10.

SANITYSCAN Frequency that the BBL checks the server (in SCANUNIT intervals).

SCANUNIT * SANITYSCAN must not exceed 300.

If not set, the default is such that SCANUNIT * SANITYSCAN is approximately 120 seconds.

BLOCKTIME Timeout for blocking messages.

SCANUNIT * BLOCKTIME must not exceed 32767.

If not set, the default is such that SCANUNIT * BLOCKTIME is approximately 60 seconds.

Setting Conversation Limits

You can specify the maximum number of conversations on a machine with the MAXCONV parameter.

Characteristics of the MAXCONV Parameter

The MAXCONV parameter has the following characteristics:

Setting the Security Level

You can set the following three levels of security:

Characteristics of the SECURITY and AUTHSVC Parameters

The SECURITY and AUTHSVC parameters have the following characteristics.

Parameter Characteristics
Security Accepted values are: NONE (default), APP_PW, USER_AUTH, ACL, and MANDATORY_ACL.

Default is NONE.

Example: SECURITY APP_PW

AUTHSVC The name of the authentication service.

SECURITY APP_PW must be specified.

Default is no authentication service.

Client authentication with Kerberos is possible.

Example: AUTHSVC ``AUTHSVC''

Setting Parameters of Unsolicited Notification

You can set the default method for clients to receive unsolicited messages using the NOTIFY parameter. The client, however, can override this choice in the TPINIT structure when tpinit() is called.

Following are three possible methods:

Two types of signals can be generated: SIGUSR1 and SIGUSR2. The USIGNAL parameter allows the administrator to choose the type of signal. The default is SIGUSR2. In applications that choose notification by signals, any MS-DOS client workstations are switched automatically to DIPIN.

Characteristics of the NOTIFY and USIGNAL Parameters

The NOTIFY and USIGNAL parameters have the following characteristics.

Parameter Characteristics
NOTIFY Value of IGNORE means clients should ignore unsolicited messages.

Value of DIPIN means clients should receive unsolicited messages by dip-In.

Value of SIGNAL means clients should receive unsolicited messages by signals.

Default is DIPIN.

Example: NOTIFY SIGNAL

USIGNAL Value of SIGUSR1 means notify clients with this type of signal.

Value of SIGUSR2 means notify clients with this type of signal.

Default is SIGUSR2.

Example: USIGNAL SIGUSR1

Protecting Shared Memory

You can shield system tables kept in shared memory from application clients and/or servers using the SYSTEM_ACCESS parameter. This option is useful when applications are being developed because faulty application code can inadvertently corrupt shared memory with a bad pointer. When the application is fully debugged and tested, this option could then be changed to allow for faster responses. Following are the options for this parameter:

Characteristics of the PROTECTED, FASTPATH, and NO_OVERRIDE Parameters

The PROTECTED, FASTPATH, and NO_OVERRIDE parameters have the following characteristics.

Parameter Characteristics
PROTECTED Internal structures in shared memory will not be corrupted inadvertently by application processes.
FASTPATH (default) Application processes will join with access to shared memory at all times.
NO_OVERRIDE The specified option cannot be changed.

Note: An example: SYSTEM_ACCESS PROTECTED, NO_OVERRIDE

Configuring Machines

This section explains how to define parameters for each processor, or machine, on which your application runs.

Identifying Machines in the MACHINES Section

Every machine in an application must have a MACHINES section entry in the configuration file and it must be the second section in the file. The MACHINES section contains the following information specific to each machine in the application:

The only required parameters for the MACHINES section are LMID, TUXCONFIG, TUXDIR, and APPDIR.

Note: For a particular machine, you can override the UID, GID, PERM, MAXACCESSERS, and MAXCONV values that were specified in the RESOURCES section.

Description of Parameters in a Sample MACHINES Section

The following table provides a sample of parameters and their values in the MACHINES section of the configuration file.

Parameter Meaning
gumby The machine name obtained with the command uname -n on UNIX systems. On Windows NT systems, see the Computer Name value in the Network Control Panel.
LMID=SITE1 The logical machine identifier of the machine gumby.
TUXDIR The double quoted string of the full path to the installed BEA TUXEDO software.
APPDIR The double quoted string of the full path to the application directory.
TUXCONFIG The double quoted string of the full path name of the configuration file.
ENVFILE The double quoted string of the full path name of a file containing environment information.
ULOGPFX The double quoted string of the full path name prefix of the log file.
MAXACCESSERS Override the system-wide value with 100 for this machine.
MAXCONV Override the system-wide value with 15 for this machine.

Example: MACHINES Section

The following example provides a sample MACHINES section of a configuration file:

MACHINES
gumby         LMID=SITE1
              TUXDIR="/tuxdir"
              APPDIR="/home/apps/mortgage"
              TUXCONFIG="/home/apps/mortgage/tuxconfig"
              ENVFILE="/home/apps/mortgage/ENVFILE"
              ULOGPFX="/home/apps/mortgage/logs/ULOG"
              MAXACCESSERS=100
               MAXCONV=15

How to Customize the MACHINES Section

You can customize the MACHINES section by performing the following steps:

Reserving the Physical Address and Machine ID

You initially define the address in the address portion, which is the basis for a MACHINES section entry. All other parameters in the entry describe the machine specified by the address. You must set the address to the value printed by calling uname -n on UNIX systems. On Windows NT systems, see the Computer Name value in the Network Control Panel.

The LMID parameter is mandatory and specifies a logical name used to designate the computer whose address has just been provided. It may be any alphanumeric value, and must be unique among other machines in the application.

Characteristics of the Address and Machine ID, and the LMID Parameter

The address and machine ID and the LMID parameter have the following characteristics:

Identifying the Location of the Configuration File

You identify the configuration file location and file name of a machine with TUXCONFIG, a required parameter. The TUXCONFIG parameter is enclosed in double quotes and represents the full path name up to 64 characters. The path specified must be the same as the environment variable, TUXCONFIG; otherwise, the tmloadcf(1) will not compile the binary file.

Characteristics of the TUXCONFIG Parameter

The TUXCONFIG parameter has the following characteristics:

Identifying the Locations of the System Software and Application Server Machines

Each machine in an application must have a copy of the BEA TUXEDO system software and application software. You identify the location of system software with the TUXDIR parameter. You identify the location of the application servers with the APPDIR parameter. Both parameters are mandatory. The APPDIR parameter becomes the current working directory of all server processes. The BEA TUXEDO software looks in the TUXDIR/bin and APPDIR for executables.

Characteristics of the TUXDIR and APPDIR Parameters

The TUXDIR and APPDIR parameters have the following characteristics.

Parameter Characteristics
TUXDIR The syntax requires the full path name enclosed in double quotes: TUXDIR="<TUXDIR>".

TUXDIR identifies the location of the BEA TUXEDO software.

TUXDIR is a required parameter.

APPDIR The syntax requires the full path name enclosed in double quotes: APPDIR="<APPDIR>".

APPDIR identifies the location of application servers.

APPDIR is a required parameter.

APPDIR becomes the current working directory of server processes.

Identifying the Location of the Log File

The application log file contains warning and informational messages, as well as error messages that describe the nature of any ATMI error with a return code of TPESYSTEM or TPEOS (that is, underlying system errors). The user can use this log to track application-related errors. By default, the file is named ULOG.mmddyy where mmddyy is the month, date, and 2-digit year. By default, the file is written into the APPDIR.

You can override the default directory and prefix by specifying the ULOGPFX parameter that is the absolute path name of the application log file, without the date. For example, it may be set to APPDIR/logs/ULOG so that logs collect in a particular directory. In a networked application, a central log can be maintained by specifying a remote directory that is mounted on all machines.

Characteristics of the ULOGPFX Parameter

The ULOGPFX parameter has the following characteristics:

Specifying Environment Variable Settings for Processes

With the ENVFILE parameter, you can specify a file that contains environment variable settings for all processes to be booted by the BEA TUXEDO system. The system sets TUXDIR and APPDIR for each process, so they should not be specified in this file. You can specify settings for the following because they affect an application's operation:

Characteristics of the ENVFILE Parameter

The ENVFILE parameter has the following characteristics:

Overriding System-wide Parameters

You can override the following system-wide parameters for a specific machine:

Configuring Groups

You can use GROUPS to designate logically grouped sets of servers, which can later be used to access resource managers, and facilitate server group migration. The GROUPS section of the configuration file contains the definition of server groups. You must define at least one server group for a machine to have application servers running on it. If no group is defined for a machine, the group can still be part of the application and you can run the administrative command tmadmin(1) from that site.

For nontransactional, nondistributed systems, groups are relatively simple. You only need to define the basic mapping of group name to group number and logical machine of each group. Additional flexibility is available to support distributed transactional systems.

Specifying a Group Name, Number, and LMID

The group name is the basis for a GROUPS section entry and is an alphanumeric name by which the group is identified. It is given a mandatory, unique group number (GRPNO). Each group must reside wholly on one logical machine (LMID). The LMID is also mandatory.

Configuring Servers

This section explains the SERVERS section parameters that you need to define to configure server processes.

Identifying Server Information in the SERVERS Section

The SERVERS section of the configuration file contains information specific to a server process. While this section is not required, an application without this section has no application servers and little functionality. Each entry in this section represents a server process to be booted in the application. Server-specific information includes the following:

Command-line options supported by the BEA TUXEDO system are described on the servopts(5) reference page in the BEA TUXEDO Reference Manual.

Description of Parameters in a Sample SERVERS Section

The following table provides a sample of parameters and their values in the SERVERS section of the configuration file.

Parameter Meaning
RESTART=Y (default) Restart the servers.
MAXGEN=5 (default) The MAXGEN parameter specifies a number greater than 0 and less than 256 that controls the number of times the server can be started within the period specified in the GRACE parameter. The default is 1. If the server is to be restartable, MAXGEN must be >= 2. The number of restarts is at most number - 1 times. RESTART must be Y or MAXGEN is ignored.
GRACE=3600 (default) If RESTART is Y, the GRACE parameter specifies the time period (in seconds) during which this server can be restarted as MAXGEN - 1 times. The number assigned must be equal to or greater than 0. The maximum is 2,147,483,648 seconds (or a little more than 68 years). If GRACE is not specified, the default is 86,400 seconds (24 hours). As soon as one GRACE period is over, the next grace period begins. Setting the grace period to 0 removes all limitations; the server can be restarted an unlimited number of times.
REPLYQ=N (default) There is no reply queue.
CLOPT="-A" (default) Specify -A on the command line of each server.
ENVFILE="/usr/home/envfile" (default) Read environment settings from the file ENVFILE.
SYSTEM_ACCESS=PROTECTED (default) Deny access to internal tables outside of system code.
RINGUP1 Sample name of the first server to be booted.
SRVGRP=GROUP1 SRVID=1 MIN=3

RQADDR="ring1"

Three instances of the sample server will be booted in group GROUP1 with server IDs of 1, 2, and 3, respectively. All three servers will form an MSSQ set and will read requests from queue ring1.

Note: RQADDR assigns a symbolic name to the request queue of this server. MSSQ sets are established by using the same symbolic queue name for more than one server (and by specifying MIN greater than 1).

RINGUP2 Name of the second sample server to be booted.

Example: SERVERS Section

The following example provides a sample SERVERS section of a configuration file.

SERVERS
DEFAULT:          RESTART=Y MAXGEN=5 GRACE=3600
                  REPLYQ=N CLOPT="-A"
                  ENVFILE="/usr/home/envfile"
                  SYSTEM_ACCESS=PROTECTED

RINGUP1           SRVGRP=GROUP1 SRVID=1 MIN=3
                  RQADDR="ring1"
RINGUP2           SRVGRP=GROUP1 SRVID=4 MIN =3
                   RQADDR="ring2"

Note: Omitted from this sample are SEQUENCE (the order of booting is 1 to 6), REPLYQ and RPPERM (the server does not receive replies), RCMD (no special commands are desired on restart), and CONV (servers are not conversational). Defaults are applied to all servers unless a different setting is specified for a specific server.

Defining Server Name, Group, and ID

You initially define the server name entry in the SERVERS section entry, which is the name of an executable file built with buildserver(1). You must provide each server with a group identifier (SRVGRP). This is set to the name specified in the beginning of a GROUPS section entry. You must also provide each server process in a given group with a unique numeric identifier (SRVID). Every server must specify a SRVGRP and SRVID. Because the entries describe machines to be booted and not just applications, it is possible that in some cases the same server name will be displayed in many entries.

Characteristics of the Server Name, SRVGRP, and SRVID Parameters

The Server Name, SRVGRP, and SRVID parameters have the following characteristics.

Parameter Characteristics
Server name It identifies the executable to be booted.

It is built with buildserver(1).

It is required, but may not be unique.

SRVGRP (Server Group) It identifies the group affiliation.

The group name begins with a GROUPS section entry.

It is required.

SRVID (Server ID) It is numeric.

It is required and unique within a server group.

Using Server Command-Line Options

The server may need to obtain information from the command line. The CLOPT parameter allows you to specify command-line options that can change some defaults in the server, or pass user-defined options to the tpsvrinit() function.

The standard main() of a server parses one set of options ending with the argument --, and passes the remaining options to tpsvrinit(). The default for CLOPT is -A, which tells the server to advertise all the services built into it with buildserver(1). The following table provides a partial list of the available options.

Option Purpose
-o filename Redirects standard output to file filename.
-e filename Redirects standard error to file filename.
-s services Advertises services.
-s x,y,z An example that advertises services x, y, and z.
-s x,y,z:funcname An example that advertises services x, y, and z, but processes requests for those services with function funcname. This is called aliasing a function name.
-r An example that specifies that the server should log the services performed.

Note: You can find other standard main() options in the servopts(5) reference page in the BEA TUXEDO Reference Manual.

Server Command-Line Options

Setting the Order in Which Servers Are Booted

You can specify the sequence of servers to be booted with the SEQUENCE parameter, which specifies a number in the range of 1 to 10,000. A server given a smaller SEQUENCE value is booted before a server with a larger value. If no servers specify SEQUENCE, servers are booted in the order of their appearance within the SERVERS section. If there is a mixture of sequenced and unsequenced servers, the sequenced servers are booted first. Servers are shut down in reverse order of the way they were booted.

The SEQUENCE parameter is optional. It may be helpful in a large application in which control over the order is important.

You can boot multiple servers using the MIN parameter, which is a shorthand method of booting. The servers all share the same server options. If you specify RQADDR, the servers will form an MSSQ set. The default for MIN is 1.

You specify the maximum number of servers that can be booted with the MAX parameter. The tmboot(1) command boots up to MIN servers at run time. Additional servers can be booted up to MAX. The default is MIN.

The MIN and MAX parameters are helpful in large applications to keep the size of the configuration file manageable. Allowances for MAX values must be made in the IPC resources.

Characteristics of the SEQUENCE, MIN, and MAX Parameters

The SEQUENCE, MIN, and MAX parameters have the following characteristics.

Parameter Characteristics
SEQUENCE It is an optional parameter with a numeric range of 1 - 10,000.

Smaller values are booted before larger values.

Omitted values are booted in the order that they appear in the SERVERS section.

All sequenced servers are booted before any unsequenced servers.

MIN It represents the minimum number of servers to boot during run time.

If RQADDR is specified and MIN>1, an MSSQ set is created.

All instances have the same server options.

The range of values is 0 to 1000.

The default is 1.

MAX It represents the maximum number of servers to boot.

The range of values for MAX is 0 to 1000. If MAX is not specified, the default is the value of MIN.

Identifying the Location of the Server Environment File

You use the ENVFILE parameter in the MACHINES section to specify environment settings. You can also specify the same parameter for a specific server process; the semantics are the same. If both the MACHINES section ENVFILE and the SERVERS section ENVFILE are specified, both go into effect. For any overlapping variable defined in both the MACHINES and SERVERS sections, the setting in the SERVERS section prevails.

Characteristics of the Server Environment File

The parameter that defines the server environment file has the following characteristics:

Identifying Server Queue Information

Server Queue information controls the creation and access of server message queues. On a BEA TUXEDO system, you can create multiple server single queue (MSSQ) sets using the RQADDR parameter. For any given server, you can set this parameter to an alphanumeric value. Those servers that offer the same set of services can consolidate their services under one message queue, providing automatic load balancing. You can do this by specifying the same value for all members of the MSSQ set.

MSSQ Example

The MSSQ set is similar to a situation at a bank. If you have four tellers, one line may be formed and everyone is assured of the most equitable wait in line. Understandably, the loan teller is not included because some people do not want loans on a given day. Similarly, MSSQ sets are not allowed if the participant servers offer different services from one another.

The RQPERM parameter allows you to specify the permissions of server request queues, along the lines of the UNIX system convention (for example, 0666). This allows services to control access to the request queue.

If the service routines within an MSSQ server perform service requests, they must receive replies to their requests on a reply queue. This is done by specifying REPLYQ=Y. By default, REPLYQ is set to N. If REPLYQ is set to Y, you can also assign permissions to it with the RPPERM parameter.

Characteristics of the RQADDR, RQPERM, REPLYQ, and RPPERM Parameters

The RQADDR, RQPERM, REPLYQ, and RPPERM parameters have the following characteristics.

Parameter Characteristics
RQADDR It is an alphanumeric value that allows MSSQ sets to be created.

The value is the same for all members of an MSSQ set.

All members of an MSSQ set must offer the same set of services.

RQPERM Represents the permissions on a request queue. If no parameter is specified, the permissions of the Bulletin Board, as specified by PERM in the RESOURCES section, is used. If no value is specified there, the default of 0666 is used. This opens your application to possible use by any login on the system.
REPLYQ Specifies whether a reply queue, separate from the request queue, is to be set up for this server. If only one server is using the request queue, replies can be picked up from the request queue without causing problems. On a BEA TUXEDO system, if the server is a member of an MSSQ set and contains services programmed to receive reply messages, REPLYQ should be set to Y so that an individual reply queue is created for this server. If not, the reply is sent to the request queue shared by all servers of the MSSQ set, and there is no way of assuring that it will be picked up by the server that is waiting for it.
RPPERM Assigns permissions to the reply queue. This parameter is useful only when REPLYQ=Y. If requests and replies are read from the same queue, only RQPERM is needed; RPPERM is ignored.

Defining Server Restart Information

A properly debugged server should not terminate on its own. By default, servers that do terminate while the application is booted will not be restarted by the BEA TUXEDO system. You can set the RESTART parameter to Y if you want the server to restart. The RCMD, MAXGEN, and GRACE parameters are relevant to a server if RESTART=Y.

The RCMD parameter specifies a command to be performed in parallel with restarting a server. This command must be an executable file. The option allows you to take some action when a server is being restarted. For example, mail could be sent to the developer of the server or to someone who is auditing such activity.

The MAXGEN parameter represents the total number of lives to which a server is entitled within the period specified by GRACE. The server can then be restarted MAXGEN-1 times during GRACE seconds. If GRACE is set to zero, there is no limit on server restarts. MAXGEN defaults to 1 and may not exceed 256. GRACE must be greater than or equal to zero and must not exceed 2,147,483,647 (231 - 1).

Note: A fully debugged server should not need to be restarted. The RESTART and associated parameters should have different settings during the testing phase than they do during production.

Characteristics of the RESTART, RCMD, MAXGEN, and GRACE Parameters

The RESTART, RCMD, MAXGEN, and GRACE parameters have the following characteristics.

Parameter Characteristics
RESTART A setting of Y enables a server to restart.

The default is N.

RCMD Determines if the executable file is executed at restart time.

Allows you to take an action when a server is restarted.

MAXGEN Represents the maximum number of server lives in a specific interval.

It defaults to 1; the maximum is 256.

GRACE Represents the interval used by MAXGEN.

Zero represents unlimited restart.

It must be between 0 and 2147,483,647 (231 - 1).

The default is 24 hours.

Specifying a Server as Conversational

If a server is a conversational server (that is, it establishes a connection with a client), the CONV parameter is required and must be set to Y. The default is N, indicating that the server will not be part of a conversation.

Characteristics of the CONV Parameter

The CONV parameter has the following characteristics:

Defining Server Access to Shared Memory

The SYSTEM_ACCESS parameter determines if the server process may attach to shared memory and thus have access to internal tables outside of system code. During application development, we recommend that such access be denied (PROTECTED). When the application is fully tested, you can change it to FASTPATH to yield better performance.

This parameter overrides the value specified in the RESOURCES section unless the NO_OVERRIDE value was specified. In this case, the parameter is ignored. The NO_OVERRIDE value may not be used in this section.

Characteristics of the SYSTEM_ACCESS Parameter

The SYSTEM_ACCESS parameter has the following characteristics:

Configuring Services

Identifying BEA TUXEDO Services in the SERVICES Section

You indicate specific information about BEA TUXEDO services in your application in the SERVICES section of the configuration file. Such information, for nontransactional, nondistributed applications, is relatively simple. The SERVICES section includes the following types of information:

Sample SERVICES Section

The following example provides a sample SERVICES section of a configuration file.

SERVICES
#
DEFAULT:  LOAD=50 PRIO=50
RINGUP    BUFTYPE="VIEW:ringup"

In this example, the default load and priority of a service are 50; the one service declared is a RINGUP service that accepts a ringup VIEW as its required buffer type.

Enabling Load Balancing

If you set the RESOURCES section parameter LDBAL to Y, server load balancing occurs. A LOAD factor is assigned to each service performed, which keeps track of the total load of services that each server has performed. Each service request is routed to the server with the smallest total load. The routing of that request causes the server's total to be increased by the LOAD factor of the service requested.

Load information is stored only on the site originating the service request. It would be inefficient for the BEA TUXEDO system to attempt to constantly propagate load information to all sites in a distributed application. When performing load balancing in such an environment, each site knows only about the load it originated and performs load balancing accordingly. This means that each site has different load statistics for a given server (or queue). The server perceived as being the least busy differs across sites.

When load balancing is not activated, and multiple servers offer the same service, the first available queue receives the request.

Characteristics of the LDBAL Parameter

The LDBAL parameter has the following characteristics:

Controlling the Flow of Data by Service Priority

You can exert significant control over the flow of data in an application by assigning service priorities using the PRIO parameter. For instance, Server 1 offers Services A, B, and C. Services A and B have a priority of 50 and Service C has a priority of 70. A service requested for C will always be dequeued before a request for A or B. Requests for A and B are dequeued equally with respect to one another. The system dequeues every tenth request in FIFO order to prevent a message from waiting indefinitely on the queue.

Note: A priority can also be changed dynamically with the tpsprio()call.

Characteristics of the PRIO Parameter

The PRIO parameter has the following characteristics:

Specifying Different Service Parameters for Different Server Groups

You can specify different load, priority, or other service-specific parameters for different server groups. To do this, you should repeat the service's entry for each group with different values for the SRVGRP parameter.

Sample SERVICES Section

The following example provides a sample SERVICES section of a configuration file.

SERVICES
A  SRVGRP=GRP1 PRIO=50 LOAD=60
A  SRVGRP=GRP2  PRIO=70 LOAD=30

This example assigns different service-specific parameters to two different server groups. Service A assigns a priority of 50, and a load of 60 in server group GRP1; and a priority of 70, and a load of 30 in server group GRP2.

Specifying a List of Allowable Buffer Types for a Service

With the BUFTYPE parameter, you can tune a service to check buffer types independently of the actual service code. If you set this parameter, it specifies a list of allowable buffer types for a service. Its syntax is a semicolon-separated list of types in the format type[:subtype[,subtype]]. The subtype may be set to * to allow all subtypes.

A service can have BUFTYPE set to ALL, which means that this service accepts all buffer types. If this parameter is not specified, the default is ALL.

Examples of the BUFTYPE Parameter

The BUFTYPE parameter has the following characteristics.

BUFTYPE Example Meaning
BUFTYPE="FML;VIEW:aud,aud2" FML and VIEW with subtypes aud and aud2 buffer types are allowed.
BUFTYPE="FML;VIEW:*" All FML and VIEW buffer types are allowed.
BUFTYPE=ALL All buffer types are allowed (the default).

Service Timeout Errors

Sometimes an unexpected system error occurs that freezes a service or causes it to run out of control while it is processing a request. Though desirable to remove these processes, it is difficult to detect them or their origin. A BEA TUXEDO mechanism terminates these processes based on the time it takes for a service to process a request.

You can configure the time limit by defining the SVCTIMEOUT parameter in the UBBCONFIG file or by dynamically changing the TA_SVCTIMEOUT attribute in TM_MIB. By default, the BEA TUXEDO system does not terminate any service process, so you must set the SVCTIMEOUT value (in seconds) to activate this feature. We recommend that you set the value of SVCTIMEOUT or TA_SVCTIMEOUT to at least two to three times the number of seconds it takes for your longest running service to process a request. Setting the service timeout this way guarantees that the BEA TUXEDO system removes only frozen processes. In essence, the service timeout acts like a scavenger for frozen or out of control application servers.

This section describes the causes and results of Service Timeout errors, along with an explanation of how the BEA TUXEDO system reports such errors. Advice about how to handle errors is also provided.

Situations that Cause a Service Timeout

Service timeouts occur in the following situations:

What Happens When a Timeout Occurs

When a timeout occurs, the BEA TUXEDO system terminates the server process running the frozen service (but not its child processes, if any). It then returns a TPESVCERR error, indicating that an unknown problem occurred during processing. In a conversational service, the conversation event TPEV_SVCERR is returned.

How a Service Timeout Is Reported

Before Release 6.4 of the BEA TUXEDO system, only the error code TPESVCERR was returned when a service timeout occurred. In Release 6.4, however, three new features of Service Timeout reporting were introduced:

Because the SVCTIMEOUT value is configurable, it is important for clients to be able to easily distinguish a TPESVCERR that may be caused by exceeding the value set for SVCTIMEOUT, from those caused by other situations. Although the ULOG contains this information, it is difficult for client programs to extract it. To differentiate the service timeout TPESVCERR from others, a call to tperrordetail(3c) routine (after a TPESVCERR has been detected) yields TPED_SVCTIMEOUT when a service timeout occurs.

In addition, a system event, .SysServiceTimeout, is generated when a service timeout occurs. When the .SysServiceTimeout event occurrs, it is reflected in the ULOG in the following way:

ERROR: .SysServiceTimeout: %TA_SERVERNAME, group %TA_SRVGRP, id %TA_SRVID server killed due to a service timeout 

How to Control a Service Timeout

Configuring Routing

The ROUTING section of UBBCONFIG allows the full definition of the routing criteria named in the SERVICES section (for BEA TUXEDO data-dependent routing).

For more information about using these parameters to implement factory-based routing or data-dependent routing, see Chapter 5, "Distributing Applications."

Defining Routing Criteria in the ROUTING Section

The following table identifies the information required for an entry in the ROUTING section.

Parameter Characteristics
criterion_name This is a string value with a maximum length of 15 characters.

For BEA TUXEDO data-dependent routing, it is the routing criteria name that you specified as the ROUTING parameter in the SERVICES section.

FIELD The name of the buffer field on which the routing is to be done.

In BEA TUXEDO data-dependent routing, this value is the name of an FML field (for FML buffers) or VIEW structure element name (for VIEW buffers). This is the actual field that is used to route the message. It may be of any data type.

FIELDTYPE Specifies the type of the routing field. Field types supported are:

SHORT -215 . . . 215 - 1 (16 bit)
LONG -231 . . . 231 - 1 (32 bit)
FLOAT IEEE single-precision floating point numbers
DOUBLE IEEE double-precision numbers
CHAR A single character; an 8-bit quantity
STRING A null-terminated character array

RANGES The limits assigned to each criteria. The syntax is RANGES="[val1[-val2]:group1] [,val3[-val4]:group2]...[,*:groupn]"

val1 is a value; val1-val2 is a range; groupn is either a group name or the wildcard character (*) denoting all group names. val can be a number, a quote-enclosed (`) string, or MIN or MAX. A wildcard in place of a range means Catch-All, that is, No Limit to the number of ranges.

BUFTYPE For BEA TUXEDO data-dependent routing, the buffer type allowed. This parameter is similar to its SERVICES section counterpart in that it restricts the routing criteria to a specific set of buffer types and subtypes. Only FML and VIEW types can be used for routing. The syntax is the same as the syntax in the SERVICES section, a semicolon-separated list of type:subtype[,subtype]. You can specify only one type for routing criteria. This restriction limits the number of buffer types allowed in routing services.

Specifying Range Criteria in the ROUTING Section

The RANGES parameter provides the actual mapping between field value and group name. Its syntax is as follows.

RANGES="[val1[-val2]:group1] [,val3[-val4]:group2]...[,*:groupn]"

where val1, val2, and so on, are values of that field and groupn may be either a group name or the wildcard character (*) denoting that any group may be selected. The * character occupying the place of val at the end is a Catch-All choice, that is, it specifies what to do if the data does not fall into any range that has been specified. val1 is a number when it appears in numeric fields, and is enclosed in single quotes (`) when it appears in STRING or CARRAY fields. The field values MIN and MAX (not enclosed in quotes) are provided to allow machine minimum and maximum data values to be expressed. There is no limit to the number of ranges that may be specified, but all routing information is stored in shared memory and incurs a cost there.

Note: Overlapping ranges are allowed, but values that belong to both ranges map to the first group. For example, if RANGES is specified as RANGES="0-5:Group1,3-5:Group2", then a range value of 4 routes to Group1.

Configuring Network Information

You can configure network groups in the NETGROUPS and NETWORK sections of an application's UBBCONFIG file.

Note: For specific information about the tasks involved, see Chapter 6, "Building Networked Applications."

Specifying Information in the NETGROUPS Section

The NETGROUPS section of the UBBCONFIG file describes the network groups available to an application in a LAN environment. There is no limit to the number of network groups to which a pair of machines may be assigned. The method of communication to be used by members of different networks in a network group is determined by the priority mechanism (NETPRIO).

Every LMID must be a member of the default network group (DEFAULTNET). The network group number for this group (that is, the value of NETGRPNO) must be zero. However, you can modify the default priority of DEFAULTNET. Networks defined in releases of the BEA TUXEDO system prior to Release 6.4 are assigned to the DEFAULTNET network group.

Specifying the NETGRPNO, NETPRIO, NETGROUP, MAXNETGROUPS, and MAXPENDINGBYTES Parameters

The NETGRPNO, NETPRIO, NETGROUP, MAXNETGROUPS, and MAXPENDINGBYTES parameters have the following characteristics.

Parameter Required/Optional Description
NETGRPNO = numeric_value Required A unique network group number that you must assign to use in failover and failback situations. If this entry describes DEFAULTNET, the numeric value must be zero. Communication with pre-v6.4 releases of the BEA TUXEDO system use only DEFAULTNET.
NETPRIO = numeric_value Optional The priority of this network group. A pair of machines in multiple network groups of the same priority communicates simultaneously over the circuits with the highest priority. If all network circuits of a certain priority are torn down by the administrator or by network conditions, the next lowest priority circuit is used. Retries of the higher priority circuits are attempted. This value must be greater than zero and less than 8,192. If not specified, the default is 100.

Note: In v6.4 of the BEA TUXEDO system, parallel data circuits are prioritized by the network group number (NETGRPNO) parameter within the priority group number. In future releases, a different algorithm/mechanism may be used to prioritize parallel data circuits.

NETGROUP = string_value Required The network group associated with this network entry. All network entries with a NETGROUP parameter of DEFAULTNET are represented in the T_MACHINE class, while NETWORK entries associated with any other NETGROUP are represented in the T_NETMAP class to interoperate with previous releases.
MAXNETGROUPS Optional Allows more netgroups to be defined than the default (8).
MAXPENDINGBYTES Optional MAXPENDINGBYTES enables you to configure the maximum size of data waiting for the network to become available. There are two situations when MAXPENDINGBYTES is significant:

Sample Network Groups Configuration

You can associate network addresses with a network group. The following example illustrates how this capability may be useful.

First State Bank has a network of five machines (A-E). Each machine belongs to two or three of four netgroups that you have defined in the following way:

Every machine belongs to DEFAULTNET (the corporate WAN). In addition, each machine is associated with either the MAGENTA_GROUP or the BLUE_GROUP. Finally, some machines in the MAGENTA_GROUP LAN also belong to the private GREEN_GROUP. Figure 3-1 shows machines A through E in the networks for which they have network addresses.

Figure 3-1 Example of a Network Grouping

The following table shows you which machines have addresses for which groups.

Machine Has Addresses for These Groups
A and B DEFAULTNET (the corporate WAN)

MAGENTA_GROUP (LAN)

GREEN_GROUP (LAN)

C DEFAULTNET (the corporate WAN)

MAGENTA_GROUP (LAN)

D and E DEFAULTNET (the corporate WAN)

BLUE_GROUP (LAN)

Note: Because the local area networks are not routed among the locations, machine D (in the BLUE_GROUP LAN) may contact machine A (in the GREEN_GROUP LAN) only by using the single address they have in common: the corporate WAN network address.

Configuring the UBBCONFIG File with Netgroups

To set up the configuration just described, the First State Bank system administrator defines each group in the NETGROUPS section of the UBBCONFIG file, as shown in Listing 3-1.

Listing 3-1 Sample NETGROUPS and NETWORK Sections


NETGROUPS

DEFAULTNET 		NETGRPNO = 0 			 NETPRIO = 100 #default
BLUE_GROUP		NETGRPNO = 9 			 NETPRIO = 100
MAGENTA_GROUP		NETGRPNO = 125        NETPRIO = 200
GREEN_GROUP		NETGRPNO = 13         NETPRIO = 200

NETWORK

A	NETGROUP=DEFAULTNET				NADDR="//A_CORPORATE:5723"
A	NETGROUP=MAGENTA_GROUP				NADDR="//A_MAGENTA:5724"
A	NETGROUP=GREEN_GROUP				NADDR="//A_GREEN:5725"
B	NETGROUP=DEFAULTNET				NADDR="//B_CORPORATE:5723"
B	NETGROUP=MAGENTA_GROUP				NADDR="//B_MAGENTA:5724"
B	NETGROUP=GREEN_GROUP				NADDR="//B_GREEN:5725"
C	NETGROUP=DEFAULTNET				NADDR="//C_CORPORATE:5723"
C	NETGROUP=MAGENTA_GROUP				NADDR="//C_MAGENTA:5724"

D	NETGROUP=DEFAULTNET				NADDR="//D_CORPORATE:5723"
D	NETGROUP=BLUE_GROUP				NADDR="//D_BLUE:5726"



[Top] [Previous Page] [Next Page] [Bottom]