CORBA 2.6 Programmer's Guide for C++

sample script shown below illustrates how the environment is configured (this example is from the Bank sample
program supplied with NonStop CORBA).
For server-pool environments, HP recommends using a script. If you are not familiar with configuring NonStop TS/MP
environments, see the NonStop TS/MP System Management Manual (note that in TS/MP documentation, server pools are
called server classes). The following sample OSS script illustrates how the environment might be configured:
In the following script, the trace settings have been disabled by placing the comment character open bracket [ in front of
the line. For more information about tracing see Tracing and Debugging Applications.
#
# Bank server PATHMON start-up and configuration script.
#
# Usage: start_server [-v] [-d]
#
# The -v option displays the input used to configure the server class.
# The -d option causes extra application output to be displayed.
# This output is directed to the file "server.log".
#
export PATHMON=smon
export SERVER_CLASS=BANK-SERVER
export CLASSPATH=".:$NSD_ROOT/lib/jorb.jar:$NSD_ROOT/lib/JTS.jar"
# Get options if supplied
while getopts ":vd" opt; do
case $opt in
v ) VERBOSE="-v" ;;
d ) APPL_TRACE_ENABLED="set server env BANK_CFG_LOG=TRUE" ;;
\? ) print "usage: start_server [-v] [-d]"
return 1
esac
done
shift $(($OPTIND - 1))
print "Configuring $SERVER_CLASS"
# Set G_HOMETERM to the terminal identifier on which standard
# output is displayed.
if [[ -z "$HOMETERM" ]] then
# HOMETERM variable was not set explicitly, construct
# the Guardian form of the home terminal identifier
#
# Get information about current terminal
ID=$(who -m)
# Strip off user name
TEMP=${ID#*\ }
# Get the terminal name
set -A O_HOMETERM $TEMP
# Get tcp process name
TEMP=${TEMP##*/G/}
TCP_PROCESS=${TEMP%%/*}
# Get Guardian form of home terminal
G_HOMETERM=\$$TCP_PROCESS.${O_HOMETERM##*/}