经过不断的尝试这个例子终于跑通了。
两台linux机器。xianyu:192.168.1.105、xianyu1:192.168.1.108。xianyu作为master。
ubb配置文件如下:
# (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 123458
#Example:
#IPCKEY 123456
DOMAINID simpapp
MASTER simple1,simple2
MAXACCESSERS 150
MAXSERVERS 100
MAXSERVICES 100
MODEL MP
OPTIONS
LAN
LDBAL N
*MACHINES
xianyu
LMID=simple1
APPDIR="/home/ss/bea/tuxedo11gR1/samples/atmi/simpapp"
TUXCONFIG="/home/ss/bea/tuxedo11gR1/samples/atmi/simpapp/tuxconfig"
TUXDIR="/home/ss/bea/tuxedo11gR1"
MAXWSCLIENTS=10
xianyu1
LMID=simple2
APPDIR="/home/xianyu/bea/tuxedo11gR1/samples/atmi/simpapp"
TUXCONFIG="/home/xianyu/bea/tuxedo11gR1/samples/atmi/simpapp/tuxconfig"
TUXDIR="/home/xianyu/bea/tuxedo11gR1"
#Example:
# APPDIR="/home/me/simpapp"
# TUXCONFIG="/home/me/simpapp/tuxconfig"
# TUXDIR="/usr/tuxedo"
#Example:
#beatux LMID=simple
*GROUPS
GROUP1
LMID=simple1 GRPNO=1
OPENINFO=NONE
GROUP2
LMID=simple2 GRPNO=10 OPENINFO=NONE
*SERVERS
DEFAULT:
CLOPT="-A"
simpserv SRVGRP=GROUP1
SRVID=10
simpserv SRVGRP=GROUP2
SRVID=10
WSL
SRVGRP=GROUP1 SRVID=20 CLOPT="-A -- -n //192.168.1.105:3050 -m 3 -M 20 -x
5"
*SERVICES
TOUPPER
*NETWORK
simple1 NADDR="//192.168.1.105:4000"
NLSADDR="//192.168.1.105:5000"
simple2 NADDR="//192.168.1.108:4000"
NLSADDR="//192.168.1.108:5000"
两台电脑的环境配置如下:
xianyu:
APPDIR=/home/ss/bea/tuxedo11gR1/samples/atmi/simpapp; export APPDIR
TUXCONFIG=/home/ss/bea/tuxedo11gR1/samples/atmi/simpapp/tuxconfig; export TUXCONFIG
TUXDIR=/home/ss/bea/tuxedo11gR1; export TUXDIR
JAVA_HOME=$TUXDIR/jre; export JAVA_HOME
JVMLIBS=$JAVA_HOME/lib/i386/server:$JAVA_HOME/jre/bin
PATH=$TUXDIR/bin:$JAVA_HOME/bin:$PATH; export PATH
COBCPY=:$TUXDIR/cobinclude; export COBCPY
COBOPT="-C ANS85 -C ALIGN=8 -C NOIBMCOMP -C TRUNC=ANSI -C OSEXT=cbl"; export COBOPT
SHLIB_PATH=$TUXDIR/lib:$JVMLIBS:$SHLIB_PATH; export SHLIB_PATH
LIBPATH=$TUXDIR/lib:$JVMLIBS:$LIBPATH; export LIBPATH
LD_LIBRARY_PATH=$TUXDIR/lib:$JVMLIBS:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH
WEBJAVADIR=$TUXDIR/udataobj/webgui/java; export WEBJAVADIR
xianyu1:
在xianyu上编译服务端和ubbsimple,在xianyu1上编译服务端和客户端不需要配置文件。在xianyua1上监听端口:tlisten -l //192.168.1.108:5000.
运行结果如下: