使用方法
1。下载qsample.zip,解开到某个目录中;
2。修改setenv.cmd文件,
TUXDIR是Tuxedo的安装目录,如G:\Tuxedo
APPDIR是simpapp.zip解开的目录,如G:\Tuxedo\samples\atmi\simpapp
TUXCONFIG=%APPDIR%\tuxconfig,不用修改
PATH=%TUXDIR%\bin,也不用修改
3。修改ubb.sample文件,细节请参考《BEA Tuxedo的消息系统》
4。编译服务器
nmake/f qsample.nt server.exe
5。编译客户机
nmake/f qsample.nt client.exe
6。创建队列
qsample用到了一个队列空间:QSPACE,三个队列:STRING,RPLYQ,errque。
可以用如下命令创建队列:
nmake/f qsample.nt QUE
但在NT平台下最好按如下方法手工创建:
-------------------------------------------------------------------------------------------------------------------
G:\Tuxedo\samples\atmi\qsample>qmadmin
qmadmin - Copyright (c) 1996 BEA Systems, Inc.
Portions * Copyright 1986-1997 RSA Data Security, Inc.
All Rights Reserved.
Distributed under license by BEA Systems, Inc.
Tuxedo is a registered trademark.
QMCONFIG=G:\Tuxedo\samples\atmi\qsample\QUE
> crdl G:\Tuxedo\samples\atmi\qsample\QUE 0 400
Created device G:\Tuxedo\samples\atmi\qsample\QUE, offset 0, size 400 on G:\Tuxedo\samples\atmi\qsample\QUE
> qspacecreate -n 100B
Queue space name: QSPACE
IPC Key for queue space: 62839
Size of queue space in disk pages: 100
Number of queues in queue space: 6
Number of concurrent transactions in queue space: 4
Number of concurrent processes in queue space: 9
Number of messages in queue space: 3
Error queue name: errque
Initialize extents (y, n [default=n]): y
Blocking factor [default=16]:16
> qopen QSPACE
> qcreate
Queue name: STRING
Queue order (priority, time, expiration, fifo, lifo): fifo
Out-of-ordering enqueuing (top, msgid, [default=none]): none
Retries [default=0]: 2
Retry delay in seconds [default=0]: 30
High limit for queue capacity warning (b for bytes used, B for blocks used,
% for percent used, m for messages [default=100%]): 80%
Reset (low) limit for queue capacity warning [default=0%]: 0%
Queue capacity command:
Queue 'STRING' created
> qcreate
Queue name: RPLYQ
Queue order (priority, time, expiration, fifo, lifo): fifo
Out-of-ordering enqueuing (top, msgid, [default=none]): none
Retries [default=0]: 2
Retry delay in seconds [default=0]: 30
High limit for queue capacity warning (b for bytes used, B for blocks used,
% for percent used, m for messages [default=100%]): 80%
Reset (low) limit for queue capacity warning [default=0%]: 2%
Queue capacity command:
Queue 'RPLYQ' created
> qcreate
Queue name: errque
Queue order (priority, time, expiration, fifo, lifo): fifo
Out-of-ordering enqueuing (top, msgid, [default=none]): none
Retries [default=0]: 2
Retry delay in seconds [default=0]: 30
High limit for queue capacity warning (b for bytes used, B for blocks used,
% for percent used, m for messages [default=100%]): 80%
Reset (low) limit for queue capacity warning [default=0%]: 0%
Queue capacity command:
Q_CAT:1438: INFO: Create queue - error queue errque created
Queue 'errque' created
----------------------------------------------------------------------------------------------------------------------
7。创建事务日志
可以用以下命令创建日志文件:
nmake/f qsample.nt TLOG
也可以用如下命令手工创建:
——————————————————————————————————
G:\Tuxedo\samples\atmi\qsample>tmadmin
tmadmin - Copyright (c) 1996 BEA Systems, Inc.
Portions * Copyright 1986-1997 RSA Data Security, Inc.
All Rights Reserved.
Distributed under license by BEA Systems, Inc.
Tuxedo is a registered trademark.
No bulletin board exists. Entering boot mode.
> echo
Echo now on.
> crdl -b 45 -z G:\Tuxedo\samples\atmi\qsample\TLOG
crdl -b 45 -z G:\Tuxedo\samples\atmi\qsample\TLOG
Device created: G:\Tuxedo\samples\atmi\qsample\TLOG
> crlog -m SITE1
crlog -m SITE1
crlog successfully completed.
> quit
quit
——————————————————————————————————
7。创建配置文件
tmloadcf -y ubb.sample
7。启动服务进程
tmboot -y
8。测试
client
before: this is a q example
after: THIS IS A Q EXAMPLE
9。管理应用程序
使用tmadmin管理子程序,打印进程:psr,打印服务:psc
10。终止服务进行
tmshutdown -y
阅读(921) | 评论(0) | 转发(0) |