[Top] [Prev] [Next] [Bottom]

4. STOCKAPP Servers


A Look at STOCKAPP Servers

This chapter describes the servers delivered with STOCKAPP, identifies the services coded for the stock application and describes how the services are link edited into servers.

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 STOCKAPP use functions provided in the Application Transaction Management Interface (ATMI). These functions allow the services

This chapter provides

Service Definitions

There are four services in STOCKAPP. Each STOCKAPP service matches a COBOL function name in the source code of a server as shown in the following list:

BUYSR
buys a fund/stock record; offered by the BUYSELL server; accepts a VIEW record as input, inserts a CUSTFILE record

SELLSR
sells a fund/stock record; offered by the BUYSELL server; accepts a VIEW record as input, inserts a CUSTFILE record

FUNDPRSR
price quote; offered by the PRICEQUOTE server; accepts a VIEW record as input

FUNDUPSR
fund update; conversational service; offered by FUNDUPDATE server; accepts a VIEW record as input

Building Servers

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.

Using the buildserver Command in the STOCKAPP

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

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:

Servers Built in STOCKAPP.mk

The preceding section on building a 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

The writing and debugging of service subroutines using ATMI functions is the main subject of Chapters 12 through 15 of this guide.

Examples of buildserver command lines can also be found in these chapters and, of course, in Section 1 of the BEA TUXEDO Reference Manual.



[Top] [Prev] [Next] [Bottom]