前提:
已经安装好了Tuxedo,请参考:Tuxedo 11g 安装 for windows
正文:
以下就以tuxedo中自带的一个简单的例子(simpapp)演示一个应用的部署过程。
1、准备项目
1)将D:\Program Files\Tuxedo\tuxedo11gR1_VS2010\samples\atmi\simpapp 复制到D:\temp\simpapp
2)将D:\Program Files\Microsoft Visual Studio 10.0\VC\bin\vcvar32.bat 复制到D:\temp\simpapp下
2、修改配置文件
1)修改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:\Program Files\Tuxedo\tuxedo11gR1_VS2010
set WSNADDR=192.168.1.201:3050
set APPDIR=D:\temp\simpapp
set PATH=%TUXDIR%\bin;%APPDIR%;%PATH%
set TUXCONFIG=%APPDIR%\tuxconfig
Call D:\temp\simpapp\vcvars32.bat
2)修改ubbsimple
# (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 123456
#Example:
#IPCKEY 123456
DOMAINID simpapp
MASTER simple
MAXACCESSERS 10
MAXSERVERS 5
MAXSERVICES 10
MODEL SHM
LDBAL N
*MACHINES
DEFAULT:
APPDIR="D:\temp\simpapp"
TUXCONFIG="D:\temp\simpapp\tuxconfig"
TUXDIR="D:\Program Files\Tuxedo\tuxedo11gR1_VS2010"
"ADMIN-PC" LMID=simple
#Example:
#beatux LMID=simple
*GROUPS
GROUP1
LMID=simple GRPNO=1 OPENINFO=NONE
*SERVERS
DEFAULT:
CLOPT="-A"
simpserv SRVGRP=GROUP1 SRVID=1
*SERVICES
TOUPPER
3、加载配置文件
打开cmd窗口,进入当前应用目录下
1)执行 setenv.cmd
2)执行 tmloadcf ubbsimple 来生成二进制的tuxconfig文件
4、编译程序
1)编译客户端代码simpcl.c,命令buildclient -o simpc1 -f simpcl.c
2)编译服务器端代码simpserv.c,命令buildserver -o simpserv -f simpserv.c -s TOUPPER
5、启动Tuxedo
1) 启动Tuxedo:tmboot -y
2) 停止Tuxedo: tmshutdown -y
6)运行程序
启动Tuxedo,执行编译好的客户端
完成!
该贴被panpan.nie编辑于2014-10-30 11:11:53