![]() |
![]() |
|
|
Building qsample
The following procedure provides instructions on building and running the qsample application.
mkdir qsampdir
cd qsampdir
This is suggested so you will be able to see clearly the qsample files you have at the start and the additional files you create along the way. Use the standard shell (/bin/sh) or the Korn shell; not the C shell (/bin/csh).
cp $TUXDIR/apps/qsample/* .
You will be editing some of the files and making them executable, so it is best to begin with a copy of the files rather than the originals delivered with the software.
$ ls
README
client.c
crlog
crque
makefile
rmipc
runsample
server.c
setenv
ubb.sample
$
The files that make up the application are:
Open the setenv file and modify the TUXDIR value to the absolute path of the root directory of the BEA Tuxedo system installation. Remove the angle bracket characters (< and >) when editing this value.
The runsample script contains several commands; each command is preceded by a comment line that describes the purpose of the command.
#set the environment
. ./setenv
chmod +w ubb.sample
uname="\Quname -n\Q"
ed ubb.sample<<!
g;<uname -n>;s;;${uname};
g;<full path of Tuxedo software>;s;;${TUXDIR};
g;<full path of APPDIR>;s;;${APPDIR};
w
q
!
#build the client and server
make client server
#create the tuxconfig file
tmloadcf -y ubb.sample
#create the TLOG
./crlog
#create the QUE
./crque
#boot the application
tmboot -y
#run the client
client
#shutdown the application
tmshutdown -y
#remove the client and server
make clean
#remove the QUE ipc resources
./rmipc
#remove all files created
rm tuxconfig QUE stdout stderr TLOG ULOG*
When you run this script you will see a series of messages on your screen that are generated by the various commands. Included among them are the following lines:
before: this is a q example
after: THIS IS A Q EXAMPLE
The before: line is a copy of the string that client enqueues for processing by server. The after: line is what server sends back. These two lines prove that the program worked successfully.
![]() |
![]() |
|
Copyright © 2001 BEA Systems, Inc. All rights reserved.
|