BEA Logo BEA Tuxedo Release 8.0

  BEA Home  |  Events  |  Solutions  |  Partners  |  Products  |  Services  |  Download  |  Developer Center  |  WebSUPPORT

 

   Tuxedo Documentation   |   Tutorials for Developing BEA Tuxedo ATMI Applications   |   Local Topics   |   Previous Topic   |   Next Topic   |   Contents

 


How to Integrate bankapp with Oracle 8 (XA RM) for a Windows 2000 Platform

  1. Edit the nt\bankvar.cmd and supply suitable values for the following environment variables:
    TUXDIR : Root directory for the BEA TUXEDO system installation
    APPDIR : Application directory in which bankapp files are located
    ORACLE_HOME : Root directory of the Oracle8 installation
    ORACLE_SID : Oracle System ID
    BLK_SIZE: Logical block size
    DBNAME: default name of the database to be used by database utilities and database creation scripts
    DBPRIVATE: indicates whether database is to be opened in share or private mode (yes or no)
    FSCONFIG:Universal Device List for database
    PATH=%TUXDIR%\bin;%TUXDIR%\include;%TUXDIR%\lib;%ORACLE_HOME%\bin;%PATH%
    INCLUDE=%ORACLE_HOME%\rdbms80\xa; %ORACLE_HOME%\pro80\c\include;%include%
    NLSPATH=%TUXDIR%\locale\C
    PLATFORM=inwnt40
    LIB=%TUXDIR%\lib; %ORACLE_HOME%\pro80\lib\msvc; %ORACLE_HOME%\rdbms80\xa; %lib%;

  2. Run the script to set up the environment:
    >bankvar

  3. Edit the TUXDIR\udataobj\RM file as follows:

  4. Build the Transaction Manager Server for Oracle8:
    cd $APPDIR
    buildtms -r Oracle_XA -o TMS_ORA

  5. Edit the nt\bankapp.mak file as indicated in the following table.

    Task

    Value

    Specify values for the following environment variables.

    TUXDIR=Root directory for the BEA Tuxedo system installation


    APPDIR=Application directory in which bankapp files are located


    RM=Oracle_XA


    ORACLE_LIBS=$(ORACLE_HOME)\PRO80\LIB


    RMNAME=Oracle_XA


    SQLPUBLIC=$(ORACLE_HOME)\PRO80\C\INCLUDE


    CFLAGS=$(HOST) -DNOWHAT=1 $(CGFLAGS) $(DFML32)


    CGFLAGS=-DWIN32 -W3 -MD -nologo


    ORACLE_DIR=$(ORACLE_HOME)\bin


    INCDIR=$(TUXDIR)\include


    CC=cl

    In the .ec.c section, Edit rules for creating C programs from embedded SQL programs, (use the proc compiler), set the following values.

    set TUXDIR=$(TUXDIR) & $(ORACLE_DIR)\proc80 mode=ansi release_cursor=yes
    include=$(SQLPUBLIC) include=$(INCDIR) $(SQL_PLATFORM_INC) -c iname=$*.ec

    In the .c.obj section, Edit rule for creating object files from C programs, set the following values.

    $(CC) -c $(CFLAGS) $(SQLPUBLIC) $(INCLUDE) $*.c


     

  6. Update the *.ec files. Use Oracle SQL commands.

  7. Run the makefile:
    copy nt\bankapp.mak to %APPDIR%
    nmake -f bankapp.mak

  8. Edit nt\ubbshm as follows:
    USER_ID=0
    GROUP_ID=0
    UNAME_SITE1=nodename returned by hostname
    TUXDIR=same as specified in bankvar
    APPDIR=same as specified in bankvar

  9. In the GROUPS section of the configuration file, enter the following changes:
    TMSNAME=TMS_ORA
    BANKB1 GRPNO=1 OPENINFO="Oracle_XA:Oracle_XA+Acc=P/user1/PaSsWd1+SesTm=0+LogDir=."
    [
    Oracle_XA +
    required fields:
    Acc=P/oracle_user_id/oracle_password +
    SesTm=Session_time_limit (maximum time a transaction can be inactive) +
    optional fields:
    LogDir=logdir (where XA library trace file is located) +
    MaxCur=maximum_#_of_open cursors +
    SqlNet=connect_string (if Oracle exists over the network)
    (eg. SqlNet=hqfin@NEWDB indicates the database with sid=NEWDB accessed at host hqfin by TCP/IP)
    ]
    BANKB2 GRPNO=2
    OPENINFO="Oracle_XA:Oracle_XA+Acc=P/user2/PaSsWd2+SesTm=0+LogDir=."
    BANKB3 GRPNO=3
    OPENINFO="Oracle_XA:Oracle_XA+Acc=P/user3/PaSsWd3+SesTm=0+LogDir=."

  10. Create the BEA Tuxedo configuration binary file:
    tmloadcf -y nt/ubbshm

  11. Create the device list and the TLOG device on the master machine:
    crtlog -m

  12. Start up the Oracle database instance if not already started.

  13. Boot the BEA Tuxedo system servers:
    tmboot -y

  14. Ensure that the view v$XATRANS$ exists on the database. (The view V$XATRANS$ should have been created during the XA library installation.)

  15. If the v$XATRANS$ view has not been created, create it as follows:

  16. Create the bankapp database and database objects for Oracle RM:

  17. Write the code to create user2 and user3 with passwords PaSsWd2 and PaSsWd3, respectively, following the method described in the above steps:
    SQL*plus> start $APPDIR/ crbank-ora8.sql

  18. Populate the database:
    nt\populate

  19. Generate transactions against the database:
    driver

  20. Run the bankapp client:
    run

  21. Shut down the application:
    tmshutdown -y

See Also

 

back to top previous page next page