Gateway User Guide
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Get Adobe Reader |
To understand how Tuxedo Mainframe Adapter for TCP Gateway (hereafter referenced as TMA TCP Gateway) works, you need to understand how it performs the following tasks:
Each of these operations is described in the following subsections.
One of the major benefits of using Tuxedo Mainframe Adapter for TCP Gateway to connect dissimilar systems is the degree to which different programming environments can be isolated. BEA Tuxedo programmers rarely need to know that services are handled by dissimilar systems or by systems in remote regions. Application programs do not need to be developed in any special way.
The key to this high degree of transparency is the TMA TCP Gateway configuration. Through TMA TCP Gateway configuration, environmental differences, such as naming conventions and data formats, are concealed from programmers and programs.
Three kinds of environmental differences are isolated in the TMA TCP Gateway configuration files (GWICONFIG
and DMCONFIG
). They are:
Different systems have different rules for naming services. Service names can differ in length, allowable characters, and even conventions as to how they are constructed or chosen.
Different systems have different conventions for formatting input and output data (such as structure, character set, and so forth).
The technique that hides these differences is called mapping. Generally, when you map things, you associate local values or entities with values or entities that are meaningful to programs on remote systems.
The procedure for mapping service names is self-explanatory; you create a configuration file record in which a local name for a service is paired with a remote name for that service. On the other hand, procedures for mapping input data, output data, and application errors are more complex. Conceptual information and other background information are required.
For detailed information about updating the TMA TCP Gateway configuration files (GWICONFIG
and DMCONFIG
), see the Configuring BEA TMA TCP Gateway section.
Note: All TMA TCP Gateway configuration parameters are described in the Configuring BEA TMA TCP Gatewaysection.This document focuses on complex parameters that require a separate introduction.
The task of configuring data mappings could be considered a programming activity because it requires knowledge of the BEA Tuxedo programming environment. However, because configuration parameters affect many application programs, configuration is usually an administrator's responsibility.
When you boot BEA Tuxedo software using the tmboot
command, TMA TCP Gateway initializes in the following manner.
When TMA TCP Gateway receives a BEA Tuxedo service request from a local client program, it processes the request in the following manner.
When a client program sends a request for a remote service that is accessible through TMA TCP Gateway, BEA Tuxedo forwards the request to the gateway pending the requested service.
The TMA TCP Gateway will determine which remote system will process each request. Data-dependent routing rules may be used to determine the desired remote system.
If no connection to the target remote system exists or an existing connection has been broken, the TMA TCP Gateway opens a new connection at this time.
If the remote system returns a connection failure indication, the BEA Tuxedo service request fails and an error is returned to the caller. The actual error value returned depends on the timing of the connection failure. Information about failures is written to the ULOG
file.
In some circumstances, typed buffers associated with service requests must be converted before service requests can be sent to remote systems. Type conversion involves changing the layout of a buffer to a format that is acceptable to a remote service.
For example, if a local client program places user input in an FML buffer that a remote service cannot process, the buffer must be converted into the structure the remote service expects.
In situations where input type conversion is required, programmers or administrators must perform the following tasks:
VIEW
definition that describes the format of the input data. VIEW
definitions are descriptions of data structures that are used for input and output in the BEA Tuxedo environment.GWICONFIG
and DMCONFIG
).Once these tasks have been completed, TMA TCP Gateway performs all necessary type conversions automatically.
For information about creating VIEW
definitions to facilitate type conversion, see Configuring BEA TMA TCP Gateway for Data Mapping. For information about the TMA TCP Gateway configuration file, see Configuring BEA TMA TCP Gateway.
The TMA TCP Gateway software automatically translates data as required. Translation refers to a change in how intrinsic data types are represented with respect to word length, byte ordering, and character encoding.
To facilitate data translation, administrators must specify certain parameters in the GWICONFIG
configuration file. For detailed information about how TMA TCP Gateway translates data, refer to the Configuring BEA TMA TCP Gateway for Data Mapping section.
The TMA TCP Gateway product constructs a request message. This message includes the following items and is sent to the remote system:
After sending a request message, TMA TCP Gateway performs a receive operation. If the TMA TCP Gateway receive timeout expires before a message arrives from the remote system, a TPETIME
error is returned to the caller.
After TMA TCP Gateway receives a reply, data representations are translated as needed, in the reverse of the input translation. For details, see the Step 4: Translating Input Data section in this document.
If the format of the reply is not suitable for the local client program, TMA TCP Gateway converts the reply into an appropriate buffer format.
In situations where output conversion is required, programmers or administrators must do the following:
VIEW
definition that describes the format of the output bufferGWICONFIG
and DMCONFIG
)Once these tasks have been completed, TMA TCP Gateway performs all necessary conversions automatically.
For information about creating VIEW
definitions to facilitate type conversion, see the Configuring BEA TMA TCP Gateway for Data Mapping section. For information about the TMA TCP Gateway configuration file, see the Configuring BEA TMA TCP Gateway section.
The BEA Tuxedo buffer resulting from output type conversion and output data translation is returned to the caller with a TPSUCCESS
or TPFAIL
indication.
The TMA TCP Gateway software processes remote service requests (those which originate on remote systems) in much the same way that it processes local requests. The following list offers a brief summary.
For more detailed information about record and buffer conversion, and data translation, see the Processing Local Service Requests section.
When you send a shutdown request to TMA TCP Gateway using the tmshutdown
command, TMA TCP Gateway performs the following tasks.
In general, BEA Tuxedo application programs that send requests through TMA TCP Gateway are developed the same as other BEA Tuxedo application programs.
The TMA TCP Gateway product supports all request/reply communications functions that are included in the ATMI and XATMI interfaces. In addition, all supported functions can be used in the standard manner documented in the BEA Tuxedo documentation.
This subsection describes several input and output issues that programmers need to consider when developing application programs that use TMA TCP Gateway.
The Processing Local Service Requests section describes many circumstances that require conversion of input and output parameters into formats acceptable to remote systems or regions and the local system.
The TMA TCP Gateway product provides powerful configuration capabilities that make it possible for you to convert or map parameters easily rather than requiring you to program in a different way.
The TMA TCP Gateway configuration files (GWICONFIG
and DMCONFIG
) are a centralized mechanism that you can use to define and maintain relationships between the local system and remote systems or regions. In addition to input and output parameter mappings, these relationships include service name mappings (where remote service names are mapped to local service names) and error record mappings.
For more information about the GWICONFIG
configuration file, see the Configuring BEA TMA TCP Gateway section.
BEA Tuxedo application programs can request the following two categories of remote services through TMA TCP Gateway:
If a remote service was developed specifically for the BEA Tuxedo environment, the input it requires is shaped by three factors:
On the other hand, if a remote service is an existing OLTP application program, additional requirements for input are often required. For example, many systems require input that includes terminal data.
Often, by creative use of the TMA TCP Gateway configuration capabilities previously introduced, you can eliminate the need to include control information, such as terminal data, in the BEA Tuxedo application source code that you develop. For instance, you can include terminal control codes in VIEW
definitions that are associated with the TMA TCP Gateway configuration.
For information about the normal input requirements of BEA Tuxedo services, see the BEA Tuxedo Programmer's Guide.
To maintain the location transparency of the BEA Tuxedo environment, TMA TCP Gateway does not preserve data from BEA Tuxedo input buffers in the associated output buffers. Hence, the consequences of using the same buffer for input and output must be understood to avoid problems.
In particular, some existing BEA Tuxedo applications may use FML buffers to accumulate results or to maintain application context across service requests. Developers adding TMA TCP Gateway to such an application must do one of the following:
This requirement is no different from the requirement that existed before the use of TMA TCP Gateway. That is, application programs that accumulate output data in FML buffers must ensure that services return replies in original FML input buffers (with output data added)—not in new or re-initialized buffers.
The ATMI interface includes several features and functions—related primarily to conversations, transactions and client identities—that application programs cannot propagate to other application programs through TMA TCP Gateway.
In this guide, permanent limitations of this sort are referred to as operational considerations. Specific operational considerations are described in the following sections.
Note: In this discussion, a local application program is one that resides within the immediate BEA Tuxedo region. A remote application program is one that resides outside the immediate BEA Tuxedo region.
Conversational communication functions are subject to the following operational considerations:
tpconnect()
function to establish conversations with remote services.tpconnect()
function to establish conversations with local services.tpsend()
, tprecv()
, and tpdiscon()
functions may not be used for communication through TMA TCP Gateway. The TMA TCP Gateway product supports only non-transactional communications. Therefore, all communications via TMA TCP Gateway are subject to the following operational considerations:
tpcall()
function, or the tpacall()
and tpgetrply()
functions, outside the boundaries of any local transaction, such as tx_begin()
/tx_commit()
or tpbegin()
/tpcommit()
pair.TPNOTRAN
must be specified as one of the flags to the tpcall()
or tpacall()
function.The tpsprio()
and tpgprio()
functions are subject to the following operational considerations:
tpsprio()
function to set the priority at which remote services are processed. Instead, a call to the tpsprio()
function causes the priority of a local TMA TCP Gateway to be set.tpsprio()
function to set the priority at which local services are processed.tpgprio()
function to determine the priority of a remote service, the priority of a local TMA TCP Gateway is returned.The tpbroadcast()
and tpnotify()
functions are subject to the following operational considerations:
tpbroadcast()
function to send unsolicited messages to remote client programs (and the reverse).tpbroadcast()
or tpnotify()
functions to send messages to remote client programs (and the reverse).Three kinds of errors can be encountered by local application programs when they send requests through TMA TCP Gateways:
The following sections explain how TMA TCP Gateway handles these different kinds of errors.
When local or remote gateway errors occur, they are logged in the BEA Tuxedo ULOG
file and associated service requests fail. Also, appropriate error codes are returned to callers.
When remote systems encounter problems, service requests may fail or time out. The exact outcome depends on whether the remote system provides a means for TMA TCP Gateway to detect failure.
If the remote target system does not make it possible for TMA TCP Gateway to detect particular types of failure, the TMA TCP Gateway blocking timeout parameter can be tuned to provide timely detection of the problem.
For more information about the blocking timeout parameter, see the Configuring BEA TMA TCP Gateway section.
Application errors are similar to remote system failures. Remote systems may or may not use error indicators to pass information back to the local TMA TCP Gateway resulting in the generation of error messages. If no such error indicators exist, service routines typically use their own mechanisms to report failures to callers.
When application errors occur, some service routines may not return their usual output records at all. Instead, they may return some other data indicating that there has been an error, such as a string that contains a failure message.
When TMA TCP Gateway receives a service failure message from a remote system, it:
GWICONFIG
fileULOG
file if the configuration directs it to do soNote: When BEA Tuxedo applications detect service failures, they should not assume that returned buffers are the expected type. BEA Tuxedo application programs may ignore return buffers when failures occur. If you need to check a buffer type, use the BEA Tuxedo tptypes()
function. When the type is known, the buffer can be handled accordingly (for example, by displaying a window containing an error string).
![]() ![]() |
![]() |
![]() |