TS/MP Pathsend and Server Programming Manual (G06.24+, H06.03+)
Writing Pathway Servers
NonStop TS/MP Pathsend and Server Programming Manual–132500
4-15
Receiving, Servicing, and Replying to
Messages in a Dialog
Use of error values other than 1 (FEEOF) is not recommended. Any other error value
causes the LINKMON process to close the link to the server and return it to the
PATHMON process. If there are no other links to that server process, the server process
is deleted; then, if that process is later needed to service subsequent requests, it will need
to be re-created, thereby affecting system performance. It is recommended, therefore,
that servers always reply with FEEOF to abort a dialog. The server should return any
additional information in the message itself rather than in the reply code.
Whether the current TMF transaction, if any, is also aborted when an error value is
returned depends on the setting of dialog flag bit 14 in the call to
SERVERCLASS_DIALOG_BEGIN_, as explained in the following subsection.
Use of TMF Transactions With Dialogs
A context-sensitive server participates in a TMF transaction in the same manner as
context-free servers would do. The server inherits the transaction identifier of the
received message. The server can abort the transaction when it has the transaction
identifier.
When the server calls FILE_GETRECEIVEINFO_ or CRE_Receive_Read_ and detects
the first message in a dialog, it can also check the dialog flags used to initiate the dialog.
If you want to enforce transaction commit protection during the dialog—that is, ensure
that the requester cannot call ENDTRANSACTION until the server has ended the
dialog—you can code your server to verify that bit 14 of the dialog flags is 0 whenever
the value of bits <12:13> is 1. If the requester’s value for bit 14 is 1, the server can abort
the dialog by replying to the message with an error value of FEEOF (1).
When the one-transaction-per-dialog model is used (when bit 14 of the dialog flags is
equal to 0), the server must end the dialog by replying FEOK to a message before the
requester can commit the associated TMF transaction. To allow requesters to ask the
server to end the dialog, you can program your server to recognize a user-defined “end
request” command.
Table 4-1. Meaning of Error Codes Returned by Context-Sensitive Server in Reply
Error Returned
by Server Meaning
70 (FEContinue) Allow the dialog to continue.
0 (FEOK) End the dialog. After the server replies with this code, the associated
TMF transaction (if any) will be allowed to commit, and the server will
receive no further sends associated with this dialog.
1 (FEEOF) Abort the dialog. After the server replies with this code, there will be no
further sends associated with this dialog.
Any other value
1
Abort the dialog. After the server replies with this code, there will be no
further sends associated with this dialog.
The requester receives this error as the file-system error of the
FEScServerLinkConnect error.
1
Use of other error values is not recommended because of their effect on the link to the server. Refer to
accompanying text for details.