BEA Logo BEA eLink for Mainframe TCP Release 3.2

  BEA Home  |  Events  |  Solutions  |  Partners  |  Products  |  Services  |  Download  |  Developer Center  |  WebSUPPORT

 

   eLink for Mainframe TCP Documentation   |   eLink TCP for Tuxedo User Guide   |   Previous Topic   |   Next Topic   |   Contents   |   Index

Understanding How BEA eLink TCP for Tuxedo Works

 

To understand how eLink for Mainframe TCP for Tuxedo (hereafter referenced as eLink TCP for Tuxedo) works, you need to understand how it performs the following tasks:

Each of these operations is described in the following subsections.

 


Planning Your Configuration

One of the major benefits of using eLink for Mainframe TCP for Tuxedo 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 eLink TCP for Tuxedo configuration. Through eLink TCP for Tuxedo 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 eLink TCP for Tuxedo configuration files (GWICONFIG and 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 eLink TCP for Tuxedo configuration files (GWICONFIG and DMCONFIG), see the Configuring BEA eLink TCP for Tuxedo section.

Note: All eLink TCP for Tuxedo configuration parameters are described in the Configuring BEA eLink TCP for Tuxedo section.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.

 


Initializing eLink TCP for Tuxedo

When you boot BEA Tuxedo software using the tmboot command, eLink TCP for Tuxedo initializes in the following manner.

  1. The eLink TCP for Tuxedo software parses the GWICONFIG configuration file and initializes all parameters. If syntax errors are encountered during parsing, eLink TCP for Tuxedo writes a message to the ULOG file and initialization fails.

  2. After reading the GWICONFIG file, eLink TCP for Tuxedo advertises remote services that are named in the file dynamically. These services includes services for all remote gateways.

 


Processing Local Service Requests

When eLink TCP for Tuxedo receives a BEA Tuxedo service request from a local client program, it processes the request in the following manner.

Step 1: Receiving a Service Request from BEA Tuxedo Software

When a client program sends a request for a remote service that is accessible through eLink TCP for Tuxedo, BEA Tuxedo forwards the request to the gateway pending the requested service.

Step 2: Connecting to a Remote System

The eLink TCP Tuxedo 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 eLink TCP for Tuxedo 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.

Step 3: Converting Input Buffer Types

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:

Once these tasks have been completed, eLink TCP for Tuxedo performs all necessary type conversions automatically.

For information about creating VIEW definitions to facilitate type conversion, see "Configuring BEA eLink TCP for TUXEDO for Data Mapping." For information about the eLink TCP for Tuxedo configuration file, see "Configuring BEA eLink TCP for TUXEDO."

Step 4: Translating Input Data

The eLink TCP for Tuxedo 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 eLink TCP for Tuxedo translates data, refer to the Configuring BEA eLink TCP for Tuxedo for Data Mapping section.

Step 5: Transmitting the Service Request

The eLink TCP for Tuxedo product constructs a request message. This message includes the following items and is sent to the remote system:

Step 6: Receiving a Reply

After sending a request message, eLink TCP for Tuxedo performs a receive operation. If the eLink TCP for Tuxedo receive timeout expires before a message arrives from the remote system, a TPETIME error is returned to the caller.

Step 7: Translating the Reply

After eLink TCP for Tuxedo 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.

Step 8: Converting Output Data

If the format of the reply is not suitable for the local client program, eLink TCP for Tuxedo 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, eLink TCP for Tuxedo performs all necessary conversions automatically.

For information about creating VIEW definitions to facilitate type conversion, see the Configuring BEA eLink TCP for Tuxedo for Data Mapping section. For information about the eLink TCP for Tuxedo configuration file, see the Configuring BEA eLink TCP for Tuxedo section.

Step 9: Sending the Reply to the Caller

The BEA Tuxedo buffer resulting from output type conversion and output data translation is returned to the caller with a TPSUCCESS or TPFAIL indication.

 


Processing Remote Service Requests

The eLink TCP for Tuxedo 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.

  1. The eLink TCP for Tuxedo gateway receives the service request and, if necessary, the input record associated with the request is translated and converted into the specified input buffer format.

  2. Acting as a client program, the gateway passes the service request to BEA Tuxedo software.

  3. When the service routine is complete, the output buffer is converted into the specified output record format and/or translated, when required.

  4. Finally, the output is sent to the requester on the remote system.

For more detailed information about record and buffer conversion, and data translation, see the Processing Local Service Requests section.

 


Processing Shut Down Requests

When you send a shutdown request to eLink TCP for Tuxedo using the tmshutdown command, eLink TCP for Tuxedo performs the following tasks.

  1. Completes outstanding requests

  2. Drops all open connections

  3. Terminates

 


Programming Considerations

In general, BEA Tuxedo application programs that send requests through eLink TCP for Tuxedo are developed the same as other BEA Tuxedo application programs.

The eLink TCP for Tuxedo 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.

Input and Output Issues

This subsection describes several input and output issues that programmers need to consider when developing application programs that use eLink TCP for Tuxedo.

Preparing Input and Output Data with eLink TCP for Tuxedo

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 eLink TCP for Tuxedo 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 eLink TCP for Tuxedo 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 eLink TCP for Tuxedo section.

Service Request Parameters

BEA Tuxedo application programs can request the following two categories of remote services through eLink TCP for Tuxedo:

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 eLink TCP for Tuxedo 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 eLink TCP for Tuxedo configuration.

For information about the normal input requirements of BEA Tuxedo services, see the BEA Tuxedo Programmer's Guide.

Output Data Considerations

To maintain the location transparency of the BEA Tuxedo environment, eLink TCP for Tuxedo 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 eLink TCP for Tuxedo to such an application must do one of the following:

This requirement is no different from the requirement that existed before the use of eLink TCP for Tuxedo. 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.

Limitations on the Use of Certain ATMI Functions

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 eLink TCP for Tuxedo.

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

Conversational communication functions are subject to the following operational considerations:

Non-Transactional Communications

The eLink TCP for Tuxedo product supports only non-transactional communications. Therefore, all communications via eLink TCP for Tuxedo are subject to the following operational considerations:

The tpsprio( ) and tpgprio( ) Functions

The tpsprio() and tpgprio() functions are subject to the following operational considerations:

The tpbroadcast() and tpnotify() Functions

The tpbroadcast() and tpnotify() functions are subject to the following operational considerations:

Error Handling

Three kinds of errors can be encountered by local application programs when they send requests through eLink TCP for Tuxedo gateways:

The following sections explain how eLink TCP for Tuxedo handles these different kinds of errors.

Gateway 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.

Remote System Failures

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 eLink TCP for Tuxedo to detect failure.

If the remote target system does not make it possible for eLink TCP for Tuxedo to detect particular types of failure, the eLink TCP for Tuxedo 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 eLink TCP for Tuxedo section.

Application Errors

Application errors are similar to remote system failures. Remote systems may or may not use error indicators to pass information back to the local eLink TCP for Tuxedo 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 eLink TCP for Tuxedo receives a service failure message from a remote system, it:

Note: 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).

 

back to top previous page next page