This chapter describes the directory structure under the
Table 2-1 lists the files of the banking application. The left hand column lists the source files delivered with the BEA TUXEDO software. The center column lists files that are generated when the Directory Structure for bankapp
apps
directory, which is subordinate to the root directory for your BEA TUXEDO system software. We will also take a look at the files in the bankapp
directory. The directory structure is shown in Figure 2-1.
Figure 2-1 Directory Structure under apps/
simpapp
is described in Chapter 1, "A Simple Application." hostapp
is not distributed except under special arrangements.
Files
bankapp.mk
is run. The right hand column gives a brief summary of the purpose of the file.
Of the forty odd files in the directory:
.m
files that create data entry masks managed by the system client program, mio
(1).
.ec
files that are source files for service subroutines using embedded SQL statements.
The remaining files have various roles; some are files you need in any application, others are The first key line checks to see if So, set Another line in Another important line sets a value for The other variables specified in When you have made all the changes to If your operating system is SunOS, you need to put Another requirement for SunOS users: use make
files for various add-ons, still others are present simply to facilitate the use of bankapp
as an example. In subsequent chapters we will closely examine a number of the files, and give a more complete explanation of their role in the sample application. For now we just want to discuss the bankvar
file.
Edit bankvar to Set Environment Variables
bankvar
is a file of environment variables needed by bankapp
. The file bankvar
is approximately 185 lines due largely to the extensive comments, but there are only a few that you should be concerned about immediately.
TUXDIR
is set. If it is not, execution of the file fails with the message:
TUXDIR: parameter null or not set
TUXDIR
to the root directory of your BEA TUXEDO system directory structure, and export it.
bankvar
sets APPDIR
to the directory ${TUXDIR}/apps/bankapp
, which is the directory where bankapp
source files are located. APPDIR
is a directory where BEA TUXEDO looks for your application-specific files. You might prefer to copy the bankapp
files to a different directory to safeguard the original source files. If you do, then the directory you use should be entered here. It does not have to be under TUXDIR
.
DIPCKEY
. This is an IPCKEY
for a BEA TUXEDO system database. There is a discussion of databases in Chapter 6; the use of this key is described there. For now, all you need to know about it is that it must be different from the value of the BEA TUXEDO IPCKEY
specified in the UBBCONFIG
file (Chapter 7).
bankvar
play various roles in the sample application and you will need to be aware of them when you are developing your own application. They will all be mentioned at appropriate places later in this guide. Grouping them all in bankvar
is done to show you an example that you may want to adapt at a later time for use with a real application.
bankvar
that you need to, execute bankvar
as follows:
. ./bankvar
Listing 2-1
bankvar: Environment Variables for bankapp
#Copyright (c) 1997, 1996 BEA Systems, Inc.
#Copyright (c) 1995, 1994 Novell, Inc.
#Copyright (c) 1993, 1992, 1991, 1990 Unix System Laboratories, Inc.
#All rights reserved
#
# This file sets all the environment variables needed by the BEA TUXEDO software
# to run the bankapp
#
# This directory contains all the BEA TUXEDO software
# System administrator must set this variable
#
if [ -z "${TUXDIR}" ] ; then
if [ ! -z "${ROOTDIR}" ] ; then
TUXDIR=$ROOTDIR
export TUXDIR
fi
fi
TUXDIR=${TUXDIR:?}
#
# This directory contains all the user written code
#
# Contains the full path name of the directory that the application
# generator should place the files it creates
#
APPDIR=${TUXDIR}/apps/bankapp
#
# This path contains the shared objects that are dynamically linked at
# runtime in certain environments, e.g., SVR4.
#
LD_LIBRARY_PATH=${TUXDIR}/lib:${LD_LIBRARY_PATH}
#
# Logical block size; Database Administrator must set this variable
#
BLKSIZE=512
#
# Set default name of the database to be used by database utilities
# and database creation scripts
#
DBNAME=bankdb
#
# Indicate whether database is to be opened in share or private mode
#
DBPRIVATE=no
#
# Set Ipc Key for the database; this MUST differ from the UBBCONFIG
# *RESOURCES IPCKEY parameter
#
DIPCKEY=80953
#
# Environment file to be used by tmloadcf
#
ENVFILE=${APPDIR}/ENVFILE
#
# List of field table files to be used by mc, viewc, tmloadcf, etc.
#
FIELDTBLS=Usysflds,bank.flds,credit.flds,event.flds
#
FIELDTBLS32=Usysfl32,evt_mib,tpadm
#
# List of directories to search to find field table files
#
FLDTBLDIR=${TUXDIR}/udataobj:${APPDIR}
#
FLDTBLDIR32=${TUXDIR}/udataobj:${APPDIR}
#
# Universal Device List for database
#
FSCONFIG=${APPDIR}/bankdl1
#
# List of directories to search to find mask files for mio
#
MASKPATH=${APPDIR}
#
# Network address, used in MENU script
#
NADDR=
#
# Network device name
#
NDEVICE=
#
# Network listener address, used in MENU script
#
NLSADDR=
#
# List of services permitted to the current invoker of mio
#
OKXACTS=ALL
#
# Make sure TERM is set for mio
#
TERM=${TERM:?}
#
# Set device for the transaction log; this should match the TLOGDEVICE
# parameter under this site's LMID in the *MACHINES section of the
# UBBCONFIG file
#
TLOGDEVICE=${APPDIR}/TLOG
#
# Device for binary file that gives /T all its information
#
TUXCONFIG=${APPDIR}/tuxconfig
#
# Set the prefix of the file which is to contain the central user log;
# this should match the ULOGPFX parameter under this site's LMID in the
# *MACHINES section of the UBBCONFIG file
#
ULOGPFX=${APPDIR}/ULOG
#
# System name, used by RUNME.sh
#
UNAME=
#
# List of view files to be used by viewc, tmloadcf, etc.
#
VIEWFILES=aud.V
#
VIEWFILES32=mib_views,tmib_views
#
# List of directories to search to find view files
#
VIEWDIR=${TUXDIR}/udataobj:${APPDIR}
#
VIEWDIR32=${TUXDIR}/udataobj:${APPDIR}
#
# Specify the Q device (if events included in demo)
#
QMCONFIG=${APPDIR}/qdevice
#
# Export all variables just set
#
export TUXDIR APPDIR BLKSIZE DBNAME DBPRIVATE DIPCKEY ENVFILE
export LD_LIBRARY_PATH
export FIELDTBLS FLDTBLDIR FSCONFIG MASKPATH OKXACTS TERM
export FIELDTBLS32 FLDTBLDIR32
export TLOGDEVICE TUXCONFIG ULOGPFX
export VIEWDIR VIEWFILES
export VIEWDIR32 VIEWFILES32
export QMCONFIG
#
# Add TUXDIR/bin to PATH if not already there
#
a="\Qecho $PATH | grep ${TUXDIR}/bin\Q"
if [ x"$a" = x ]
then
PATH=${TUXDIR}/bin:${PATH}
export PATH
fi
#
# Add APPDIR to PATH if not already there
Additional PATH Component for SunOS
/usr/5bin
at the front of your PATH
. The following command can be used:
PATH=/usr/5bin:$PATH;export PATH
/bin/sh
rather than csh
for your shell.
[Top] [Prev] [Next] [Bottom]