|
|
|
|
A conversation occurs between an invoking TP and an invoked TP. This section describes how the invoking and invoked TPs are started.
The invoking TP is started by a user entering a command, by a shell script, or by batch file command.
The invoked TP can be started by a user, automatically by SNAP-IX, or automatically by a TP server application. When the System Administrator configures each invoked TP, the System Administrator must specify whether the TP is started automatically or by the user.
If an invoked TP is configured to be started by a user, the user can start the invoked TP either before or after the invoking TP. A TP started in this manner is called a queued, operator-started TP:
If the user starts the invoking TP first, and does not start the invoked TP before the timeout value for starting the TP (see Timeout Values for Invoked TPs) is reached, the incoming Allocate fails.
If the user starts the invoked TP before the invoking TP issues the [MC_]ALLOCATE verb, the invoked TP waits until the Attach from the invoking TP arrives, or until the RECEIVE_ALLOCATE timeout value (see Timeout Values for Invoked TPs) is reached.
An invoked TP can be configured to start automatically under one of the following conditions:
The first time an Attach (the SNA message from the remote LU containing the allocation request) is received by the LU that serves the invoked TP. A TP started in this manner is called a queued, automatically started TP.
If the invoked TP is not running, the first incoming Allocate starts it; a response to the incoming Allocate is held until the RECEIVE_ALLOCATE verb in the invoked TP is executed (or until a timeout occurs; see Timeout Values for Invoked TPs). At that time, APPC assigns a conversation ID, which is returned to both TPs as an identifier for the conversation.
If the invoked TP is already running, the Attach is queued until the invoked TP issues another RECEIVE_ALLOCATE verb, or until it finishes running and can be restarted (or until a timeout occurs; see Timeout Values for Invoked TPs).
Each time an Attach is received by the LU that serves the invoked TP. A new instance of the program is loaded and started with each incoming Attach. A TP started in this manner is called a nonqueued, automatically started TP.
The Attach is queued until the RECEIVE_ALLOCATE verb in the invoked TP is executed (or until a timeout occurs; see Timeout Values for Invoked TPs). When RECEIVE_ALLOCATE is executed, APPC assigns a conversation ID, which is returned to both TPs as an identifier for the conversation.
After it has ended a conversation, the invoked TP may terminate, or it may issue another RECEIVE_ALLOCATE. For frequently-used programs, this provides a way of avoiding the performance overhead of starting a new instance of the program for each conversation. Each time an Attach is received for a nonqueued, automatically started TP, SNAP-IX checks whether there is already a RECEIVE_ALLOCATE outstanding from an instance of this TP. If so, this TP is used for the incoming conversation; otherwise, SNAP-IX starts a new instance of the program.
When an Attach arrives at the SNAP-IX node, SNAP-IX distributes Attaches to TP server applications that have registered to receive the Attaches. The process SNAP-IX uses to route Attaches to an appropriate TP server consists of the following stages:
One or more applications register to receive Attaches for LU and TP names. A TP server application can use a wildcard to specify the scope of Attaches that the TP server is registered to receive. A TP server application can use a wildcard for any of the following:
Local LU alias
TP name
Fully qualified partner LU name, which can use a wildcard for any of the following:
Partial network name
Whole network name
Partial network name followed by CP name
Fully qualified partner LU name
Only a single TP server application can register for a given TP and LU combination, including wildcards. For example, one TP server application can register TPNAME1 and *, while the same TP or another TP server application registers TPNAME1 and LUNAME1. Registration of this type is legal, but two TP server applications cannot both register TPNAME1 and LUNAME1. The second registration attempt will fail.
When an Attach arrives at SNAP-IX, SNAP-IX attempts to find the TP server application whose registration most closely matches the TP name, LU alias and fully qualified LU name received on the Attach. The matches are examined for greatest closeness in the following order:
TP name match
LU alias match
Exact fully qualified partner LU name match
Wildcard fully qualified partner LU name match
When SNAP-IX finds a match, it delivers the Attach to the TP server application. The TP server has the following options:
Reject the Attach, in which case SNAP-IX returns the Attach to the invoking TP and includes an error code provided by the TP server application
Accept the Attach, in which case SNAP-IX informs the invoking TP that the Attach has been accepted
If no matches are found after trying all combinations above search criteria, SNAP-IX rejects the Attach and returns the Attach to the invoking TP with the appropriate error code.
The SNAP-IX configuration specifies two timeout values that define how long APPC waits to establish a conversation between two TPs, as follows:
This value defines how long an Attach is queued waiting for the invoked TP to be started and to issue the RECEIVE_ALLOCATE verb. If RECEIVE_ALLOCATE is not issued within this time, the [MC_]ALLOCATE verb in the invoking TP fails. This timeout is defined in the configuration of the local LU that the TP uses.
This value defines how long a RECEIVE_ALLOCATE verb issued by the invoked TP waits for an Attach from the invoking TP. If an Attach is not received within this time, the RECEIVE_ALLOCATE verb in the invoked TP fails. The configuration can specify one of the following:
RECEIVE_ALLOCATE waits indefinitely
RECEIVE_ALLOCATE fails unless the Attach has already been received
A specific timeout value is provided
This timeout is defined for the invoked TP in the SNAP-IX invokable TP data file.
For more information about the configuration of invoked TPs, refer to the SNAP-IX Administration Guide.
|
|
|
|
|