![]() |
![]() |
|
|
Step 5: Preparing for an XA-Compliant Resource Manager
To run bankapp with an alternative XA-compliant resource manager, you must modify various files. This section describes the following:
How to Change the bankvar File
BLKSIZE=512
DBNAME=bankdb
DBPRIVATE=no
DIPCKEY=80953
FSCONFIG=${APPDIR}/bankdl1
Note: These environment variables pertain to the BEA Tuxedo system only; you may need to set different environment variables or other mechanisms depending on your specific database management system requirements.
How to Change the bankapp Services
Because all database access in bankapp is performed with embedded SQL statements, if your new resource manager supports SQL, you should have no problem. The utility appinit.c includes calls to tpopen() and tpclose().
How to Change the bankapp.mk File
$TUXDIR/udataobj/RM
How to Change crbank and crbankdb
Excerpt from the crbankdb Script
#Copyright (c) BEA Systems, Inc.
#All rights reserved
#
# Create device list
#
dbadmin<<!
echo
crdl
# Replace the following line with your device zero entry
${FSCONFIG} 0 2560
!
#
# Create database files, fields, and secondary indices
#
sql<<!
echo
create database ${DBNAME} with (DEVNAME='${FSCONFIG}',
IPCKEY=${DIPCKEY}, LOGBLOCKING=0, MAXDEV=1,
NBLKTBL=200, NBLOCKS=2048, NBUF=70, NFIELDS=80,
NFILES=20, NFLDNAMES=60, NFREEPART=40, NLCKTBL=200,
NLINKS=80, NPREDS=10, NPROCTBL=20, NSKEYS=20,
NSWAP=50, NTABLES=20, NTRANTBL=20, PERM='0666',
STATISTICS='n'
)
create table BRANCH (
BRANCH_ID integer not null,
BALANCE real,
LAST_ACCT integer,
LAST_TELLER integer,
PHONE char(14),
ADDRESS char(60),
primary key(BRANCH_ID)
) with (
FILETYPE='hash', ICF='PI', FIELDED='FML',
BLOCKLEN=${BLKSIZE}, DBLKS=8, OVBLKS=2
)
!
The first 40 lines give you an idea of what needs to be changed and what may be kept unchanged. As you can see, crbankdb is made up of two documents that provide input to the dbadmin and sql shell commands. The first here file is passed to the BEA Tuxedo system command dbadmin to create a device list for the database.
This command does not work with non-BEA Tuxedo resource managers. Other commands may be needed to create table spaces and/or grant the correct privileges.
How to Change the Configuration File
In the GROUPS section, specify appropriate values (that is, values that are recognized by your resource manager) for the TMSNAME and OPENINFO parameters.
![]() |
![]() |
![]() |
|
Copyright © 2000 BEA Systems, Inc. All rights reserved.
|