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. Oracle 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 (
DMCONFIG). They are:
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 (
DMCONFIG), see the section.
|Note:||All TMA TCP Gateway configuration parameters are described in the section. This document focuses on complex parameters that require a separate introduction.|
|Note:||The task of configuring data mappings could be considered a programming activity because it requires knowledge of the Oracle Tuxedo programming environment. However, because configuration parameters affect many application programs, configuration is usually an administrator's responsibility.|
When you boot Oracle Tuxedo software using the
tmboot command, TMA TCP Gateway initializes in the following manner.
GWICONFIGconfiguration file and initializes all parameters. If syntax errors are encountered during parsing, TMA TCP Gateway writes a message to the
ULOGfile and initialization fails.
GWICONFIGfile, TMA TCP Gateway advertises remote services that are named in the file dynamically. These services includes services for all remote gateways.
When TMA TCP Gateway receives an Oracle 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, Oracle 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 Oracle 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
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:
VIEWdefinition that describes the format of the input data.
VIEWdefinitions are descriptions of data structures that are used for input and output in the Oracle Tuxedo environment.
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 Oracle TMA TCP Gateway for Data Mapping. For information about the TMA TCP Gateway configuration file, see Configuring Oracle 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 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 thesection 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:
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 section. For information about the TMA TCP Gateway configuration file, see the section.
The Oracle Tuxedo buffer resulting from output type conversion and output data translation is returned to the caller with a
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 thesection.
When you send a shutdown request to TMA TCP Gateway using the
tmshutdown command, TMA TCP Gateway performs the following tasks.
In general, Oracle Tuxedo application programs that send requests through TMA TCP Gateway are developed the same as other Oracle 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 Oracle Tuxedo documentation.
This subsection describes several input and output issues that programmers need to consider when developing application programs that use TMA TCP Gateway.
Thesection 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 (
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 section.
Oracle 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 Oracle 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 Oracle 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 Oracle Tuxedo services, see the Oracle Tuxedo Programmer’s Guide.
To maintain the location transparency of the Oracle Tuxedo environment, TMA TCP Gateway does not preserve data from Oracle 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 Oracle 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 Oracle Tuxedo region. A remote application program is one that resides outside the immediate Oracle 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.
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
tpgetrply()functions, outside the boundaries of any local transaction, such as
TPNOTRANmust be specified as one of the flags to the
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.
tpnotify() functions are subject to the following operational considerations:
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 Oracle 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 thesection.
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:
|Note:||When Oracle Tuxedo applications detect service failures, they should not assume that returned buffers are the expected type. Oracle Tuxedo application programs may ignore return buffers when failures occur. If you need to check a buffer type, use the Oracle Tuxedo