![]() |
![]() |
|
|
Examining the STOCKAPP Clients
In the client-server architecture of the BEA Tuxedo system, there are two modes of communication:
The following figure shows the hierarchy for STOCKAPP. The user selects one of the four service requests. The oval shapes in the illustration represent application services.
STOCKAPP Requests
Typed buffers are an essential part of the BEA Tuxedo system. In the BEA Tuxedo system, a typed buffer is designed to hold a specific data type. Six types are defined: VIEW, STRING, CARRAY, X_OCTET, X_COMMON, and XML. Applications have the ability to define additional types.
A Request/Response Client: BUY.cbl
BUY is an example of a client program. It makes account inquiries that call on the service BUYSR. As an executable, it is invoked as follows:
BUY
BUY.cbl Source Code
Review the following sections of the BUY.cbl program.
* Now register the client with the system
* Issue a TPCALL
* Clean up
The indicated sections contain all of the places in BUY.cbl where the BEA Tuxedo ATMI functions are used. Similar to csimpl.cbl, BUY.cbl needs to call TPINITIALIZE to join the application; call TPCALL to make an RPC request to a service; and call TPTERM to leave an application. Note also that BUY.cbl is an example of a program that uses a VIEW typed record and a structure that is defined in the cust file. The source code for the structure can be found in the view description file, cust.V.
Building Clients
View description files, of which cust is an example, are processed by the view compiler, viewc(1). Run view(c) to compile the view.
viewc-C-n
cust.v
where viewc has three output files: a COBOL file (CUST.cbl), a binary view description file (cust.V), and a header file (cust.h).
The client programs, BUY.cbl, FUNDPR.cbl, FUNDUP.cbl, and SELL.cbl, are processed by buildclient(1) to compile them and/or link edit them with the necessary BEA Tuxedo libraries.
You can use any of these commands individually, if you choose, but rules for all these steps are included in STOCKAPP.mk.
See Also
![]() |
![]() |
![]() |
|
Copyright © 2000 BEA Systems, Inc. All rights reserved.
|