BEA Logo BEA Tuxedo Release 7.1

  Corporate Info  |  News  |  Solutions  |  Products  |  Partners  |  Services  |  Events  |  Download  |  How To Buy

 

   Tuxedo Doc Home   |   Administration   |   Topic List   |   Previous   |   Next   |   Contents

   Using the BEA Tuxedo Domains Component

Sample Domains Application: creditapp

A sample application, creditapp, is distributed with the BEA Tuxedo system. creditapp is a runnable version of the hypothetical application that was the basis for separating bankapp and the credit card application into domains, as discussed earlier in this topic.

The application is located in TUXDIR/apps/creditapp and includes the following files.

creditapp Files


ACCT.ec       ACCTA.ec      AUDITC.c      BAL.ec       BALANCE.m
BALANCEA.m BALC.ec BTADD.ec CBALANCE.m CCLOSE.m
CDEPOSIT.m CLOSE.m COPEN.m CRDT.ec CRDTA.ec
CRMENU.m CRMENU2.m CTRANSFER.m CWITHDRAW.m DEPOSIT.m
DEPOSITA.m FILES HCBALANCE.m HCCLOSE.m HCLOSE.m
HCOPEN.m HCWITHDRAW.m HELP.m HOPEN.m OPEN.m
README RUNME RUNME.sh SETUP.sh TLR.ec
TLR1.ec TLR2.ec TLR3.ec TLRA.ec TRANSFER.m
WITHDRAW.m WITHDRAWA.m XFER.c appinit.c aud.h
aud.v audit.c auditcon.c bank.flds bank.flds.h
bank.h cleanup.sh crbank.sh crbankdb.sh crdt_app.mk
crdt_app2.mk crdt_app3.mk crdt_app4.mk crdt_flds.h crdtvar
crdtvar2 credit.flds crtlog.sh crtlog2 crtlog2.sh
domcon1 domcon2 domcon3 domcon4 driver.sh
envfile.sh gendata.c gentran.c hostmk listnr
populate.sh run.sh setenv ubbdom1 ubbdom2
ubbdom3 ubbdom4 util.c


The creditapp README File

The following README file is from the creditapp directory. The README file documents a script that installs and runs creditapp. It has been edited to include a few things that were not included in the original script.

README File for creditapp


SIMPLE BUILD PROCEDURE

The creditapp application is an enhancement of the
bankapp and hostapp applications.

The creditapp application is designed to be a four domain application,
so the software must be built on four machines. The RUNME.sh
script will lead you through the necessary steps.

 
Step 1: Copy the Software for creditapp.

Make a new directory under your $HOME directory and copy all of
the source files from <TUXDIR>/apps/creditapp into that directory.
TUXDIR is the root directory under which your BEA TUXEDO System
software is installed. We call the new directory
$HOME /creditapp. The rest of the steps in this procedure are
done in the directory $HOME/creditapp.

 
Step 2: On each of the remaining three machines:

Make a directory creditapp in a directory that can be used for the application.

We call this directory $HOME/creditapp.

Make a note of the full directory path for $HOME/creditapp and TUXDIR
for each machine. These will be needed by the RUNME.sh script.

 
Step 3: On the "master site" execute the "RUNME.sh" script.

The shell script "RUNME.sh" is an interactive program designed to
lead you through initialization, booting, shutdown and cleanup
of the four domain creditapp application. The shell is interactive
and requires no command line arguments. All you need in the directory
is the source from the TUXDIR/apps/creditapp directory that you
copied in Step 1.

You will be prompted to enter values for RSH and RCP
environment variables, or accept the defaults.

IT IS VERY IMPORTANT THAT VALUES FOR RSH AND RCP BE ENTERED AS THEY ARE
USED TO REMOTE COPY AND EXECUTE THE NECESSARY SCRIPTS.

The following environment variables are important. The script picks up
the values for TUXDIR and APPDIR from your environment and
prompts you (in OPTION 4) for BLKSIZE:

TUXDIR         Root directory of the BEA TUXEDO System where you have
installed the software.

APPDIR          Directory in which the creditapp application resides.
crdtvar.dm1 initially is set to allow this to default
to the current working directory, which agrees with
our intention to use $HOME/creditapp. This is the
directory into which you copied the creditapp files in
Step 1.

BLKSIZE         Logical blocksize for the database in bytes.
Must be an integral multiple of the physical
page size of the computer (for example, 512 bytes or 4096 bytes).

When you invoke RUNME.sh you are shown a menu with 10 options (11 counting "quit").
Here is the list of choices:

          1) Initialize configuration files and makefiles.
2) Copy files to remote sites.
3) Build crdtapp clients and servers.
4) Create databases.
5) Generate binary tuxconfig and bdmconfig files.
6) Create Transaction Log file.
7) Boot the application.
8) Populate the database.
9) Shutdown the application.
10) Cleanup IPC Resources, database files and log files.
q) Quit.

To go through the complete process of building and running the sample
application, start with choice No. 1. When the script completes a step,
the menu is displayed for your next choice.

 
OPTION 1. Initialize configuration files and makefiles.
This option sets up makefiles, UBBCONFIG and DMCONFIG files that are
necessary for the application.

          All questions must be answered.

          ENTER the system name: enter uname for machines you are using
beginning with the current machine you are on.

 
ENTER TUXDIR for each machine.

          ENTER APPDIR for each machine.

 
Continue to answer all queries.

 
An example of 4 hexadecimal digits may be (beef, cfff, 6774, aeef).
NOTE: EACH MACHINE MUST HAVE A UNIQUE HEX SEQUENCE.

 
OPTION 2. Copies the files to the other domains in the configuration.

 
OPTION 3. Builds clients and servers on all machines.

          NOTE: CAREFULLY CHECK THAT THE BUILDS ARE COMPLETED SUCCESSFULLY ON
EACH SITE. IF NECESSARY YOU MAY RUN THE BUILD YOURSELF.

                ON THE SPECIFIC SITE ENTER
nohup make -f CRDT{$MACH}.mk2

                where ${MACH} is the uname for the machine you are building on.
For example,

                        nohup make -f CRDTtux1.mk2

 
OPTION 4. Builds the databases on each site.

          NOTE: ON EACH SITE MAKE SURE THE BLKSIZE VALUE IN files

                crdt${MACH}.dm1 for the primary site

                or crdt${MACH}.dm2 for the remote sites

                where ${MACH} is the uname for the machine you are building on

                ARE CORRECT FOR THAT SPECIFIC MACHINE

 
OPTION 5. Generates the tuxconfig and bdmconfig files.

 
All other options are similar to bankapp.

 
After OPTION 8 : Populate the database

                  Enter q to Quit the menu.

RUNNING CREDITAPP.
__________________

 
On each machine a script run.sh exists.

            Execute run.sh.

            run
At the response :

               Is this machine the Credit Card Authorization Center(y/n)?

               If machine is the primary machine answer y .
If machine is any other answer n.

On the primary machine a different menu will be seen than the other 3 machines.

All Credit accounts exist on primary machine and all machines can access any
account.

 
ACCOUNTS 10000000 - 120000000

Machines 2,3,4 are the enhanced bankapp application.

            ACCOUNTS 10000 - 39999 exist on machine 2
ACCOUNTS 40000 - 79999 exist on machine 3
ACCOUNTS 80000 - 109999 exist on machine 4

All processing is done using the /DOMAIN software.

A tail -f of the ULOG###### will show the actual processing of the requests.

On the machine that will process the request enter :

           tail -f ULOG###### where ###### is today's date.