![]() |
![]() |
|
|
TPSVRINIT(3cbl)
Name
TPSVRINIT() - BEA Tuxedo ATMI server initialization routine
Synopsis
LINKAGE SECTION.
01 CMD-LINE.
05 ARGC PIC 9(4) COMP-5.
05 ARGV.
10 ARGS PIC X OCCURS 0 TO 9999 DEPENDING ON ARGC.
01 TPSTATUS-REC.
COPY TPSTATUS.
PROCEDURE DIVISION USING CMD-LINE TPSTATUS-REC.
* User code
EXIT PROGRAM
Description
The BEA Tuxedo ATMI server abstraction calls TPSVRINIT() during its initialization. This routine is called after the program has become a server but before it handles any service requests; thus, BEA Tuxedo ATMI communication may be performed and transactions may be defined in this routine. However, if TPSVRINIT() returns with open connections, asynchronous replies pending or while still in transaction mode, the BEA Tuxedo system will close the connections, ignore replies pending, abort the transaction, and the server will exit gracefully.
If an application does not provide this routine in a server, then the default version provided by the BEA Tuxedo system is called instead. The default TPSVRINIT() calls TPOPEN() and USERLOG() to announce that the server has successfully started.
Application-specific options can be passed into a server and processed in TPSVRINIT() (see servopts(5)). The options are passed through ARGC and ARGV. ARGC contain the number of arguments that have been passed and ARGV contains the arguments (in character format) separated by a single SPACE character. getopt() is used in a BEA Tuxedo system.
If successful TPSVRINIT(), returns [TPOK] in TP-STATUS and the service can start accepting requests. If an error occurs in TPSVRINIT, the application can cause the server to exit gracefully (and not take any service requests) by returning any value except [TPOK] in TP-STATUS.
Return Values
If either TPRETURN() or TPFORWAR() are used outside of a service routine (for example, in clients, or in TPSVRINIT() or TPSVRDONE()), then these routines return having no effect.
Usage
If either TPRETURN() or TPFORWAR() are called in TPSVRINIT(), these routines simply return having no effect.
See Also
![]() |
![]() |
![]() |
|
Copyright © 2001 BEA Systems, Inc. All rights reserved.
|