首页 BEA Tuxedo+ WebLogic编程简介

BEA Tuxedo+ WebLogic编程简介

举报
开通vip

BEA Tuxedo+ WebLogic编程简介 BEA Tuxedo+ WebLogic编程简介 BEA TUXEDO+ WEBLOGIC编程简介...................................... 1 一、 BEA TUXEDO 简介 ............................................................... 1 二、BEA TUXEDO配置文件 UBBCONFIG................................. 3 三、BEA TUXEDO常见配置...

BEA Tuxedo+ WebLogic编程简介
BEA Tuxedo+ WebLogic编程简介 BEA TUXEDO+ WEBLOGIC编程简介...................................... 1 一、 BEA TUXEDO 简介 ............................................................... 1 二、BEA TUXEDO配置文件 UBBCONFIG................................. 3 三、BEA TUXEDO常见配置错误................................................. 6 四、BEA TUXEDO常用命令 ........................................................ 7 五、常用 BEA TUXEDO函数: ................................................. 8 六、常见错误分析: ................................................................. 18 一、 BEA Tuxedo 简介 关于 UBBCONFIG文件的一些设置: The cost incurred by increasing MAXACCESSERS is one additional semaphore per site per client or server process (accesser—see note that follows). There is a small fixed semaphore overhead for system processes in addition to that added by the MAXACCESSERS value. The cost of increasing MAXSERVERS and MAXSERVICES is a small amount of shared memory that is kept for each server, service, and client entry,respectively. The general idea for these parameters is to allow for future growth of the application. It is more important to scrutinize MAXACCESSERS. Note: The system allocates one semaphore for each access slot to the bulletin board. A semaphore is a latch circuit that prevents more than one process from accessing the same shared memory in the bulletin board at the same time. For BEA Tuxedo pre-Release 7.1 (6.5 or earlier), both the MAXACCESSERS and MAXSERVERS parameters for an application play a part in the user license checking scheme. Specifically, a machine is not allowed to boot if the number of MAXACCESSERS for that machine + the number of MAXACCESSERS for the machine (or machines) already running in the application is greater than the number of MAXSERVERS + user licenses for the application. Thus, the total number of MAXACCESSERS for an application must be less than or equal to the number of MAXSERVERS + user licenses for the application. First of All ——— 设置合理的操作系统核心参数!! # 用tmunloadcf > generated.ubb 可以得出目前配置得UBB文件所有得参数值(没有设置 的有缺省值) # 用tmloadcf –c或tmboot –c可以计算出当前UBB配置的Tuxedo启动最少要占用的系统IPC资 源。 Ipc sizing (minimum /T values only) ... Fixed Minimums Per Processor SHMMIN: 1 SHMALL: 1 SEMMAP: SEMMNI Variable Minimums Per Processor SEMUME, A SHMMAX SEMMNU, * * Node SEMMNS SEMMSL SEMMSL SEMMNI MSGMNI MSGMAP SHMSEG ------ ------ ------ ------ ------ ------ ------ ------ KF_FENGM 65 8 60 A + 1 37 74 220K where 1 <= A <= 8. SEMMNS Maximum number of semaphores in the system. The minimum requirement for SEMMNS is MAXACCESSERS - MAXWSCLIENTS + 13 SEMMNI Maximum number of active semaphore sets SEMMSL Maximum number of semaphores per semaphore set. SEMMNI and SEMMSL are commonly chosen so that their product equals SEMMNS. The BEA Tuxedo system does not perform semaphore operations on semaphore sets; however, it attempts to allocate as many semaphores per semaphore set as possible SEMMAP Size of the control map used to manage semaphore sets. SEMMAP should be equal to SEMMNI SEMMNU Number of undo structures in the system. Because an undo structure is needed for each process that can access the Bulletin Board, SEMMNU must be at least as large as SEMMNS SEMUME Maximum number of undo entries per undo structure. The value 1 suffices. 二、BEA Tuxedo配置文件 UBBCONFIG UBB配置文件分成*RESOURCES,*GROUP,*SERVER,*SERVICE,*NETWORK等若干节。 DEFAULT表示该节中所有对象共有的缺省属性。 *RESOURCES #RESOUCES节提供整个系统的基本参数。 IPCKEY 55555 (32767-262143) #进行IPC通讯的key值 DOMAINID unicom #DOMAIN的ID值 MASTER unicom1,unicom2 #指定DOMAIN中的管理主机为unicom1,运行过程中unicom1若出现问 快递公司问题件快递公司问题件货款处理关于圆的周长面积重点题型关于解方程组的题及答案关于南海问题 ,管 理主机切换至unicom2 MAXACCESSERS 1000 #这里该值表示整个系统中单个机器上可以访问 TUXEDO的最多的 Client和 Server的总数(可以访问 BBL的最大进程数),应大于 license用户数+server 数(副本应记入)。该字段会被MACHINE部分的MAXACCESSERS覆盖。 #系统核心参数中SEMAPHORE的数目(SEMMNS)要大于这里的MAXACCESSERS数目, 而 ipc消息个数(MSGMAX)应大于 MAXACCESSERS数+所有带 REPLYQ的 SERVER 的个数。 MAXSERVERS 80 #最大的server数(副本应记入) MAXSERVICES 200 #最大的service数(多个server重复记入) MAXGTT 20 #系统最多的并发的全局交易数目 MODEL MP #表示cluster方式,否则为SHM OPTIONS LAN,MIGRATE #多机cluster方式时必须指定为LAN方式,MIGRATE表示可以以组为单位进 行机器间SERVER的迁移。 LDBAL Y #允许负载均衡 SCANUNIT 10 #SCANUNIT 是BBL在所有服务请求中定期扫描以寻找超时的交易和被阻塞德 调用和德间隔时间(秒)。这个参数指定BBL扫描间隔时间的基本单位, 它会影 响在tpbegin中指定的交易超时时间和用BLOCKTIME指定的请求阻塞超时时间的 精确程度。SANITYSCAN, BBLQUERY, DBBLWAIT, BLOCKTIME等参数都是SCANUNIT 的倍数,而不是实际秒数。而作为时间单位SCANUNIT必须是5的倍数,并且满 足0 标准 excel标准偏差excel标准偏差函数exl标准差函数国标检验抽样标准表免费下载红头文件格式标准下载 输出设备 -w specifies that the client is to be built using the workstation libraries. 指出Client程序编译时连接Workstation 相应的动态库 -r rmname specifies the resource manager associated with this client. -o 输出文件名 -f 输入文件名称,一个或多个,多个以-f 分离 -l specifies one or more user files to be included in the compilation and link edit phases of buildclient last, after the BEA Tuxedo libraries. 需要连接的非BEA Tuxedo的动态库,可以为多个,多个时以-l 分离 buildtms(transaction manager server): buildserver: l tmboot—activates the application that is referenced in the specified configuration file. Depending on the options used, the entire application or parts of the application are started. l tmloadcf—parses the UBBCONFIG file and loads the binary TUXCONFIG configuration file. l tmunloadcf—unloads the TUXCONFIG configuration file. l tmconfig—dynamically updates and retrieves information about the configuration for a running system. l dmadmin—updates the compiled DMCONFIG (binary domain configuration file) while the system is running. l tmadmin—produces information about configuration parameters. Once invoked, you can enter many administrative commands that duplicate the functions of other commands. For example, the tmadmin shutdown command is identical to the tmshutdown command. l tmshutdown—shuts down a set of specified BEA WebLogic Enterprise or BEA Tuxedo servers, or removes a set of BEA WebLogic Enterprise interfaces or BEA Tuxedo services listed in a configuration file. 单个启动或关闭服务器: 要动态的启动指定的服务器必须先启动 BBL服务,JSL服务,JREPSVR服务!具体做法如下: tmloadcf ubbsimple tmadmin >boot -B simple (simple为 ubbsimple中指定的MASTER,注意 B大写!) 或 >boot -M (单独启动 BBL服务) >boot -i 11 (11为 ubbsimpel中定义的 JSL的 SRVID) BBL服务和 JSL服务均成功启动后,可以启动 wlserver。 wlserver启动之后,首先启动 JREPSVR服务,如下: >boot -i 111 (111为 ubbsimpel中定义的 JREPSVR的 SRVID) 再启动用户自己定义的服务,如下: >boot -i 1 (1为 ubbsimpel中定义的 simpserv的 SRVID) 关闭指定服务器: >shutdown -i 1 (1为 ubbsimpel中定义的 simpserv的 SRVID) 通过以上方法,可以动态加载服务器,而不需要把整个 Tuxedo服务重启! 五、常用 BEA Tuxedo函数: (一) 数据操作函数说明: 在 BEA Tuxedo的数据操作过程中(与数据库中数据交互,与客户端数据交互), 由于一般交互的数据较多,因此一般采用 BEA Tuxedo 的 FML 数据类型进行数据 传输。FML(Field Modification Language )类似于 Oracle 数据库中的一个表,它可 以象表一样存放一个 Field 的多个值,而且对于同一个 FML定义中的 Field ,其值 的个数是可以不相同的,主要根据用户的输入值而定。 FML类型有两种大小,通常的 FML 是基于16位数据接口的。对于 FML16位接 口限制,最多只能有 8192个不同的字段,每个字段值的最大的 Buffer Size 为 64K。 第二种是基于 32位数据接口的,它允许 30 millions 的 Fields ,每个 Field 允许 20 billions Bytes。 FML Buffers:一个 Field Buffer是由 Field id,name,field type,field length组成的, 其定义如下所示,其中*base 10050是指对于每一个 Field 其 field identifier 的取值 的偏移量,它决定每一个 Field 在 Buffer中的相对地址。 定义: *base 10050 # name number type flags comments name :字段名称 number::每个字段在 FML Buffer中的相对位置,决定各字段的地址指针 type:字段数据类型 flags :暂时未用 Comments :注释 FML16 字段 Numbers FML32 字段 Numbers 保留 可用 保留 可用 1-100 101-8191 1-10,000, 30,000,001-33,554,431 10,001-30,000,000 在定义字段时,注意*base value 中 Value值的定义,首先参照上表定义, 其次注意,在自定义字段时,地址的不可重用性。如果地址重用,将会出现同一地 址的字段,有的字段的值取不到。 头文件: #include #include 主要函数: 函数名称 描述 Fadd, Fadd32 向字段中添加新的值 Falloc,Falloc32 Field Buffer 分配空间并初始化 Fappend,Fappend32 向 Field Buffer中追加某个字段的新值 Fchg,Fchg32 修改字段的某个值 Fcpy,Fcpy32 Field Buffer 的相互拷贝 Fdel,Fdel32 从buffer 中删除指定字段的指定值 Fdelall,Fdelall32 从 buffer 中删除指定字段的所有值 Fdelete,Fdelete32 从buffer 中删除所有字段的值 Ffind,Ffind32 在 buffer 中查找指定字段的指定值 Ffindlast,Ffindlast32 在 buffer 中查找指定字段的最后一个值 Ffprint,Ffprint32 将buffer 中的所有内容打印到指定的Stream Ffree,Ffree32 释放buffer 占用的空间 Fget,Fget32 Get指定字段,指定occurrence的值 Fgetlast,Fgetlast32 Get指定字段的最后一个值 Fldid,Fldid32 根据 field name取得 field identifier Fldtype, Fldtype32 根据 field identifier 取得 field type Fname,Fname32 根据field identifier 取得 field name Fnext,Fnext32 Get指定字段的下一个值 Foccur, Foccur32 从 buffer 中取得指定字段的值的个数 Fprint,Fprint32 打印 buffer 中的内容到标准输出设备 Fsizeof,Fsizeof32 取得 fielded buffer 的大小 Fwrite,Fwrite32 根据文件内容写入 fielded buffer 说明:以上函数中,其中带 32的函数表示是应用于 FML32的函数。 详细描述: 1、Fadd,Fadd32:向字段中添加新的值 函数原形: #include stdio.h> #include "fml.h" int Fadd(FBFR * fbfr, FLDID fieldid, char * value, FLDLEN len) #include "fml32.h" int Fadd32(FBFR32 * fbfr, FLDID32 fieldid, char *value, FLDLEN32 len) 参数说明: FBFR32 * fbfr : a pointer to a given field buffer 指定 FML Buffer的指针 FLDID32 fieldid: 指定的字段 Field的名称(区分大小写)或 ID (field identifier) 注意该值如果是字段的名称,不能以变量的形式给出,只能是字段名称 的字符串。 char *value:与 Buffer定义中该字段相同内容的对象的指针 FLDLEN32 len:数据的长度,一般给 NULL Return value :如果操作错误返回 –1 2、Falloc,Falloc32:Field Buffer 分配空间并初始化 调用 malloc给 FML Buffer动态的分配空间,同时调用 Finit进行初始化 函数原形: #include #include "fml.h" FBFR * Falloc(FLDOCC F, FLDLEN V) #include "fml32.h" FBFR32 * Falloc32(FLDOCC32 F, FLDLEN32 V) 参数说明: F:The numbers of fields V:The bytes of the value space Return value :如果成功返回指针,否则返回 NULL 3、Fappend,Fappend32:向 Buffer中指定字段追加新值 函数原形: #include #include "fml.h" int Fappend(FBFR * fbfr, FLDID fieldid, char * value, FLDLEN len) #include "fml32.h" int Fappend32(FBFR32 * fbfr, FLDID32 fieldid, char * value, FLDLEN32 len) 参数说明: fbfr : a pointer to a given field buffer 指定FML Buffer的指针 fieldid: 指定的字段 Field的名称(区分大小写)或 ID (field identifier) char *value:与 Buffer定义中该字段相同内容的对象的指针 len:数据的长度,一般给 NULL Return value :如果操作错误返回 –1 4、Fchg,Fchg32:修改指定Buffer 中指定字段的指定序列的值 函数原形: #include #include "fml.h" int Fchg(FBFR * fbfr, FLDID fieldid, FLDOCC oc, char * value, FLDLEN len) #include "fml32.h" int Fchg32(FBFR32 *fbfr, FLDID32 fieldid, FLDOCC32 oc, char * value, FLDLEN32 len) 参数说明: fbfr : a pointer to a given field buffer 指定FML Buffer的指针 fieldid: 指定的字段 Field的名称(区分大小写)或 ID (field identifier) oc:Buffer中该字段的值的序列 oc 表示该字段值的一个序列,如果该序列不存在,则添加一个 NULL值 如果为 –1,则以一个新的序列向 Buffer中追加一个新值 char *value:与 Buffer定义中该字段相同内容的对象的指针,在这里为新增值的指针 len:数据的长度,一般给 0 Return value :如果操作错误返回 –1 5、Fcpy,Fcpy32:FML Buffer的相互拷贝 函数原形: #include #include "fml.h" int Fcpy(FBFR * dest, FBFR * src) #include "fml32.h" int Fcpy32(FBFR32 *dest, FBFR32 * src) 参数说明: dest:destination fielded buffers 目标Buffer src: source fielded buffers 源数据Buffer Return value :如果操作错误返回 –1 6、Fdel,Fdel32:删除Buffer中指定字段的指定的一个值 函数原形: #include stdio.h> #include "fml.h" int Fdel(FBFR *fbfr, FLDID fieldid, FLDOCC oc) #include "fml32.h" int Fdel32(FBFR32 * fbfr, FLDID32 fieldid, FLDOCC32 oc) 参数说明: fbfr :a pointer to a given Field Buffer ,指定Buffer的数据指针 fieldid:指定字段的field identifier 可以为字段的名称或ID oc:删除值的序列号 Return value :如果操作错误返回 –1 7、Fdelall,Fdelall32 :删除 Buffer中指定字段的所有值 函数原形: #include #include "fml.h" int Fdelall(FBFR * fbfr, FLDID fieldid) #include "fml32.h" int Fdelall32(FBFR32 * fbfr, FLDID32 fieldid) 参数说明: fbfr:a pointer to a given Field Buffer ,指定Buffer的数据指针 fieldid:指定字段的field identifier 可以为字段的名称或ID Return value :如果操作错误返回 –1 8、Fdelete,Fdelete32:删除指定Buffer中一组field的所有值 函数原形: #include #include "fml.h" int Fdelete(FBFR * fbfr, FLDID *fieldid) #include "fml32.h" int Fdelete32(FBFR32 * fbfr, FLDID32 * fieldid) 参数说明: fbfr:a pointer to a given Field Buffer ,指定Buffer的数据指针 fieldid:a pointer to an array of field identifiers. Return value :如果操作错误返回 –1 附:数组的声明:FLDID field[2]; FLDID32 field[2] 9、Ffind,Ffind32:在 buffer 中查找指定字段的指定值 函数原形: #include #include "fml.h" char * Ffind(FBFR * fbfr, FLDID fieldid, FLDOCC oc, FLDLEN * len) #include "fml32.h" char * Ffind32(FBFR32 * fbfr, FLDID32 fieldid, FLDOCC32 oc, FLDLEN32 * len) 参数说明: fbfr :a pointer to a given Field Buffer ,指定Buffer的数据指针 fieldid:指定字段的field identifier 可以为字段的名称或ID oc:值的序列号 len:数据的长度 Return value :points to an object that has the same type as the field type 10、Ffindlast,Ffindlast32:在 buffer 中查找指定字段的最后一个值 函数原形: #include #include "fml.h" char * Ffindlast(FBFR * fbfr, FLDID fieldid, FLDOCC * oc, FLDLEN * len) #include "fml32.h" char * Ffindlast32(FBFR32 *fbfr, FLDID32 fieldid, FLDOCC32 * oc, FLDLEN32 * len) 参数说明: fbfr :a pointer to a given Field Buffer ,指定Buffer的数据指针 fieldid:指定字段的field identifier 可以为字段的名称或ID oc:an integer that is used to receive the occurrence number of the field. len:数据的长度 Return value :points to an object that has the same type as the field type 11、Ffprint,Ffprint32 :打印指定Buffer的值到Stream 函数原形: #include #include "fml.h" int Ffprint(FBFR * fbfr, FILE * iop) #include "fml32.h" int Ffprint32(FBFR32 * fbfr, FILE *iop) 参数说明: fbfr:a pointer to a given Field Buffer ,指定Buffer的数据指针 iop:输出文件流 a pointer of type FILE that points to the output stream. Return value :如果操作错误返回 –1 12、Fprint,Fprint32:打印指定Buffer的内容到标准输出设备 函数原形: #include #include "fml.h" int Fprint(FBFR * fbfr) #include "fml32.h" int Fprint32(FBFR32 * fbfr) 参数说明: fbfr:a pointer to a given Field Buffer ,指定Buffer的数据指针 Return value:如果操作错误返回 –1 13、Ffree,Ffree32:释放Buffer占用的空间 函数原形: #include #include "fml.h" int Ffree(FBFR * fbfr) #include "fml32.h" int Ffree32(FBFR32 * fbfr) 参数说明: fbfr:a pointer to a fielded buffer Return value :如果操作错误返回 –1 14、Fget,Fget32:从指定的Buffer取得指定Field的指定值 函数原形: #include #include "fml.h" int Fget(FBFR *fbfr, FLDID fieldid, FLDOCC oc, char * value, FLDLEN* maxlen) #include "fml32.h" int Fget32(FBFR32 * fbfr, FLDID32 fieldid, FLDOCC32 oc, char * value,FLDLEN32 * maxlen) 参数说明: fbfr : a pointer to a given field buffer 指定FML Buffer的指针 fieldid: 指定的字段 Field的名称(区分大小写)或 ID (field identifier) oc:Buffer中该字段的值的序列 char *value:与 Buffer定义中该字段相同内容的对象的指针 maxlen:数据的长度,可以为 NULL Return value :如果操作错误返回 –1 15、Fgetlast,Fgetlast32 :Get 指定Buffer中指定字段的最后一个occurrence的值 函数原形: #include #include "fml.h" int Fgetlast(FBFR * fbfr, FLDID fieldid, FLDOCC * oc, char * value, FLDLEN* maxlen) #include "fml32.h" int Fgetlast32(FBFR32 * fbfr, FLDID32 fieldid, FLDOCC32 *oc,char*value,FLDLEN32* maxlen) 参数说明: fbfr : a pointer to a given field buffer 指定FML Buffer的指针 fieldid: 指定的字段 Field的名称(区分大小写)或 ID (field identifier) oc:Buffer中该字段的值的序列 char *value:与 Buffer定义中该字段相同内容的对象的指针 maxlen:数据的长度,可以为 NULL Return value :如果操作错误返回 –1 16、Fldid,Fldid32:根据 field name取得 field identifier 函数原形: #include #include "fml.h" FLDID Fldid(char * name) #include "fml32.h" FLDID32 Fldid32(char * name) 参数说明: name:字段的名称 Return value:field identifier 17、Fldtype, Fldtype32:根据 field identifier 取得 field type 函数原形: #include #include "fml.h" int Fldtype(FLDID fieldid) #include "fml32.h" int Fldtype32(FLDID32 fieldid) 参数说明: fieldid:相应Field 的identifier Return value:the field type 指定Field 的数据类型 18、Fname,F
本文档为【BEA Tuxedo+ WebLogic编程简介】,请使用软件OFFICE或WPS软件打开。作品中的文字与图均可以修改和编辑, 图片更改请在作品中右键图片并更换,文字修改请直接点击文字进行修改,也可以新增和删除文档中的内容。
该文档来自用户分享,如有侵权行为请发邮件ishare@vip.sina.com联系网站客服,我们会及时删除。
[版权声明] 本站所有资料为用户分享产生,若发现您的权利被侵害,请联系客服邮件isharekefu@iask.cn,我们尽快处理。
本作品所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用。
网站提供的党政主题相关内容(国旗、国徽、党徽..)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。
下载需要: 免费 已有0 人下载
最新资料
资料动态
专题动态
is_900466
暂无简介~
格式:pdf
大小:71KB
软件:PDF阅读器
页数:19
分类:互联网
上传时间:2011-04-07
浏览量:24