1.安装
点击exe程序安装tuxedo,一切默认下一步。安装目录为D:\Oracle\Tuxedo\tuxedo11gR1
2.复制simppapp到指定目录
atmi下的事例至:D:\Oracle\Tuxedo\simpapp
3.设置vc++环境变量
如果想在windows上运行tuxedo程序,需在windows机器中安装vc++6.0,设置vc++设置环境变量,加入如下内容:
;C:\Program Files (x86)\Microsoft Visual Studio\VC98\Bin
4设置tuxedo环境变量
编辑D:\Oracle\Tuxedo\simpapp\setenv.cmd,设置成如下内容:
rem (c) 2003 BEA Systems, Inc. All Rights Reserved.
rem Copyright (c) 2000 BEA Systems, Inc.
rem All Rights Reserved
rem THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF
rem BEA Systems, Inc.
rem The copyright notice above does not evidence any
rem actual or intended publication of such source code.
rem Copyright (c) 2000 BEA Systems, Inc.
rem All rights reserved
rem ident “@(#) apps/simpapp/setenv.cmd Revision:1.5 ”
set TUXDIR=D:\Oracle\Tuxedo\tuxedo11gR1
set WSNADDR=//192.168.191.3:3200
set APPDIR=D:\Oracle\Tuxedo\simpapp
set PATH=%TUXDIR%\bin;%APPDIR%;%PATH%
set TUXCONFIG=%APPDIR%\tuxconfig
VCVARS32.BAT
5 编辑ubbsimple文件
注意:计算机名称使用大写家 “” 括起来 ,可以使用echo %computername% 显示机器名,最下面一行有空行
**# (c) 2003 BEA Systems, Inc. All Rights Reserved.
#ident "@(#) samples/atmi/simpapp/ubbsimple $Revision: 1.7 $"
#Skeleton UBBCONFIG file for the TUXEDO Simple Application.
#Replace the <bracketed> items with the appropriate values.
*RESOURCES
#IPCKEY <Replace with a valid IPC Key>
#Example:**
IPCKEY 123456DOMAINID simpapp
MASTER simple
MAXACCESSERS 10
MAXSERVERS 5
MAXSERVICES 10
MODEL SHM
LDBAL N*MACHINES
DEFAULT:APPDIR="D:\Oracle\Tuxedo\simpapp"TUXCONFIG="D:\Oracle\Tuxedo\simpapp\tuxconfig"TUXDIR="D:\Oracle\Tuxedo\tuxedo11gR1"
**#Example:
# APPDIR="/home/me/simpapp"
# TUXCONFIG="/home/me/simpapp/tuxconfig"
# TUXDIR="/usr/tuxedo"**"ZHOUPC" LMID=simpleMAXWSCLIENTS=5
#Example:
#beatux LMID=simple*GROUPS
GROUP1LMID=simple GRPNO=1 OPENINFO=NONE*SERVERS
DEFAULT:CLOPT="-A"simpserv SRVGRP=GROUP1 SRVID=1
WSL SRVGRP=GROUP1 SRVID=10CLOPT="-A -- -n //192.168.191.3:3200"
*SERVICES
TOUPPER
6 执行环境变量
环境变量内容会写入计算机》属性》path中
7 编译
buildclient -f simpcl.c -o wsclient -w
buildserver -f simpsev.c -o simpsev -s TOUPPER
tmloadcf -y ubbconfig
8 演示
9 遇到的问题
(1)WSNAT_CAT:1042: ERROR: tpcall() call failed, tperrno = 6
执行psc发现没有toupper服务
解决:
在编译服务端程序时,未 -s 编译服务。正确的编译应该为buildserver -f simpsev.c -o simpsev -s TOUPPER,不要忘记 -s TOUPPER
(2)tmloadcf -y ubbsimple
出现的问题解决
CMDTUX_CAT:868: ERROR: tmloadcf cannot run on a non-master node
解决方法:ubbsimple 文件中将改为你的机器名,在windows下使用
echo %computername% 显示机器名,
(3)CMDTUX_CAT:1615: ERROR: Identifier or number must be followed by white space or punctuation
ubbsimple 文件最后一行TOUPPER 后应该有回车
(4)CMDTUX_CAT:866: ERROR: tmloadcf: Severe error found. Stop syntax checking.
ubbsimple文件有问题,最后通过修改MACINES一节格式解决