xmlfmlapp is a sample ATMI stock application that demonstrates how to query, buy and sell stocks via client request. The application runs three services, "
QUERY", "
BUY" and "
SELL" on a single server. These three services are written using C language and accept FML32 buffers for input and output.
The xmlfmlapp tutorial is presented in three sections:
The files that make up the xmlfmlapp application are delivered in the
samples/atmi/xmlfmlapp directory. The
xmlfmlapp directory contains the following files:
The xmlfmlapp implements the request/response mode using the following three services:
•
|
QUERY - to query a stock price
|
stockclient.c is a client program that uses input from the specified XML files. It calls the
QUERY,
BUY, and
SELL services and returns the executed results. As an executable, it is invoked as follows:
•
|
“What You Can Do Using the ATMI” in Introducing Oracle Tuxedo ATMI
|
The QUERY service in the
xmlfmlapp program accepts FML32 buffers. It uses functions provided in the Application-to-Transaction Monitor Interface (ATMI) to query stock information and then returns the results to the client using FML32 buffers.
The BUY service in the
xmlfmlapp program accepts FML32 buffers. It uses functions provided in the Application-to-Transaction Monitor Interface (ATMI) to buy stock.
The SELL service in the
xmlfmlapp program accepts FML32 buffers. It uses functions provided in the Application-to-Transaction Monitor Interface (ATMI) to sell stock.
1.
|
Ensure that TUXDIR is set. If it is not set, execution of the file fails with the following message:
|
2.
|
Set TUXDIR to the root directory of your Oracle Tuxedo system directory structure, and export it.
|
3.
|
Set APPDIR to the directory {TUXDIR}/samples/atmi/xmlfmlapp which is the directory where xmlfmlapp source files are located. APPDIR is a directory where the Oracle Tuxedo system looks for your application-specific files. If you copied the xmlfmlapp files to a different directory to safeguard the original source files, then enter the directory there. It does not have to be under TUXDIR.
|
where setenv.cmd is the executable for Windows. Use
setenv.sh on Unix systems.
LD_LIBRARY_PATH must include
$TUXDIR/lib on systems that use shared libraries, with the exception of HP-UX and AIX.
Use /bin/sh rather than
csh for your shell.
Note:
|
For each <string> (that is, for each string shown between angle brackets), substitute an appropriate value.
|
•
|
UBBCONFIG(5) in File Formats, Data Descriptions, MIBs, and System Processes Reference
|
where setenv.cmd is the executable for Windows. Use
setenv.sh on Unix systems.
Once you have finished editing the configuration file, you must load it into a binary file on your MASTER machine. The name of the binary configuration file is
TUXCONFIG; its path name is defined in the
TUXCONFIG environment variable. The file should be created by a person with the effective user ID and group ID of the Oracle Tuxedo system administrator, which should be the same as the
UID and
GID values in your configuration file. If this requirement is not met, you may have permission problems in running
xmlfmlapp.
1.
|
To create TUXCONFIG, enter the following command:
|
TUXCONFIG can be installed only on the
MASTER machine; it is propagated to other machines by
tmboot when the application is booted.
tmloadcf parses the text configuration file (
UBBCONFIG) for syntax errors before it loads it, so if there are errors in the file, the job fails.
Before booting xmlfmlapp, verify that your machine has enough IPC resources to support your application. To generate a report on IPC resources, run the
tmboot command with the
-c option.
•
|
tmboot(1) in the Oracle Tuxedo Command Reference
|
To bring down xmlfmlapp, enter the
tmshutdown(1) command with no arguments, from the
MASTER machine, as follows.