This chapter describes the servers delivered with Servers are executable processes that offer one or more services. In the BEA TUXEDO system, they continually accept requests (from processes acting as clients) and dispatch them to the appropriate services. Services are subroutines of COBOL language code written specifically for an application. It is the services accessing a resource manager that provide the functionality for which your BEA TUXEDO system transaction processing application is being developed. Service routines are one part of the application that must be written by the BEA TUXEDO system programmer (user-defined clients being another part).
All the services of A Look at STOCKAPP Servers
STOCKAPP
, identifies the services coded for the stock application and describes how the services are link edited into servers.
STOCKAPP
use functions provided in the Application Transaction Management Interface (ATMI). These functions allow the services
STOCKAPP
services and servers
buildserver
command options used to compile and build each server
There are four services in Service Definitions
STOCKAPP
. Each STOCKAPP
service matches a COBOL function name in the source code of a server as shown in the following list:
BUYSR
BUYSELL
server; accepts a VIEW
record as input, inserts a CUSTFILE
record
SELLSR
BUYSELL
server; accepts a VIEW
record as input, inserts a CUSTFILE
record
FUNDPRSR
PRICEQUOTE
server; accepts a VIEW
record as input
FUNDUPSR
FUNDUPDATE
server; accepts a VIEW
record as input
buildserver
is used to put together an executable server. Options identify the names of the output file, the input files provided by the application, and various libraries that permit you to run a BEA TUXEDO system application in a variety of ways.
buildserver
with the -C
option invokes the cobcc
command. The environment variables ALTCC
and ALTCFLAGS
can be set to name an alternative compile command and to set flags for the compile and link edit phases. The key buildserver
command line options are illustrated in the examples that follow.
This section provides the buildserver
command used in STOCKAPP.mk
to compile and build each server in the stock application. Refer to the buildserver
(1) reference page in Section 1 of the BEA TUXEDO Reference Manual for complete details.
The BUYSELL
server is derived from files that contain the code for the BUYSR
and SELLSR
functions. The BUYSELL
server is first compiled to a BUYSELL.o
file before supplying it to the buildserver
command so that any compile-time errors can be clearly identified and dealt with before this step. The BUYSELL.o
file is created in the following step (done for you in STOCKAPP.mk
). The buildserver
command that was used to build the BUYSELL
server follows:
buildserver -C -v -o BUYSELL -s SELLSR -f SELLSR.cbl -s BUYSR -f BUYSR.cbl
The explanation of the command line options is as follows:
-C
option is used to build servers with COBOL modules.
-v
option is used to specify the verbose mode. It writes the cc
command to its standard output.
The preceding section on building a The writing and debugging of service subroutines using ATMI functions is the main subject of Chapters 12 through 15 of this guide.
Examples of Servers Built in STOCKAPP.mk
STOCKAPP
server was included because it is important that you understand how the buildserver
command is specified. However, in actual practice you are apt to incorporate the build into a makefile and that is the way it is done in STOCKAPP
. The STOCKAPP
makefile is discussed in Chapter 5, "The STOCKAPP Makefile."
References
buildserver
command lines can also be found in these chapters and, of course, in Section 1 of the BEA TUXEDO Reference Manual.