﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>C++博客-Prayer-随笔分类-TUXEDO</title><link>http://www.cppblog.com/prayer/category/8126.html</link><description>在一般中寻求卓越</description><language>zh-cn</language><lastBuildDate>Mon, 14 Jan 2019 17:07:35 GMT</lastBuildDate><pubDate>Mon, 14 Jan 2019 17:07:35 GMT</pubDate><ttl>60</ttl><item><title>tpcall</title><link>http://www.cppblog.com/prayer/archive/2019/01/14/216197.html</link><dc:creator>Prayer</dc:creator><author>Prayer</author><pubDate>Mon, 14 Jan 2019 05:55:00 GMT</pubDate><guid>http://www.cppblog.com/prayer/archive/2019/01/14/216197.html</guid><wfw:comment>http://www.cppblog.com/prayer/comments/216197.html</wfw:comment><comments>http://www.cppblog.com/prayer/archive/2019/01/14/216197.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/prayer/comments/commentRss/216197.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/prayer/services/trackbacks/216197.html</trackback:ping><description><![CDATA[<div label-module="para" style="word-wrap: break-word; color: #333333; margin-bottom: 15px; text-indent: 2em; line-height: 24px; zoom: 1; font-family: arial, 宋体, sans-serif; background-color: #ffffff;">int tpcall(char *svc, char *idata, long ilen, char **<a target="_blank" href="https://baike.baidu.com/item/odata" style="color: #136ec2; text-decoration: none;">odata</a>, long *olen, long flags)</div><div label-module="para" style="word-wrap: break-word; color: #333333; margin-bottom: 15px; text-indent: 2em; line-height: 24px; zoom: 1; font-family: arial, 宋体, sans-serif; background-color: #ffffff;">描述：客户端同步调用<a target="_blank" href="https://baike.baidu.com/item/%E6%9C%8D%E5%8A%A1%E7%AB%AF" style="color: #136ec2; text-decoration: none;">服务端</a>的名为svc的SERVICE，</div><div label-module="para" style="word-wrap: break-word; color: #333333; margin-bottom: 15px; text-indent: 2em; line-height: 24px; zoom: 1; font-family: arial, 宋体, sans-serif; background-color: #ffffff;">参数：</div><div label-module="para" style="word-wrap: break-word; color: #333333; margin-bottom: 15px; text-indent: 2em; line-height: 24px; zoom: 1; font-family: arial, 宋体, sans-serif; background-color: #ffffff;">*svc：SERVICE的名称</div><div label-module="para" style="word-wrap: break-word; color: #333333; margin-bottom: 15px; text-indent: 2em; line-height: 24px; zoom: 1; font-family: arial, 宋体, sans-serif; background-color: #ffffff;">char *idata： 输入缓冲区的地址，客户端传给服务端的参数放在该缓冲区内</div><div label-module="para" style="word-wrap: break-word; color: #333333; margin-bottom: 15px; text-indent: 2em; line-height: 24px; zoom: 1; font-family: arial, 宋体, sans-serif; background-color: #ffffff;"><span style="color: #0000ff;">long ilen： 输入缓冲区的长度&#8212;&#8212;只有缓冲区类型为CARRAY时才指定长度，其他情况传0</span></div><div label-module="para" style="word-wrap: break-word; color: #333333; margin-bottom: 15px; text-indent: 2em; line-height: 24px; zoom: 1; font-family: arial, 宋体, sans-serif; background-color: #ffffff;">char **<a target="_blank" href="https://baike.baidu.com/item/odata" style="color: #136ec2; text-decoration: none;">odata</a>&nbsp;输出缓冲区的地址，服务端传给客户端的结果放在该缓冲区内</div><div label-module="para" style="word-wrap: break-word; color: #333333; margin-bottom: 15px; text-indent: 2em; line-height: 24px; zoom: 1; font-family: arial, 宋体, sans-serif; background-color: #ffffff;">long *olen：输出缓冲区的长度</div><div label-module="para" style="word-wrap: break-word; color: #333333; margin-bottom: 15px; text-indent: 2em; line-height: 24px; zoom: 1; font-family: arial, 宋体, sans-serif; background-color: #ffffff;">long flags： 调用标志，由以下几个：</div><div label-module="para" style="word-wrap: break-word; color: #333333; margin-bottom: 15px; text-indent: 2em; line-height: 24px; zoom: 1; font-family: arial, 宋体, sans-serif; background-color: #ffffff;">TPNOTRAN</div><div label-module="para" style="word-wrap: break-word; color: #333333; margin-bottom: 15px; text-indent: 2em; line-height: 24px; zoom: 1; font-family: arial, 宋体, sans-serif; background-color: #ffffff;">如果调用svc的客户端当前在TRANSACTION方式下，那么svc不参与当前的TRANSACTION。</div><div label-module="para" style="word-wrap: break-word; color: #333333; margin-bottom: 15px; text-indent: 2em; line-height: 24px; zoom: 1; font-family: arial, 宋体, sans-serif; background-color: #ffffff;">TPNOCHANGE</div><div label-module="para" style="word-wrap: break-word; color: #333333; margin-bottom: 15px; text-indent: 2em; line-height: 24px; zoom: 1; font-family: arial, 宋体, sans-serif; background-color: #ffffff;">如果<a target="_blank" href="https://baike.baidu.com/item/%E6%9C%8D%E5%8A%A1%E7%AB%AF" style="color: #136ec2; text-decoration: none;">服务端</a>返回的缓冲区类型与客户端定义的缓冲区(<a target="_blank" href="https://baike.baidu.com/item/odata" style="color: #136ec2; text-decoration: none;">odata</a>)类型不一致，默认情况下，odata会转换成与服务端返回的缓冲区类型一致的类型，如果设置了该FLAG，那么当出现这种情况时，不进行缓冲区类型转换，并且会报错。</div><div label-module="para" style="word-wrap: break-word; color: #333333; margin-bottom: 15px; text-indent: 2em; line-height: 24px; zoom: 1; font-family: arial, 宋体, sans-serif; background-color: #ffffff;">TPNOBLOCK</div><div label-module="para" style="word-wrap: break-word; color: #333333; margin-bottom: 15px; text-indent: 2em; line-height: 24px; zoom: 1; font-family: arial, 宋体, sans-serif; background-color: #ffffff;">默认情况下, 如果客户端有阻塞条件存在（如CLIENT的TCP/IP中的缓冲区满,磁盘I/O忙等），那么客户端会阻塞在那里，直到阻塞消除或超时出错。如果设置了 TPNOBLOCK,当客户端有阻塞条件存在时,TPCALL()会立刻返回并报错. 注意TPNOBLOCK只对发送请求时起作用,如果在接收服务端返回的结果时有阻塞条件存在,客户端会在那里等待,直到阻塞消除或超时出错</div><div label-module="para" style="word-wrap: break-word; color: #333333; margin-bottom: 15px; text-indent: 2em; line-height: 24px; zoom: 1; font-family: arial, 宋体, sans-serif; background-color: #ffffff;">TPNOTIME</div><div label-module="para" style="word-wrap: break-word; color: #333333; margin-bottom: 15px; text-indent: 2em; line-height: 24px; zoom: 1; font-family: arial, 宋体, sans-serif; background-color: #ffffff;">如果客户端有阻塞条件存在，客户端会一直阻塞在那里，即使到了超时时间也不返回，但如果该客户端是在TRANSACTION模式下，当到了</div><div label-module="para" style="word-wrap: break-word; color: #333333; margin-bottom: 15px; text-indent: 2em; line-height: 24px; zoom: 1; font-family: arial, 宋体, sans-serif; background-color: #ffffff;"><a target="_blank" href="https://baike.baidu.com/item/%E4%BA%8B%E5%8A%A1" style="color: #136ec2; text-decoration: none;">事务</a>的超时时间，还是会报超时错误并返回。</div><div label-module="para" style="word-wrap: break-word; color: #333333; margin-bottom: 15px; text-indent: 2em; line-height: 24px; zoom: 1; font-family: arial, 宋体, sans-serif; background-color: #ffffff;">TPSIGRSTRT</div><div label-module="para" style="word-wrap: break-word; color: #333333; margin-bottom: 15px; text-indent: 2em; line-height: 24px; zoom: 1; font-family: arial, 宋体, sans-serif; background-color: #ffffff;">如果在进行系统调用时，被信号中断，该系统调用会重新进行。</div><div label-module="para" style="word-wrap: break-word; color: #333333; margin-bottom: 15px; text-indent: 2em; line-height: 24px; zoom: 1; font-family: arial, 宋体, sans-serif; background-color: #ffffff;">调用成功返回0,失败返回-1, 错误号保存在<a target="_blank" href="https://baike.baidu.com/item/%E5%85%A8%E5%B1%80%E5%8F%98%E9%87%8F" style="color: #136ec2; text-decoration: none;">全局变量</a>tperrno中。</div><img src ="http://www.cppblog.com/prayer/aggbug/216197.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/prayer/" target="_blank">Prayer</a> 2019-01-14 13:55 <a href="http://www.cppblog.com/prayer/archive/2019/01/14/216197.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>运行tuxedo自带例子simpapp，测试tuxedo安装</title><link>http://www.cppblog.com/prayer/archive/2019/01/11/216189.html</link><dc:creator>Prayer</dc:creator><author>Prayer</author><pubDate>Fri, 11 Jan 2019 08:53:00 GMT</pubDate><guid>http://www.cppblog.com/prayer/archive/2019/01/11/216189.html</guid><wfw:comment>http://www.cppblog.com/prayer/comments/216189.html</wfw:comment><comments>http://www.cppblog.com/prayer/archive/2019/01/11/216189.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/prayer/comments/commentRss/216189.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/prayer/services/trackbacks/216189.html</trackback:ping><description><![CDATA[<div>https://blog.csdn.net/konglongaa/article/details/76855034<br /><p style="box-sizing: border-box; outline: 0px; padding: 0px; margin: 0px 0px 16px; font-family: 'Microsoft YaHei', 'SF Pro Display', Roboto, Noto, Arial, 'PingFang SC', sans-serif; font-size: 16px; color: #4f4f4f; overflow-x: auto; word-wrap: break-word; background-color: #ffffff; line-height: 1.8em !important;">在..../simpapp目录下共有4个文件，分别是README simpserv.c(客户端源程序) simpcl.c(服务器端源程序) ubbsimple(配置文件)</p><p style="box-sizing: border-box; outline: 0px; padding: 0px; margin: 0px 0px 16px; font-family: 'Microsoft YaHei', 'SF Pro Display', Roboto, Noto, Arial, 'PingFang SC', sans-serif; font-size: 16px; color: #4f4f4f; overflow-x: auto; word-wrap: break-word; background-color: #ffffff; line-height: 1.8em !important;">1. 设置环境变量</p><p style="box-sizing: border-box; outline: 0px; padding: 0px; margin: 0px 0px 16px; font-family: 'Microsoft YaHei', 'SF Pro Display', Roboto, Noto, Arial, 'PingFang SC', sans-serif; font-size: 16px; color: #4f4f4f; overflow-x: auto; word-wrap: break-word; background-color: #ffffff; line-height: 1.8em !important;">1.1 tuxedo系统在编译服务器或客户端shirt都需要一些环境变量。可建议一个setenv文件内容为：<br style="box-sizing: border-box; outline: 0px; word-wrap: break-word; line-height: normal !important;" />. /home/tuxedo/bea/tuxedo9.1/tux.env<br style="box-sizing: border-box; outline: 0px; word-wrap: break-word; line-height: normal !important;" />APPDIR=/home/tuxedo/bea/tuxedo9.1/samples/atmi/simpapp;export APPDIR<br style="box-sizing: border-box; outline: 0px; word-wrap: break-word; line-height: normal !important;" />TUXCONFIG=$APPDIR/tuxconfig;export TUXCONFIG<br style="box-sizing: border-box; outline: 0px; word-wrap: break-word; line-height: normal !important;" />WSNADDR=//192.1.1.121:9999;export WSNADDR<br style="box-sizing: border-box; outline: 0px; word-wrap: break-word; line-height: normal !important;" />根据实际情况自己设定。<br style="box-sizing: border-box; outline: 0px; word-wrap: break-word; line-height: normal !important;" />第一行是tux.env所在目录<br style="box-sizing: border-box; outline: 0px; word-wrap: break-word; line-height: normal !important;" />第二行是simapp所在目录<br style="box-sizing: border-box; outline: 0px; word-wrap: break-word; line-height: normal !important;" />第三行是simapp的二进制配置文件<br style="box-sizing: border-box; outline: 0px; word-wrap: break-word; line-height: normal !important;" /><br style="box-sizing: border-box; outline: 0px; word-wrap: break-word; line-height: normal !important;" />1.2 执行环境变量<br style="box-sizing: border-box; outline: 0px; word-wrap: break-word; line-height: normal !important;" />cd到setenv所在目录，假设为=/home/tuxedo/bea/tuxedo9.1/samples/atmi/simpapp<br style="box-sizing: border-box; outline: 0px; word-wrap: break-word; line-height: normal !important;" />$. ./setenv</p><p style="box-sizing: border-box; outline: 0px; padding: 0px; margin: 0px 0px 16px; font-family: 'Microsoft YaHei', 'SF Pro Display', Roboto, Noto, Arial, 'PingFang SC', sans-serif; font-size: 16px; color: #4f4f4f; overflow-x: auto; word-wrap: break-word; background-color: #ffffff; line-height: 1.8em !important;">2. 配置文件</p><p style="box-sizing: border-box; outline: 0px; padding: 0px; margin: 0px 0px 16px; font-family: 'Microsoft YaHei', 'SF Pro Display', Roboto, Noto, Arial, 'PingFang SC', sans-serif; font-size: 16px; color: #4f4f4f; overflow-x: auto; word-wrap: break-word; background-color: #ffffff; line-height: 1.8em !important;">除了客户端和服务起程序以外，tuxedo还需要一个配置文件来描述一个tuxedo应用系统所包含的系统资源。修改simpapp下的ubbsimple的内容，改好后为：（注意红色部分）</p><p style="box-sizing: border-box; outline: 0px; padding: 0px; margin: 0px 0px 16px; font-family: 'Microsoft YaHei', 'SF Pro Display', Roboto, Noto, Arial, 'PingFang SC', sans-serif; font-size: 16px; color: #4f4f4f; overflow-x: auto; word-wrap: break-word; background-color: #ffffff; line-height: 1.8em !important;">#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (c) 2003 BEA Systems, Inc. All Rights Reserved.<br style="box-sizing: border-box; outline: 0px; word-wrap: break-word; line-height: normal !important;" />#ident "@(#) samples/atmi/simpapp/ubbsimple&nbsp;&nbsp;&nbsp; $Revision: 1.5 $"</p><p style="box-sizing: border-box; outline: 0px; padding: 0px; margin: 0px 0px 16px; font-family: 'Microsoft YaHei', 'SF Pro Display', Roboto, Noto, Arial, 'PingFang SC', sans-serif; font-size: 16px; color: #4f4f4f; overflow-x: auto; word-wrap: break-word; background-color: #ffffff; line-height: 1.8em !important;">#Skeleton UBBCONFIG file for the TUXEDO Simple Application.<br style="box-sizing: border-box; outline: 0px; word-wrap: break-word; line-height: normal !important;" />#Replace the &lt;bracketed&gt; items with the appropriate values.</p><p style="box-sizing: border-box; outline: 0px; padding: 0px; margin: 0px 0px 16px; font-family: 'Microsoft YaHei', 'SF Pro Display', Roboto, Noto, Arial, 'PingFang SC', sans-serif; font-size: 16px; color: #4f4f4f; overflow-x: auto; word-wrap: break-word; background-color: #ffffff; line-height: 1.8em !important;">*RESOURCES<br style="box-sizing: border-box; outline: 0px; word-wrap: break-word; line-height: normal !important;" />IPCKEY&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="box-sizing: border-box; outline: 0px; word-wrap: break-word; color: #ff0000; line-height: normal !important;">123456</span></p><p style="box-sizing: border-box; outline: 0px; padding: 0px; margin: 0px 0px 16px; font-family: 'Microsoft YaHei', 'SF Pro Display', Roboto, Noto, Arial, 'PingFang SC', sans-serif; font-size: 16px; color: #4f4f4f; overflow-x: auto; word-wrap: break-word; background-color: #ffffff; line-height: 1.8em !important;">#Example:<br style="box-sizing: border-box; outline: 0px; word-wrap: break-word; line-height: normal !important;" />#IPCKEY&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 123456</p><p style="box-sizing: border-box; outline: 0px; padding: 0px; margin: 0px 0px 16px; font-family: 'Microsoft YaHei', 'SF Pro Display', Roboto, Noto, Arial, 'PingFang SC', sans-serif; font-size: 16px; color: #4f4f4f; overflow-x: auto; word-wrap: break-word; background-color: #ffffff; line-height: 1.8em !important;">DOMAINID&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; simpapp<br style="box-sizing: border-box; outline: 0px; word-wrap: break-word; line-height: normal !important;" />MASTER&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; simple<br style="box-sizing: border-box; outline: 0px; word-wrap: break-word; line-height: normal !important;" />MAXACCESSERS&nbsp;&nbsp;&nbsp; 10<br style="box-sizing: border-box; outline: 0px; word-wrap: break-word; line-height: normal !important;" />MAXSERVERS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 5<br style="box-sizing: border-box; outline: 0px; word-wrap: break-word; line-height: normal !important;" />MAXSERVICES&nbsp;&nbsp;&nbsp;&nbsp; 10<br style="box-sizing: border-box; outline: 0px; word-wrap: break-word; line-height: normal !important;" />MODEL&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SHM<br style="box-sizing: border-box; outline: 0px; word-wrap: break-word; line-height: normal !important;" />LDBAL&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; N</p><p style="box-sizing: border-box; outline: 0px; padding: 0px; margin: 0px 0px 16px; font-family: 'Microsoft YaHei', 'SF Pro Display', Roboto, Noto, Arial, 'PingFang SC', sans-serif; font-size: 16px; color: #4f4f4f; overflow-x: auto; word-wrap: break-word; background-color: #ffffff; line-height: 1.8em !important;">*MACHINES<br style="box-sizing: border-box; outline: 0px; word-wrap: break-word; line-height: normal !important;" />DEFAULT:<br style="box-sizing: border-box; outline: 0px; word-wrap: break-word; line-height: normal !important;" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="box-sizing: border-box; outline: 0px; word-wrap: break-word; color: #ff0000; line-height: normal !important;">APPDIR="/home/tuxedo/bea/tuxedo9.1/samples/atmi/simpapp"<br style="box-sizing: border-box; outline: 0px; word-wrap: break-word;" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TUXCONFIG="/home/tuxedo/bea/tuxedo9.1/samples/atmi/simpapp/tuxconfig"<br style="box-sizing: border-box; outline: 0px; word-wrap: break-word;" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TUXDIR="/home/tuxedo/bea/tuxedo9.1"<br style="box-sizing: border-box; outline: 0px; word-wrap: break-word;" /></span>#Example:<br style="box-sizing: border-box; outline: 0px; word-wrap: break-word; line-height: normal !important;" />#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; APPDIR="/home/me/simpapp"<br style="box-sizing: border-box; outline: 0px; word-wrap: break-word; line-height: normal !important;" />#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TUXCONFIG="/home/me/simpapp/tuxconfig"<br style="box-sizing: border-box; outline: 0px; word-wrap: break-word; line-height: normal !important;" />#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TUXDIR="/usr/tuxedo"</p><p style="box-sizing: border-box; outline: 0px; padding: 0px; margin: 0px 0px 16px; font-family: 'Microsoft YaHei', 'SF Pro Display', Roboto, Noto, Arial, 'PingFang SC', sans-serif; font-size: 16px; color: #4f4f4f; overflow-x: auto; word-wrap: break-word; background-color: #ffffff; line-height: 1.8em !important;"><span style="box-sizing: border-box; outline: 0px; word-wrap: break-word; color: #ff0000; line-height: normal !important;">happy</span>&nbsp;&nbsp; LMID=simple</p><p style="box-sizing: border-box; outline: 0px; padding: 0px; margin: 0px 0px 16px; font-family: 'Microsoft YaHei', 'SF Pro Display', Roboto, Noto, Arial, 'PingFang SC', sans-serif; font-size: 16px; color: #4f4f4f; overflow-x: auto; word-wrap: break-word; background-color: #ffffff; line-height: 1.8em !important;">#Example:<br style="box-sizing: border-box; outline: 0px; word-wrap: break-word; line-height: normal !important;" />#beatux&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LMID=simple</p><p style="box-sizing: border-box; outline: 0px; padding: 0px; margin: 0px 0px 16px; font-family: 'Microsoft YaHei', 'SF Pro Display', Roboto, Noto, Arial, 'PingFang SC', sans-serif; font-size: 16px; color: #4f4f4f; overflow-x: auto; word-wrap: break-word; background-color: #ffffff; line-height: 1.8em !important;">*GROUPS<br style="box-sizing: border-box; outline: 0px; word-wrap: break-word; line-height: normal !important;" />GROUP1<br style="box-sizing: border-box; outline: 0px; word-wrap: break-word; line-height: normal !important;" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LMID=simple&nbsp;&nbsp;&nbsp;&nbsp; GRPNO=1 PENINFO=NONE</p><p style="box-sizing: border-box; outline: 0px; padding: 0px; margin: 0px 0px 16px; font-family: 'Microsoft YaHei', 'SF Pro Display', Roboto, Noto, Arial, 'PingFang SC', sans-serif; font-size: 16px; color: #4f4f4f; overflow-x: auto; word-wrap: break-word; background-color: #ffffff; line-height: 1.8em !important;">*SERVERS<br style="box-sizing: border-box; outline: 0px; word-wrap: break-word; line-height: normal !important;" />DEFAULT:<br style="box-sizing: border-box; outline: 0px; word-wrap: break-word; line-height: normal !important;" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CLOPT="-A"</p><p style="box-sizing: border-box; outline: 0px; padding: 0px; margin: 0px 0px 16px; font-family: 'Microsoft YaHei', 'SF Pro Display', Roboto, Noto, Arial, 'PingFang SC', sans-serif; font-size: 16px; color: #4f4f4f; overflow-x: auto; word-wrap: break-word; background-color: #ffffff; line-height: 1.8em !important;"><span style="box-sizing: border-box; outline: 0px; word-wrap: break-word; color: #ff0000; line-height: normal !important;">simpserv</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SRVGRP=GROUP1 SRVID=1</p><p style="box-sizing: border-box; outline: 0px; padding: 0px; margin: 0px 0px 16px; font-family: 'Microsoft YaHei', 'SF Pro Display', Roboto, Noto, Arial, 'PingFang SC', sans-serif; font-size: 16px; color: #4f4f4f; overflow-x: auto; word-wrap: break-word; background-color: #ffffff; line-height: 1.8em !important;">*SERVICES<br style="box-sizing: border-box; outline: 0px; word-wrap: break-word; line-height: normal !important;" />TOUPPER</p><p style="box-sizing: border-box; outline: 0px; padding: 0px; margin: 0px 0px 16px; font-family: 'Microsoft YaHei', 'SF Pro Display', Roboto, Noto, Arial, 'PingFang SC', sans-serif; font-size: 16px; color: #4f4f4f; overflow-x: auto; word-wrap: break-word; background-color: #ffffff; line-height: 1.8em !important;"><br style="box-sizing: border-box; outline: 0px; word-wrap: break-word; line-height: normal !important;" />如果没改直接进行第3步，常有以下错误提示：<br style="box-sizing: border-box; outline: 0px; word-wrap: break-word; line-height: normal !important;" />2.1 IPCKEY&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;<br style="box-sizing: border-box; outline: 0px; word-wrap: break-word; line-height: normal !important;" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; syntax error<br style="box-sizing: border-box; outline: 0px; word-wrap: break-word; line-height: normal !important;" />CMDTUX_CAT:866: ERROR: tmloadcf: Severe error found. Stop syntax checking.<br style="box-sizing: border-box; outline: 0px; word-wrap: break-word; line-height: normal !important;" />解决方法：对&lt;&gt;按照example进行修改</p><p style="box-sizing: border-box; outline: 0px; padding: 0px; margin: 0px 0px 16px; font-family: 'Microsoft YaHei', 'SF Pro Display', Roboto, Noto, Arial, 'PingFang SC', sans-serif; font-size: 16px; color: #4f4f4f; overflow-x: auto; word-wrap: break-word; background-color: #ffffff; line-height: 1.8em !important;">2.2 CMDTUX_CAT:868: ERROR: tmloadcf cannot run on a non-master node<br style="box-sizing: border-box; outline: 0px; word-wrap: break-word; line-height: normal !important;" />解决方法：ubbsimple 文件中将&lt;Machine-name&gt;改为你的机器名，在windows下使用<br style="box-sizing: border-box; outline: 0px; word-wrap: break-word; line-height: normal !important;" />echo %computername% 显示机器名，在unix下使用 uname -n 。注意在windows 下,通过hostname 或者 %COMPUTERNAME% 查出来的机器名不论是大小写,在ubb中设置成大写.其实我用小写也执行成功了。</p><p style="box-sizing: border-box; outline: 0px; padding: 0px; margin: 0px 0px 16px; font-family: 'Microsoft YaHei', 'SF Pro Display', Roboto, Noto, Arial, 'PingFang SC', sans-serif; font-size: 16px; color: #4f4f4f; overflow-x: auto; word-wrap: break-word; background-color: #ffffff; line-height: 1.8em !important;">3. 编译与执行</p><p style="box-sizing: border-box; outline: 0px; padding: 0px; margin: 0px 0px 16px; font-family: 'Microsoft YaHei', 'SF Pro Display', Roboto, Noto, Arial, 'PingFang SC', sans-serif; font-size: 16px; color: #4f4f4f; overflow-x: auto; word-wrap: break-word; background-color: #ffffff; line-height: 1.8em !important;">3.1 生成二进制配置文件,长出现问题看2.1 2.2<br style="box-sizing: border-box; outline: 0px; word-wrap: break-word; line-height: normal !important;" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $tmloadcf -y ubbsimple<br style="box-sizing: border-box; outline: 0px; word-wrap: break-word; line-height: normal !important;" />3.2 编译客户端程序<br style="box-sizing: border-box; outline: 0px; word-wrap: break-word; line-height: normal !important;" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $buildclient -o simpcl -f simpcl.c<br style="box-sizing: border-box; outline: 0px; word-wrap: break-word; line-height: normal !important;" />3.3 编译服务器程序<br style="box-sizing: border-box; outline: 0px; word-wrap: break-word; line-height: normal !important;" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $buildserver -o simpserv -f simpserv.c -s TOUPPER<br style="box-sizing: border-box; outline: 0px; word-wrap: break-word; line-height: normal !important;" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 此处生成的可执行文件名要与ubbsimple中的相匹配<br style="box-sizing: border-box; outline: 0px; word-wrap: break-word; line-height: normal !important;" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 否则，出项错误 Can't send request to service TOUPPER<br style="box-sizing: border-box; outline: 0px; word-wrap: break-word; line-height: normal !important;" />3.4 启动tuxedo应用系统<br style="box-sizing: border-box; outline: 0px; word-wrap: break-word; line-height: normal !important;" />&nbsp;&nbsp;&nbsp;&nbsp; $tmboot -y<br style="box-sizing: border-box; outline: 0px; word-wrap: break-word; line-height: normal !important;" />3.5 运行客户端<br style="box-sizing: border-box; outline: 0px; word-wrap: break-word; line-height: normal !important;" />&nbsp;&nbsp;&nbsp;&nbsp; $./simpcl hello<br style="box-sizing: border-box; outline: 0px; word-wrap: break-word; line-height: normal !important;" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 显示Returned string is: HELLO表示<a target="_blank" style="box-sizing: border-box; outline: 0px; color: #009999; text-decoration: underline; cursor: pointer; word-wrap: break-word; line-height: normal !important;"><span style="box-sizing: border-box; outline: 0px; word-wrap: break-word;">测试</span></a>成功<br style="box-sizing: border-box; outline: 0px; word-wrap: break-word; line-height: normal !important;" />3.6 关闭tuxedo应用<br style="box-sizing: border-box; outline: 0px; word-wrap: break-word; line-height: normal !important;" />&nbsp;&nbsp;&nbsp;&nbsp; $tmshutdown -y</p></div><img src ="http://www.cppblog.com/prayer/aggbug/216189.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/prayer/" target="_blank">Prayer</a> 2019-01-11 16:53 <a href="http://www.cppblog.com/prayer/archive/2019/01/11/216189.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>tuxedo客户端测试程序</title><link>http://www.cppblog.com/prayer/archive/2019/01/11/216188.html</link><dc:creator>Prayer</dc:creator><author>Prayer</author><pubDate>Fri, 11 Jan 2019 07:53:00 GMT</pubDate><guid>http://www.cppblog.com/prayer/archive/2019/01/11/216188.html</guid><wfw:comment>http://www.cppblog.com/prayer/comments/216188.html</wfw:comment><comments>http://www.cppblog.com/prayer/archive/2019/01/11/216188.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/prayer/comments/commentRss/216188.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/prayer/services/trackbacks/216188.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: https://blog.csdn.net/zistxym/article/details/51533774client.c=====================================================#include &lt;stdio.h&gt;#include "atmi.h" /*包含TUXEDO系统的头文件"atmi.h", 以便引用TUXEDO的函数和变量定...&nbsp;&nbsp;<a href='http://www.cppblog.com/prayer/archive/2019/01/11/216188.html'>阅读全文</a><img src ="http://www.cppblog.com/prayer/aggbug/216188.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/prayer/" target="_blank">Prayer</a> 2019-01-11 15:53 <a href="http://www.cppblog.com/prayer/archive/2019/01/11/216188.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>tmshutdown: internal error: CMDTUX_CAT:764: ERROR: can't attach to BB</title><link>http://www.cppblog.com/prayer/archive/2010/11/01/132012.html</link><dc:creator>Prayer</dc:creator><author>Prayer</author><pubDate>Mon, 01 Nov 2010 09:27:00 GMT</pubDate><guid>http://www.cppblog.com/prayer/archive/2010/11/01/132012.html</guid><wfw:comment>http://www.cppblog.com/prayer/comments/132012.html</wfw:comment><comments>http://www.cppblog.com/prayer/archive/2010/11/01/132012.html#Feedback</comments><slash:comments>5</slash:comments><wfw:commentRss>http://www.cppblog.com/prayer/comments/commentRss/132012.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/prayer/services/trackbacks/132012.html</trackback:ping><description><![CDATA[<div class="bct fc05 fc11 nbw-blog ztag">
<p>$ tmshutdown -y<br>Shutting down all admin and server processes in /home/billklmy/cfg/tuxconfig</p>
<p>tmshutdown: internal error: CMDTUX_CAT:764: ERROR: can't attach to BB<br>&nbsp;<br>解决办法：执行ipcs -qms |&nbsp; grep billklmy | grep -v 'grep' |&nbsp; awk '{ print "ipcrm -"$1" "$2}' |sh<br>然后再tmboot -y即可了。<br>&nbsp;<br>厂方解释原因是执行了大的报表查询程序导致的，很少出现。</p>
</div>
<img src ="http://www.cppblog.com/prayer/aggbug/132012.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/prayer/" target="_blank">Prayer</a> 2010-11-01 17:27 <a href="http://www.cppblog.com/prayer/archive/2010/11/01/132012.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>五大开源ESB项目</title><link>http://www.cppblog.com/prayer/archive/2010/03/16/109844.html</link><dc:creator>Prayer</dc:creator><author>Prayer</author><pubDate>Tue, 16 Mar 2010 11:02:00 GMT</pubDate><guid>http://www.cppblog.com/prayer/archive/2010/03/16/109844.html</guid><wfw:comment>http://www.cppblog.com/prayer/comments/109844.html</wfw:comment><comments>http://www.cppblog.com/prayer/archive/2010/03/16/109844.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/prayer/comments/commentRss/109844.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/prayer/services/trackbacks/109844.html</trackback:ping><description><![CDATA[<p>【51CTO快译】ESB，英文全称Enterprise Service Busses（直译为企业级服务列车），是一种可以让你在Web服务上创建运行在不同平台上的商务流程的软件。</p>
<p>&#160;</p>
<div class=tuij>
<ul>
    <li><a href="http://tech.51cto.com/art/200712/62987.htm" target=_blank><font color=#464646>为什么我们需要ESB？ESB是怎么回事？</font></a>
    <li><a href="http://developer.51cto.com/art/200906/126793.htm" target=_blank><font color=#464646>案例解析：刚柔相济，构建企业联邦 ESB</font></a>
    <li><a href="http://developer.51cto.com/art/200906/126799.htm" target=_blank><font color=#464646>借助 ESB 整合航空公司商务体系</font></a>
    <li><a href="http://developer.51cto.com/art/200906/128809.htm" target=_blank><font color=#464646>ESB 案例解析:刚柔相济，构建企业联邦 E..</font></a>
    <li><a href="http://developer.51cto.com/art/200906/130408.htm" target=_blank><font color=#464646>GlassFish ESB v2.1发布</font></a> </li>
</ul>
</div>
下面列出五大开源ESB项目，排名不分先后：
<p>&#160;</p>
<p><strong>JBoss ESB（JBoss）</strong></p>
<p><a href="http://images.51cto.com/files/uploadimg/20091102/0945020.jpg" target=_blank><img class=fit-image onmousewheel="javascript:return big(this)" height=98 alt=JBoss src="http://images.51cto.com/files/uploadimg/20091102/0945020.jpg" width=155 onload="javascript:if(this.width>498)this.style.width=498;" border=0></a>&nbsp;</p>
<p>在GA版本中有着成熟的组件，没有厂商绑定之类的特征。</p>
<p><strong>Apache ServiceMix（Apache）</strong></p>
<p><a href="http://images.51cto.com/files/uploadimg/20091102/0945021.jpg" target=_blank><img class=fit-image onmousewheel="javascript:return big(this)" height=70 alt=Apache src="http://images.51cto.com/files/uploadimg/20091102/0945021.jpg" width=145 onload="javascript:if(this.width>498)this.style.width=498;" border=0></a>&nbsp;</p>
<p>Apache ServiceMix 4基于OSGi，提供了一个与XML标准集成的选项。</p>
<p><strong>OpenESB（Sun/Oracle）</strong></p>
<p><a href="http://images.51cto.com/files/uploadimg/20091102/0945022.jpg" target=_blank><img class=fit-image onmousewheel="javascript:return big(this)" height=88 alt=Sun src="http://images.51cto.com/files/uploadimg/20091102/0945022.jpg" width=158 onload="javascript:if(this.width>498)this.style.width=498;" border=0></a>&nbsp;</p>
<p>OpenESB与Glassfish应用服务器以及NetBeans有着紧密的集成，因此学习曲线很简单。</p>
<p><strong>MuleESB（MuleSoft）</strong></p>
<p><a href="http://images.51cto.com/files/uploadimg/20091102/0945023.jpg" target=_blank><img class=fit-image onmousewheel="javascript:return big(this)" height=69 alt=MuleSoft src="http://images.51cto.com/files/uploadimg/20091102/0945023.jpg" width=159 onload="javascript:if(this.width>498)this.style.width=498;" border=0></a>&nbsp;</p>
<p>Mule是当下使用最多的开源集成平台。MuleESB价格低廉，配置、扩展简单，而且灵活性强，使得它非常流行。</p>
<p><strong>WSO2 ESB（WSO2）</strong></p>
<p><a href="http://images.51cto.com/files/uploadimg/20091102/0945024.jpg" target=_blank><img class=fit-image onmousewheel="javascript:return big(this)" height=72 alt=WSO2 src="http://images.51cto.com/files/uploadimg/20091102/0945024.jpg" width=145 onload="javascript:if(this.width>498)this.style.width=498;" border=0></a>&nbsp;</p>
<p>相比其他使用了JBI规范的重量级ESB，WSO2这个新来者带来了一个轻量级的ESB。这是因为，WSO2 ESB以Web服务标准作为集成的焦点。</p>
<img src ="http://www.cppblog.com/prayer/aggbug/109844.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/prayer/" target="_blank">Prayer</a> 2010-03-16 19:02 <a href="http://www.cppblog.com/prayer/archive/2010/03/16/109844.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>ESB架构笔记</title><link>http://www.cppblog.com/prayer/archive/2010/03/16/109843.html</link><dc:creator>Prayer</dc:creator><author>Prayer</author><pubDate>Tue, 16 Mar 2010 10:55:00 GMT</pubDate><guid>http://www.cppblog.com/prayer/archive/2010/03/16/109843.html</guid><wfw:comment>http://www.cppblog.com/prayer/comments/109843.html</wfw:comment><comments>http://www.cppblog.com/prayer/archive/2010/03/16/109843.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/prayer/comments/commentRss/109843.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/prayer/services/trackbacks/109843.html</trackback:ping><description><![CDATA[<h2>ESB是什么</h2>
<ul>
    <li><span class=nobr><a title="Visit page outside Confluence" href="http://www.infoq.com/cn/articles/ESB-Roundup-Part1-Defining-ESB" rel=nofollow><u><font color=#006699>ESB综述1：定义ESB<sup><img class=rendericon height=7 alt="" src="http://www.javaeye.com/images/icons/linkext7.gif" width=7 align=absMiddle border=0> </sup></font></u></a></span>&#8201;、<span class=nobr><a title="Visit page outside Confluence" href="http://www.infoq.com/cn/articles/ESB-Roundup-Part-two" rel=nofollow><u><font color=#006699>ESB综述2：ESB使用案例<sup><img class=rendericon height=7 alt="" src="http://www.javaeye.com/images/icons/linkext7.gif" width=7 align=absMiddle border=0> </sup></font></u></a></span>&#8201; (InfoQ)
    <li><span class=nobr><a title="Visit page outside Confluence" href="http://www.ibm.com/developerworks/cn/architecture/ar-esbpat1/" rel=nofollow><u><font color=#006699>探索企业服务总线 part1(IBM DW)<sup><img class=rendericon height=7 alt="" src="http://www.javaeye.com/images/icons/linkext7.gif" width=7 align=absMiddle border=0> </sup></font></u></a></span>&#8201;，<span class=nobr><a title="Visit page outside Confluence" href="http://www.ibm.com/developerworks/cn/architecture/ar-esbpat2/" rel=nofollow><u><font color=#006699>part2<sup><img class=rendericon height=7 alt="" src="http://www.javaeye.com/images/icons/linkext7.gif" width=7 align=absMiddle border=0> </sup></font></u></a></span>&#8201;
    <li><span class=nobr><a title="Visit page outside Confluence" href="http://www.ddj.com/article/printableArticle.jhtml?articleID=201200303&amp;amp;dept_url=/java/" rel=nofollow><u><font color=#006699>Defining the ESB <sup><img class=rendericon height=7 alt="" src="http://www.javaeye.com/images/icons/linkext7.gif" width=7 align=absMiddle border=0> </sup></font></u></a></span>&#8201;&nbsp;(DDJ)
    <li><span class=nobr><a title="Enterprise Service Bus 2004.rar attached to ESB" href="http://www.javaeye.com/download/attachments/2640/Enterprise+Service+Bus+2004.rar?version=1"><u><font color=#006699>《Enterprise Service Bus》<sup><img class=rendericon height=7 alt="" src="http://www.javaeye.com/images/icons/link_attachment_7.gif" width=7 align=absMiddle border=0> </sup></font></u></a></span>&#8201;,O'Reilly 2004 </li>
</ul>
<p>&nbsp;&nbsp;&nbsp; ESB就是一个服务的中介，形成服务使用者-&gt;ESB服务Proxy-&gt;服务提供者的生物链，中介的作用在不同应用中各有不同：</p>
<ul>
    <li><strong>解耦中介</strong> ：客户对实际服务提供者的身份、物理位置、传输协议和接口定义都是不知道也不关心的，交互集成代码提取到了业务逻辑之外，由ESB平台进行中央的宣告式定义。<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ESB平台实现<strong>协议转换</strong> (WebService，Http，JMS...)，<strong>消息转换</strong> (转换、充实、过滤)，<strong>消息路由</strong> (同步/异步、发布/订阅、基于内容路由、分支与聚合...)。<strong>&nbsp;</strong>
    <li><strong>服务中介</strong> ：ESB平台作为中介提供服务交互中的基础服务。<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ESB平台实现<strong>SLA</strong> (可靠性保证，负载均衡，流量控制，缓存，事务控制，加密传输)，<strong>服务管理监控</strong> (异常处理，服务调用及消息数据记录，系统及服务的状态监控，ESB配置管理)，<strong>统一安全管理</strong> (这个有点理想主义)<strong>。</strong>
    <li><strong>服务编排</strong> ：多个服务进行编排形成新的服务。<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ESB支持一个直观的形式定义新组合服务的流程(工作流、BPEL 或 代码级编排)。 </li>
</ul>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 缺点就是天然的额外中转性能消耗，中央ESB的性能瓶颈和高可用性问题。</p>
<h2><a name=ESB-ESB实现><u><font color=#006699>ESB实现</font></u></h2>
<h3><a name=ESB-开源ESB实现><font color=#006699>开源ESB实现</font></h3>
<ul>
    <li><a title=Mule href="http://www.javaeye.com/display/calvin/Mule">Mule</a> &#8201;&nbsp;，很多时候更像一个Service Container，OpenSource界暂时第一。
    <li><span class=nobr><a title="Visit page outside Confluence" href="http://wso2.org/projects/esb/java" rel=nofollow><u><font color=#006699>WSO2<sup><img class=rendericon height=7 alt="" src="http://www.javaeye.com/images/icons/linkext7.gif" width=7 align=absMiddle border=0> </sup></font></u></a></span>&#8201;，Axis2 背后公司的作品。
    <li><span class=nobr><a title="Visit page outside Confluence" href="http://incubator.apache.org/servicemix/home.html" rel=nofollow><u><font color=#006699>ServiceMix<sup><img class=rendericon height=7 alt="" src="http://www.javaeye.com/images/icons/linkext7.gif" width=7 align=absMiddle border=0> </sup></font></u></a></span>&#8201;，关注于JBI的实现。
    <li><span class=nobr><a title="Visit page outside Confluence" href="http://labs.jboss.com/jbossesb/" rel=nofollow><u><font color=#006699>JBoss ESB<sup><img class=rendericon height=7 alt="" src="http://www.javaeye.com/images/icons/linkext7.gif" width=7 align=absMiddle border=0> </sup></font></u></a></span>&#8201;，&nbsp; <span class=nobr><a title="Visit page outside Confluence" href="https://open-esb.dev.java.net/" rel=nofollow><u><font color=#006699>Sun OpenESB<sup><img class=rendericon height=7 alt="" src="http://www.javaeye.com/images/icons/linkext7.gif" width=7 align=absMiddle border=0> </sup></font></u></a></span>&#8201; 没有关注。 </li>
</ul>
<h3><a name=ESB-开源轻量级ESB><u><font color=#006699>开源轻量级ESB</font></u></h3>
<ul>
    <li><span class=nobr><a title="Visit page outside Confluence" href="http://activemq.apache.org/camel/" rel=nofollow>Apache Camel<sup><img class=rendericon height=7 alt="" src="http://www.javaeye.com/images/icons/linkext7.gif" width=7 align=absMiddle border=0> </sup></a></span>&#8201;，一个嵌入式的Router类库。
    <li><span class=nobr><a title="Visit page outside Confluence" href="http://www.springframework.org/spring-integration" rel=nofollow><u><font color=#006699>Spring Intergration<sup><img class=rendericon height=7 alt="" src="http://www.javaeye.com/images/icons/linkext7.gif" width=7 align=absMiddle border=0> </sup></font></u></a></span>&#8201; ，相当清爽轻量的Spring Style的Router。 </li>
</ul>
<h3><a name=ESB-商业ESB><u><font color=#006699>商业ESB</font></u></h3>
<ul>
    <li><span class=nobr><a title="Visit page outside Confluence" href="http://www.bea.com/aqualogic/" rel=nofollow>BEA AquaLogic<sup><img class=rendericon height=7 alt="" src="http://www.javaeye.com/images/icons/linkext7.gif" width=7 align=absMiddle border=0> </sup></a></span>&#8201;，作为ESB概 念比Mule纯粹，同时使用JMS作为message flow的底层，在Weblogic上实现HA，群集和监控管理界面。但路由编排再次走了图形编程+XML Context(XQuery)的老路，相当鸡肋。
    <li>IBM(Message Broker, Websphere ESB，DataPower), <br></li>
</ul>
<img src ="http://www.cppblog.com/prayer/aggbug/109843.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/prayer/" target="_blank">Prayer</a> 2010-03-16 18:55 <a href="http://www.cppblog.com/prayer/archive/2010/03/16/109843.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>ESB产品要解决的问题</title><link>http://www.cppblog.com/prayer/archive/2010/03/16/109842.html</link><dc:creator>Prayer</dc:creator><author>Prayer</author><pubDate>Tue, 16 Mar 2010 10:54:00 GMT</pubDate><guid>http://www.cppblog.com/prayer/archive/2010/03/16/109842.html</guid><wfw:comment>http://www.cppblog.com/prayer/comments/109842.html</wfw:comment><comments>http://www.cppblog.com/prayer/archive/2010/03/16/109842.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/prayer/comments/commentRss/109842.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/prayer/services/trackbacks/109842.html</trackback:ping><description><![CDATA[日前，某地一政府信息中心负责人，要求用尽量浅显的文字介绍一下ESB产品是个什么东东，能做什么，本想跟他电话沟通，可能效果要比给个文字好些，无奈政府领导忙啊，说没时间听解释，只好给写了东西。 <br><br>&nbsp;&nbsp;&nbsp; 由于是给非专业人士看的，没有把ESB全部的功能都列上，只把最常用的也是最容易理解的功能，给写了写，不一定完全正确，但有助于理解。 <br><br>&nbsp;&nbsp;&nbsp; 原文贴在下面，供对ESB不是很熟悉的朋友建立一个最初的概念。 <br><br>附：ESB产品要解决的问题 <br><br>一、金蝶ESB产品简介 <br><br>&nbsp;&nbsp;&nbsp; 金蝶ESB产品作为SOA的实现，主要目的是整合不同应用系统中的数据，而不管这些应用系统运行在什么样的硬件平台和软件平台上，不管这些数据存储在什么样的数据库中，也不管这些应用系统是由什么软件厂商基于什么开发语言开发的。 <br><br>&nbsp;&nbsp;&nbsp; 数据整合是金蝶ESB产品当前最主要或者说是应用最多的功能。此外还有业务流程整合等功能，目前国内由于信息化发展的现状，应用相对较少，在将来可能会有较多应用。 <br><br>二、数据整合的要求 <br><br>&nbsp;&nbsp;&nbsp; 随着我国信息化的发展，无论是政府还是企业，都已经建设了很多的信息系统。这些信息系统建成后，在每个信息系统内部都实现了信息和数据的整合，但是这些系统之间还都是相互孤立的，不能互相通信，数据也不能相互整合。 <br><br>&nbsp;&nbsp;&nbsp; 举例来说，作为不同的政府部门，工商局、地税局、国税局、质监局、劳动与社会保障局可能都建立了自己的系统，一个企业的不同方面的信息分别在工商局、地税局、国税局、质监局、劳动与社会保障局的信息系统里得到体现，比如关于企业的注册登记信息在工商局的信息系统里，企业纳税信息在地税局和国税局的信息系统里，等等。每个系统都有同一个企业的一部分信息，但是每个系统里的信息也只是这个企业信息的一部分。 <br><br>&nbsp;&nbsp;&nbsp; 随着信息化的发展和社会发展，把分散在这些不同的信息系统（如工商局信息系统、地税局信息系统、国税局信息系统等）里的不同方面的数据整合起来，形成一份完整的数据，其重要性和紧迫性日益突出。比如已经有很多地方政府开始着手和已经着手打造&#8220;企业基础数据信息交换平台&#8221;和&#8220;企业基础信息数据库&#8221;，目的就是要把分散在工商局、地税局、国税局、质监局等不同信息系统里的关于企业不同方面的数据整合到一个统一的&#8220;企业基础信息数据库&#8221;里，并基于这个统一的数据库建设一个&#8220;企业基础数据信息交换平台&#8221;。 <br><br>&nbsp;&nbsp;&nbsp; 作为企业，在信息化的过程中，不同部门也可能建设了自己的信息系统，如OA系统、财务信息系统、人力资源管理系统、客户关系管理系统等，企业员工的日常考勤、薪水发放、绩效考核、客户开拓等信息分别分散在这些不同的系统中，也需要把分散在这些信息系统中的数据有机整合起来。 <br><br>三、数据整合面临的问题 <br><br>&nbsp;&nbsp;&nbsp; 要把这些分散在不同信息系统里的数据有机的整合起来，面临一系列的问题： <br><br>1、这些由不同单位建设的信息系统，很可能运行在截然不同的硬件平台和软件平台上。比如工商局的信息系统可能是运行在IBM的小型机上，操作系统是UNIX；而地税局的信息系统可能是运行在普通的PC服务器上，操作系统是windows；等等。 <br><br>2、这些不同的信息系统，数据可能保存在不同的数据库系统甚至文件系统上。比如地税局的数据保存在oracle数据库中；国税局的数据保存在sql server数据库中；等等。 <br><br>3、这些不同的信息系统，是由不同的软件厂商、基于不同的开发语言开发的。比如有的信息系统可能是用J2EE架构的，有的信息系统可能是.NET架构的，还有的信息系统可能是采用VB、Delphi等开发的；等等 <br><br>4、&#8230;&#8230; <br><br>针对这些问题，金蝶ESB产品相应有自己的应对方案和解决方案。 <br><br>四、金蝶ESB产品解决方案 <br><br>&nbsp;&nbsp;&nbsp; 金蝶ESB产品作为一款成熟的产品，通过部署、实施、定制的方式来解决面临的一系列问题，不需要开发，大大降低数据整合的工作量和风险，同时具备高度的灵活性，可以随需应变。 <br><br>1、金蝶ESB产品采用JAVA开放，具备良好的跨平台性，可以轻松部署在不同的硬件服务器和操作系统之上。 <br><br>2、金蝶ESB产品针对主流数据库和txt、excel等，提供了数据适配器，可以轻松跟各种数据库打交道。 <br><br>3、金蝶ESB产品采用SOA架构，能够方便跟各种开发语言进行数据通信。 <br><br>4、金蝶ESB产品提供可视化的设计工具，非常容易学习，大大减少部署实施工作量。 <br><br>&#8230;&#8230; <br><br>五、数据整合举例 <br><br>&nbsp;&nbsp;&nbsp; 假设我们要把地税局的数据整合到某个统一的中心数据库里，只需要在可视化的设计工具里，经过简单配置，形成如下图所示的一个流程，即可轻松实现。 <br><br><img class=magplus title=点击查看原始大小图片 height=437 src="http://dl.javaeye.com/upload/attachment/198651/367dc007-850a-3065-8333-1d0519cd67b9.jpg" width=700> <br><br>
<div class=attachments>
<ul style="DISPLAY: none">
    <li><a href="http://dl.javaeye.com/upload/attachment/198651/367dc007-850a-3065-8333-1d0519cd67b9.jpg" target=_blank><img class=magplus title=点击查看原始大小图片 src="http://dl.javaeye.com/upload/attachment/198651/367dc007-850a-3065-8333-1d0519cd67b9-thumb.jpg"></a>
    <li>大小: 110 KB </li>
</ul>
<ul>
    <li><a onclick="$$('div.attachments ul').invoke('show');$(this).up(1).hide();return false;" href="http://zydky.javaeye.com/blog/580185#"><u><font color=#108ac6>查看图片附件</font></u></a> </li>
</ul>
</div>
<a href="http://zydky.javaeye.com/blog/580185">http://zydky.javaeye.com/blog/580185</a>
<img src ="http://www.cppblog.com/prayer/aggbug/109842.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/prayer/" target="_blank">Prayer</a> 2010-03-16 18:54 <a href="http://www.cppblog.com/prayer/archive/2010/03/16/109842.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>IBM ESB 产品之间的比较及应用场景: 第 1 部分，IBM ESB 产品之间的比较</title><link>http://www.cppblog.com/prayer/archive/2010/03/16/109841.html</link><dc:creator>Prayer</dc:creator><author>Prayer</author><pubDate>Tue, 16 Mar 2010 10:52:00 GMT</pubDate><guid>http://www.cppblog.com/prayer/archive/2010/03/16/109841.html</guid><wfw:comment>http://www.cppblog.com/prayer/comments/109841.html</wfw:comment><comments>http://www.cppblog.com/prayer/archive/2010/03/16/109841.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/prayer/comments/commentRss/109841.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/prayer/services/trackbacks/109841.html</trackback:ping><description><![CDATA[<table class=content id=table1 cellSpacing=0 cellPadding=0 width=333 border=0>
    <tbody>
        <tr>
            <td class=left-nav-highlight>本文内容包括：</td>
        </tr>
        <tr class=left-nav-child-highlight>
            <td>
            <ul>
                <li><a class=left-nav-child href="http://www.uml.org.cn/soa/200907201.asp#1. 企业服务总线 ESB 的介绍 |outline" cmImpressionSent="1">企业服务总线 ESB 的介绍 </a>
                <li><a class=left-nav-child href="http://www.uml.org.cn/soa/200907201.asp#2.IBM 的 ESB 产品 |outline" cmImpressionSent="1">IBM 的 ESB 产品 </a>
                <li><a class=left-nav-child href="http://www.uml.org.cn/soa/200907201.asp#N1032C" cmImpressionSent="1">三款产品的比较 </a>
                <li><a class=left-nav-child href="http://www.uml.org.cn/soa/200907201.asp#N10382" cmImpressionSent="1">总结 </a>
                <li><a class=left-nav-child href="http://www.uml.org.cn/soa/200907201.asp#resources" cmImpressionSent="1">参考资料 </a></li>
            </ul>
            </td>
        </tr>
    </tbody>
</table>
<blockquote>本文首先介绍了企业级应用程序的发展以及 ESB 的定义；随后，分析了 ESB 在 SOA 解决方案中所起的作用，并比较介绍了三款 ESB 产品在支持实现一个 ESB 解决方案中所起的作用。</blockquote>
<h3><a name="1. 企业服务总线 ESB 的介绍 |outline"><span class=atitle>企业服务总线 ESB 的介绍 </span></a></h3>
<p><a name=N100A0><span class=smalltitle>企业应用的发展概述 </span></a></p>
<p>在介绍企业服务总线之前，有必要花一些笔墨来介绍企业应用架构的发展和变迁。企业级应用架构的发展经历了以下几个阶段：</p>
<ol type=1>
    <li>独立应用系统
    <li>EAI 阶段
    <li>SOA 阶段 </li>
</ol>
<p><strong>独立应用阶段 </strong></p>
<p>20 世纪 60 到 70 年代，企业应用处于独立应用系统阶段，当时的企业应用是一种用来替代重复性劳动的简单设计，其目的是用计算机代替孤立的，体力性质的工作环节，将相关联的企业信息或数据管理起来。这些系统大部分是独立的系统——有独立的数据库、应用服务器、用户界面。因此有时候这类应用也叫&#8220;竖井型&#8221;的应用。</p>
<p>但是，随着业务和信息的不断扩展，独立应用系统渐渐不能满足企业对 IT 的需求，表现在大量的信息冗余，因为在建立一个新的应用的时候需要重新建立一套数据库；功能的重新设计，相似的功能存在于多个系统中；例如，客户信息在一个公司中可能有多个拷贝分别存在于多个数据库中，不同时期建立的应用系统所使用的技术也会不同。对于获取客户资料这样的功能，必然存在于多个系统中，而且在不同的系统中其实现方式可能是 Java/J2EE、Delphi、C/C++。</p>
<p><strong>EAI 阶段 </strong></p>
<p>20 世纪 80 到 90 年代，一些公司或集成商意识到应用集成的价值和必要性。EAI 是一种将多个不同平台、用不同方案建立的异构的应用集成的一种技术和方法。它的目标包括以下几个方面：各个分离的系统间的相互通讯，消除信息孤岛，实现信息的共享。从功能的角度来看，EAI 包括信息接收、转换、翻译、路由、传播和业务流程管理。从架构上看有两种方式：Hub/Spoke 方式和 Bus 方式。</p>
<p>图 1 所示的 Hub/Spoke 结构使用一个中心代理（Hub）和多个适配器（Spoke）将 Hub 和应用连接起来。适配器负责将应用的数据格式转换成 Hub 可以理解的格式，Hub 将数据再转换成目标系统可以理解的格式，并执行消息的路由。Hub/Spoke 方式的弊端在于只有一个代理中心，当连接的应用种类增加或者消息量增大时，代理中心的性能将成为整个系统的瓶颈，在可扩展性方面也存在着一定的问题。</p>
<a name=N100CB><strong>图 1 . Hub/Spoke 结构的 EAI 集成 </strong></a><br><img height=384 alt="" src="http://www.uml.org.cn/soa/images/imabnge003.jpg" width=495>
<p>图 2 所示的 Bus 结构使用一个中心总线，应用程序通过 Adapter 将消息发送给总线，总线负责消息的路由，接受方的应用程序也有自己的 Adapter 来转换接受到的消息。Bus 结构和 Hub/Spoke 结构的最大区别在于在 Bus 结构中，Adapter 位于应用程序中，而 Hub/Spoke 结构中，Adapter 由 Hub 来统一管理。这样在 Bus 结构中，加入一个新的应用变得很简单，可扩展性得到了很大的提高，但是应用程序方的负担加重了。</p>
<a name=N100DC><strong>图 2. Bus 结构的 EAI 集成 </strong></a><br><img height=331 alt="" src="http://www.uml.org.cn/soa/images/imabnge005.gif" width=503>
<p><strong>SOA 阶段 </strong></p>
<p>SOA 将应用资源看成一个个独立的，自包含并良好定义的服务，通过这些服务的组装，编排可以产生新的应用。每一个服务可以完成一个独立业务功能，并且不依赖于业务上下文或者其他服务的状态。服务的定义是标准的且被广泛支持的，比如 Web Service。在 SOA 的架构中，人们都用标准的方式来封装自己的服务，使得任何一个客户端程序都可以容易的和后台系统实施连接。而 ESB 是 SOA 架构中的一个核心基石，在几乎所有的 SOA 架构中，都将 ESB 放在核心的位置。图 3 是 IBM SOA Reference architecture，从中我们可以看出 ESB 在一个 SOA 架构中的地位，对该图的详细解释不在本文介绍范围之内，有兴趣的读者可以参考一下 IBM SOA 专区的相关文章。</p>
<a name=N100F1><strong>图 3. IBM 的 SOA 参考架构 </strong></a><br><img height=331 alt="" src="http://www.uml.org.cn/soa/images/imabnge007.gif" width=524>
<p>下面我们来介绍一下 ESB。</p>
<p><a name=N10100><span class=smalltitle>什么是 ESB?</span></a></p>
<p>什么是 ESB？ESB 严格来说不是某一个产品，而是一种框架，设计模式。不同的提供商对 ESB 的理解也各有不同。 </p>
<p><em>&#8220;ESBs are essentially integration systems, not SOA systems. SOA is about tearing down application silos, but integration systems reinforce those silos. [...] an ESB is especially good for bridging to legacy applications, and therefore it is a useful component in a services infrastructure&#8221;</em></p>
<p>----Anne Thomas Manes, Research Director with Burton Group </p>
<p><em>&#8220;An Enterprise Service Bus (ESB) is a distributed middleware system for integrating enterprise IT assets using a service-oriented approach.&#8221;</em></p>
<p>----Ron Ten-Hove , Sun Microsystems and JBI Spec Lead</p>
<p><em>&#8220;A Web-services-capable infrastructure that supports intelligently directed communication and mediated relationships among loosely coupled and decoupled business components.&#8221;</em></p>
<p>--Gartner </p>
<p>IBM 对 ESB 是这样描述的：</p>
<p>&#8220;<em>An enterprise service bus (ESB) is a pattern of middleware that unifies and connects services, applications and resources within a business. Put another way, it is the framework within which the capabilities of a business' applications are made available for reuse by other applications throughout the organization and beyond. The ESB is not a new software product — it's a new way of looking at how to integrate applications, coordinate resources and manipulate information </em>&#8221;</p>
<p>从 IBM 的立场来说，ESB 不仅仅是一个概念，而是一种中间件模式；它不是某个产品，而是一种全新的集成应用，协调资源和操纵信息的框架。</p>
<p>下面来介绍 ESB 或可以称为 ESB 的中间件产品保护一些特征，有些是必须的，有些是可选的：</p>
<ol type=1>
    <li><strong>连接性 </strong>
    <p>ESB 必须提供一种支持服务交互的桥梁，它必须支持多协议 (protocol) 之间的连接。不仅要提供对消息和面向事件的中间件的支持，还要提供和现有 EAI 技术的连接。连接性是 ESB 不可缺少的特征之一。 </p>
    <li><strong>服务交互 </strong>
    <p>服务交互可以理解为 ESB 的一个目的之一，ESB 作为 SOA 架构的核心，必然要支持服务的交互，要在服务的请求者和提供者架起一个坚实的桥梁，让服务的请求者和提供者只需要关心各自的业务逻辑，而不需要在发布和消费服务的环节花很大力气。服务交互也是 ESB 的必备特征。 </p>
    <li><strong>集成 </strong>
    <p>集成的概念是对于系统而言的，ESB 不仅要能集成那些很容易封装服务的系统，也要集成不能方便地封装服务的系统，例如 SAP, ERP, CRM, Siebel 等 EAI 系统、遗留系统。集成也是 ESB 的核心特征之一。 </p>
    <li><strong>消息处理 </strong>
    <p>在集成的过程中，必须要面对的是消息处理，在不同的应用系统中，消息的描述格式是不一样的。在集成环境中，必须要提供一种统一的格式来处理系统间的交互，从 ASBO(Application Specific Business Object ) 到 GBO(Generic Business Object) 之间的互转是 ESB 的核心特征之一。 </p>
    <li><strong>管理 </strong>
    <p>对于一个具有 ESB 特征的产品，管理也是一个重要的方面。例如，当一个服务从一个地址切换到另一个地址，在结构等不发生任何改变的时候，ESB 产品应该提供一个方便的途径适应这种改变。 </p>
    <li><strong>QoS</strong>
    <p>对于服务交互来说，QoS 也是一个重要的特征，比如针对不同的服务请求者提供不同质量的服务响应。有些服务的请求需要在事务中完成，有些服务的交互需要保证其可靠性。一个 ESB 产品应该提供给开发者定义 QoS 的接口。 </p>
    <li><strong>安全 </strong>
    <p>安全的必要性不言而喻，系统和系统之间的交互必然需要认证，授权，加密，签名等安全性。一个优秀的 ESB 产品应该提供可靠的，可灵活配置的安全支持。 </p>
    </li>
</ol>
<h3><a name="2.IBM 的 ESB 产品 |outline"><span class=atitle>IBM 的 ESB 产品 </span></a></h3>
<p>IBM 有三款 ESB 产品：WebSphere ESB (WESB)，WebSphere Message Broker(WMB)，DataPower。这三款 ESB 产品都提供了 ESB 所必备的特征，但是它们各有侧重，WESB 主要构建与 WebSphere Application Server 之上，侧重于对标准协议和消息的支持，更适合于 J2EE，Web-Service 为主要特征的集成环境；WMB 提供了一个高级的 ESB，它构建于 WebSphere Message Queue 之上，提供了百种以上协议的连接和数据格式的转换机制。Datapower 是一款比较新的 ESB 产品，除了提供必备的 ESB 的特性之外，Datapower 更侧重于安全。众所周知，在 XML 的环境中，安全对于性能的影响是巨大的，Datapower 给企业 ESB 提供了强大的安全保障。下面分别介绍这三款 ESB 产品。</p>
<p><a name=N10171><span class=smalltitle>WebSphere ESB</span></a></p>
<p>从图 4 中可以看出 ESB 构建与 WAS ND 之上，它使用了 WAS ND 及 WAS 对于安全，用户注册表，事务，消息引擎的支持，在其之上增加了对服务集成、消息流处理、建模以及 ESB 编程模型的支持等等。从图中还可以看出 WebSphere Process Server 是构建与 WESB 之上，并扩展了服务编排和流程管理方面的支持。</p>
<a name=N1017C><strong>图 4. WESB 在 WAS 产品线的位置 </strong></a><br><img height=315 alt="" src="http://www.uml.org.cn/soa/images/imabnge009.gif" width=524>
<p>下面介绍在 WESB 上实现一个 SOA ESB 解决方案上的以下九个方面的特点，这九个方面的特点来源于上文中介绍的 ESB 的特性，或者特性的细化：</p>
<ol type=1>
    <li><a name=OLE_LINK1></a><strong>消息转换 </strong>
    <p>WESB 所处理的消息为 XML 格式的数据，对于非 XML 结构的数据 WESB 不能处理。对于 XML 结构的数据，在 WESB 的消息流中数据以 SMO(IBM 对 SDO 的扩展，参见参考资料部分了解 SDO 的规范 ) 形式存在，WESB 可以对 XML 消息树的内容进行修改，包括改变某个节点的内容，增加新的节点以及删除某个节点等等。 </p>
    <li><strong>支持的协议 </strong>
    <p>WESB 支持符合 SOA 标准的协议，比如 SOAP/HTTP、SOAP/JMS、WSDL V1.1、UDDI V3.0，WebSphere MQ 等。也就是说 WESB 目前只支持 SOAP 方式来描述服务，传输协议可以是 HTTP、JMS 记忆原生的 WebSphere MQ 的连接。对于多传输协议的基础，建议使用 MB 来做 ESB 的解决方案，参考 MB 的介绍部分。 </p>
    <li><strong>消息路由 </strong>
    <p>消息的路由在 WESB 中有良好的支持，开发环境 WID 中提供了一个节点专门来负责消息路由，WID 也提供了良好的对路由规则定义的开发支持，开发人员可以很容易的定制负责的路由规则。若要实现动态路由的功能，则需要和一个服务的存储单元中来动态的查找服务，目前 WSRR 是一款优秀的提供该功能的工具（参见参考资料部分了解 WSRR）。WESB 从 V6.1 开始提供了 Endpoint lookup 节点来支持 WSRR 的集成，简化了开发过程。如果要实现简单的动态服务路由的功能，则可把服务的定义存放在数据库中，在 WESB 中通过 DB lookup 来查找服务的 Endpoint, 然后注入到消息流中，WESB V6.1 之前的版本就已经支持与数据库的集成。 </p>
    <li><strong>对 Web Service 的支持 </strong>
    <p>WESB 天生运行在 J2EE 的环境里面，对 Web Service 有着天然的支持。 </p>
    <li><strong>事件处理 </strong>
    <p>在消息流中，我们需要跟踪消息各节点的状态，以满足统计和出错处理的要求，在 WESB 中，通过 CEI 机制来处理消息。（CEI 的介绍请参见参考资料部分） </p>
    <li><strong>与遗留系统的集成 </strong>
    <p>WESB 通过 Adapter 与遗留系统进行集成，支持 IBM Websphere Adapter 和 JCA Adapter，通过 JCA 我们就可以将遗留系统里面的服务和数据通过标准（SCA/SDO）的形式整合到集成环境中。 </p>
    <li><strong>安全方面的支持 </strong>
    <p>WESB 没有对安全做特殊的处理，使用 WAS 的安全支持来实现 ESB 的安全。 </p>
    <li><strong>性能 </strong>
    <p>WESB 是一个纯 Java 的应用，运行效率上有些限制，同时可以处理的消息流的数量级为几十到几百之间。 </p>
    <li><strong>开发和部署 </strong>
    <p>开发工具是 WID，一个 ESB 的消息流在 WID 中被称为 Mediation Module，它是一个 J2EE 应用，开发和部署工作无异于普通的企业级应用。 </p>
    </li>
</ol>
<p><a name=N101D8><span class=smalltitle>Message Broker</span></a></p>
<p>WMB 是 IBM 的应用整合中间件，是 IBM ESB 架构重要的产品组成部分之一，用于企业应用整合领域。WMB 目前的版本是 6.1.2，它的前身是 MQSeries Integrator。本质上看，WMB 是 MQ 的衍生产品，它使用 MQ 作为内部通信的机制。然后，WMB 提供的接入方式远不止 MQ 一种，包括 JMS、HTTP(S)、SCADA 等常见的新一代接口规范。在消息转化过程中，WMB 能够识别 XML、C 结构、SOAP 等各种自定义的消息格式。</p>
<p>如图 5 所示，WMB 可以分为开发环境和运行环境两大部分。其中开发环境由开发工具（Toolkit）和调试环境（Rational Agent Controller）组成，运行环境是 WMB 核心，也叫 Broker Domain，由三部分组成，配置管理器（Configuration Manager）、用户名服务器（User Name Server）和代理（Broker）。</p>
<a name=N101E6><strong>图 5. WMB 组件 </strong></a><br><img height=331 alt="" src="http://www.uml.org.cn/soa/images/imabnge011.jpg" width=523>
<ul>
    <li>代理（Broker）：消息代理是 WMB 的消息处理引擎，它提供 WMB 的所有运行服务，在 Windows 系统上它是一个系统服务，在 Unix 平台上表现为一个后台进程。应用系统利用与 MQ 的连接和队列将消息发送到消息代理。代理与代理之间，代理与配置管理器之间通过普通的 MQ 发生和接受类型的消息通道进行通信。在一个主机上我们可以创建一个或者多个 Broker，每个 Broker 会关联一个数据库，利用数据库存储 Broker 需要和相关的信息，每个 Broker 还需要一个队列管理器，多个 Broker 之间不能共享同一个队列管理器，每个 Broker 必须有自己特定的、唯一的队列管理器。每个 Broker 只能被一个配置管理器控制。
    <li>配置管理器（Configuration Manager）：配置管理器是整个 WMB 运行环境中的控制中心，它维护整个 Broker Domain 的配置信息，配置和管理所有代理，增、删、启动、停止消息流，所有的开发工具也是通过配置管理器来部署编译结果的。配置管理器也负责与用户名服务器联系，配置和管理各种用户权限。配置管理器和其他各个部件之间的接口是 MQ，所以配置管理器也必须是基于 MQ 队列管理器而运行的。
    <li>用户名服务器（User Name Server）：用户名服务器是 WMB 运行环境中的可选部分，它可以提供应用程序的接入认证以及订阅主题的访问控制服务。用户名服务器本身是不需要数据库，但必须依赖于队列管理器与其他组件通信。用户名服务器中的用户信息来自认证数据文件。
    <li>开发工具（Toolkit）：开发工具是基于 Eclipse 3.0 的集成开发环境，我们可以在其中开发消息流、消息集、ESQL 代码、Java 代码、映射规则等。通过内置的 MQ Client 与配置管理器连接，并将开发好的执行组件部署到相关的代理中。Eclipse 环境由不同的视图（Perspective）组成，我们在 WMB 中常用的有代理开发视图、代理管理视图等。
    <li>调试工具（Rational Agent Controller）：这是 IBM Rational 开发工具标准的调试工具。一般安装在代理所在的服务器一边，开发工具可以连接 RAC，通过它来控制和调试消息流的运行。需要注意的是，Toolkit 可以并行开发，但是对于同一个执行组不能并行调试，因 RAC 的调试过程是排他的。在 WMB6.0 之后 RAC 不需要再单独安装。 </li>
</ul>
<p>下面从九个方面来介绍 WMB 在实现一个 SOA ESB 解决方案上的支持的特点：</p>
<ol type=1>
    <li><strong>消息转换 </strong>
    <p>WMB 在消息处理方面功能非常强大，对 XML 格式的消息或非 XML 格式的消息，如 C Header，COBOL 等都有很好的支持。实际上，通过开发消息对应的消息集（Message Set），可以在消息流中对任意格式的消息进行修改。WMB 提供了内置的 mapping 和 database 节点，用户可以通过图形化的方式方便的实现消息的转换或与数据库的交互。 </p>
    <li><strong>支持的协议 </strong>
    <p>WMB 支持所有 WESB 支持的传输协议，除了常用的 HTTP、JMS 等，还对 FTP、Socket、Mobile、Telemetry、Biztalk 和 Tuxedo 等有良好的支持。WMB 与 MQ 有着紧密的联系，对 MQ 的支持不在话下。WMB 内置的功能节点对这些协议提供了很好的支持，仅需配置即可，如图 6 所示。<br><a name=N1021B><strong>图 6. Message Broker 的内置开发节点 </strong></a><br><img height=225 alt="" src="http://www.uml.org.cn/soa/images/imabnge015.gif" width=534> <br>　 </p>
    <li><strong>消息路由 </strong>
    <p>WMB 提供了很多功能强大的内置节点支持消息的路由，如 Filter 节点、Label 节点等，在新版本的 WMB 中又引入了 Router 节点，该节点几乎和 WESB 中的 Router 节点一样。若需要实现动态路由，可以使用 WSRR 作为服务的存储，WMB 和 WSRR 有很好的集成，通过 RegistryLookup 和 EndpointLookup 我们可以在消息流中实现动态路由。另外需要指出的是，WMB 可以提供一个消息输入，多个消息输出的功能，可以实现一个消息同时路由到多个输出端。 </p>
    <li><strong>对 Web Service 的支持 </strong>
    <p>在 WMB 中，消息流可以作为 Web Service 暴露出去供外部调用，也可以作为客户端调用外部提供的 Web Service。WMB 不仅提供了内置的 SOAPRequest、SOAPInput 等节点实现对 Web Service 的支持，而且对 WS 扩展，如 WS-Security 和 WS-Addressing 也有良好的支持。<br><br><img height=348 alt="" src="http://www.uml.org.cn/soa/images/imabnge016.gif" width=475> <br>　 </p>
    <li><strong>事件处理 </strong>
    <p>在 WMB 中我们可以通过 Trace Service 来记录所发生的事件。Trace 分两种，一种是 User Trace 记录消息流级别的事件，另一种是 Service Trace，可以记录整个 WMB 的事件，如 Broker 的部署执行。WMB 提供了 Trace 内置节点，可以实时的记录流程中消息内容的变化。 </p>
    <li><strong>与遗留系统的集成 </strong>
    <p>WMB 对遗留系统有良好的支持。对 SAP，PeopleSoft 等大型的 EIS 系统，直接提供了内置的节点，通过 JCA Adapter 配置的方式和 EIS 系统交互。对于比较特别的遗留系统，如 CICS、VSAM 等，WMB 提供了丰富的 SupportPacs，客户可以下载并安装。 </p>
    <li><strong>安全方面的支持 </strong>
    <p>WMB 本身提供了两个层次上的安装，一个是部署时安全性，管理部署 bar 文件到 Broker 以及运行 WMB 管理命令的权限控制；另一个是运行时安全，涉及的权限控制包括发送消息到相应的消息流，以及消息流可以访问哪些 MQ 资源和非 MQ 资源，如数据库系统。 </p>
    <li><strong>性能 </strong>
    <p>WMB 底层是使用 C++ 开发的，在性能上相对于 WESB 有很大的提高。同时可以处理的消息数量级为几千到几万之间。 </p>
    <li><strong>开发和部署 </strong>
    <p>开发工具是 WMB Toolkit，我们开发的消息流和消息集被打成 bar 文件通过配置管理器部署到 Broker 中。 </p>
    </li>
</ol>
<p>总的来说，WMB 是 IBM 久经考验的一款消息中间件产品，为异构的 IT 环境提供了统一的连接和转化，其优势如下：</p>
<ul>
    <li>利用 WebSphere MQ 作为企业消息传递主干，提供了很好的并发性和可靠性
    <li>不仅支持各种标准协议，而且支持和 WebSphere 企业应用程序适配器进行集成
    <li>支持多种数据格式之间的转换，包括 XML、遗留系统、行业标准和自定义消息格式
    <li>针对大量数据处理进行了优化，极大提高了处理速度。 </li>
</ul>
<p><a name=N1027F><span class=smalltitle>Datapower</span></a></p>
<p>DataPower 是一个硬件产品，看起来像一个盒子。目前 IBM 有三款 Datapower 产品供用户选择。按照进入市场的先后次序，它们分别是：Datapower Accelerator XA35，Datapower Security Gateway XS40， Datapower Integration Appliance XI50，见图 7。</p>
<p><a name=N1028B><strong>图 7. IBM 的 Datapower 产品线 </strong></a><br><img height=69 alt="" src="http://www.uml.org.cn/soa/images/imabnge017.jpg" width=570> </p>
<ul>
    <li>XA35 的主要侧重点是 XML 加速，众所周知，在 SOA 的环境中，XML 是应用最广泛的，而对 XML 的解析，加密，解密这些操作让应用服务器来做的话，这是一个很大性能开销，而 XA35 就是要替应用服务器的分担这些 XML 相关的工作，让应用服务器专注于处理业务逻辑；
    <li>XS40 的主要侧重点是安全，即负责提供安全的企业网关，及对 XML 攻击的防范。
    <li>XI50，从名字上看，主要侧重点是集成功能，是一款高级 ESB 产品，提供了多种协议和数据格式的路由和解析的功能。 </li>
</ul>
<p>虽然三款产品各有侧重，但是三款产品的功能也具有包含关系，XS40 包含 XA35 的功能，XI50 包含 XS40 的功能。 </p>
<p>我们依然从以下九个方面来介绍 Datapower 在实现 ESB 解决方案中的特点。</p>
<ol type=1>
    <li><strong>消息转换 </strong>
    <p>Datapower 对 XML 消息有强大的支持，但是 Datapower 绝不仅仅支持 XML，我们可以在 Policy 中使用 Transformation 节点来对消息进行任意我们需要的转换，其原理是使用 XSLT 来实现的，开发人员定义自己 XSLT Stylesheet 并在 Transformation 节点中指定，Datapower 负责转换。 </p>
    <li><strong>支持的协议 </strong>
    <p>Datapower 支持和以下传输协议，HTTP，HTTS，WebSphere MQ <br>WebSphere JMS，TIBICO EMS，FTP Poller, FTP Server, NFS 等等。 Datapower 的 MPGW 就是一个处理不同协议的应用系统的互联的服务对象。 </p>
    <li><strong>消息路由 </strong>
    <p>Datapower 支持对服务和消息的路由，根据消息流中的上下文连接将消息动态的分发到不同的消息提供者。但是 Datapower 的动态路由和 WESB 以及 MB 的动态路由还是有区别的，Datapower 的动态路由需要由开发者定义路由的 Map，而 WESB 和 MB 支持在消息头的属性里动态的设置 Endpoint 的地址。目前 Datapower 可以和 WSRR 集成来定义 WS-Proxy（Datapower 中的一种服务对象），但不支持直接和 WSRR 联合实现动态访问 Endpoint 的功能。 </p>
    <li><strong>对 Web Service 的支持 </strong>
    <p>Datapower 的 XMlFirewall 和 WS-Proxy 提供了强大的对 Web Service 的支持，而且 datapower 提供了细粒度的对 Web Service 的控制，可以从服务级 (Service)，端口级 (port)，绑定级 (binding)，操作级 (operation) 来对消息体进行控制。此外，对 WS-Security 也提供了强大的支持。 </p>
    <li><strong>事件处理 </strong>
    <p>Datapower 中可以通过 Probe 的方式来跟踪消息流的中间状态，在 Probe 中，可以看到消息流的每个节点的消息内容。Probe 一般用于开发调试过程，在生产模式下一般不使用，因为使能 Probe 会牺牲一定的效率。Datapower 不支持与 CEI 类似将消息发送到其他应用系统的机制。 </p>
    <li><strong>与遗留系统的集成 </strong>
    <p>Datapower 不支持和 Adapter 的连接，若要与遗留系统的集成，则需要通过其他中间件转换在遗留系统和 Datapower 之间做而桥梁来连接。 </p>
    <li><strong>安全方面的支持 </strong>
    <p>Datapower 的强大之处在于其对安全方面的强有力的支持，它提供对 XML-attack 的原生支持（关于 XML-attack 的知识参见参考资料）；此外，Datapower 可以对 Web Service 提供细粒度的安全支持，包括加密 (Encryption)，解密 (Decryption)，签名 (Sign) 和确认 (Verify)，以及 HTTS 方面的支持。这些支持在 Datapower 上开发起来都异常简单。 </p>
    <li><strong>性能 </strong>
    <p>Datapower 无疑是三款 ESB 产品中性能最高的，对 XML 的处理速度达到线速，下图是一组测试结果。如果去处网络传输在其中的比例，对 XML 的处理性能所提高的倍数可达到上百倍。</p>
    <table class=content id=table7 cellSpacing=0 cellPadding=0 width=751 border=1>
        <tbody>
            <tr>
                <th scope=col colSpan=2>Software Solution </th>
                <th scope=col colSpan=2>DP Solution </th>
            </tr>
            <tr>
                <td>Avg. response time ( TimeP / N ) </td>
                <td>XML processing time ( TimeX ) </td>
                <td>Avg. response time ( TimeP / N ) </td>
                <td>XML processing time ( TimeX ) </td>
            </tr>
            <tr>
                <td>106 ms </td>
                <td>96 ms </td>
                <td>19 ms </td>
                <td>11ms </td>
            </tr>
        </tbody>
    </table>
    <li><strong>开发和部署 </strong>
    <p>Datapower 的没有相应的开发工具，但是提供了 Web GUI 的管理控制台和 CLI 方式的管理支持。我们在 Web GUI 下开发消息流，开发即部署。</p>
    <p>高速的 XML 处理能力和强大的安全支持，是 Datapower 作为 SOA 应用中的 ESB 的重要特色，这个特点使得 Datapower 成为一款举足轻重的 ESB 产品。 </p>
    </li>
</ol>
<h3><a name=N1032C><span class=atitle>三款产品的比较 </span></a></h3>
<p>从上面的介绍我们可以看出，三款产品都提供了 ESB 的必须的功能，但各有侧重：</p>
<ul>
    <li>WESB 是一个轻量级的 ESB，侧重于标准协议，SOAP,JMS 等应用的基础，构建于 WASND 基础之上，提供了和 J2EE 应用很好的集成功能；同时由于 WESB 是一个纯 Java 的应用服务器，在性能上也是相对较差一点的 ESB，可并发执行的 Mediation Flow 的数量级在几十个左右。WESB 适合使用于对性能要求不是很高，且遵循标准协议的 SOA 整合环境中。WESB 的优势是提供了和流程服务器 WPS 以及 J2EE 服务器 WAS 良好的整合。WESB 的应用场景见图 8： </li>
</ul>
<a name=N1033C><strong>图 8. WESB 的应用场景 </strong></a><br><img height=270 alt="" src="http://www.uml.org.cn/soa/images/imabnge019.gif" width=524>
<ul>
    <li>WMB 是一款高级的 ESB，提供了比 WESB 多很多的传输协议，数据格式的支持，它所支持几乎大部分常用的数据格式和协议。并且 WMB 提供了良好的扩展功能，开发人员可以在 WMB 基础上开发自己的数据格式解析的节点。WMB 使用 C/C++ 编写，在处理性能上比 ESB 也要高出很多倍，可并发执行的流可以达到上百个或上千个。从图 9 可以看出 WESB 和 WMB 在支持的协议上的区别。 </li>
</ul>
<a name=N10350><strong>图 9. WESB 和 WMB 的比较 </strong></a><br><img height=300 alt="" src="http://www.uml.org.cn/soa/images/imabnge021.gif" width=524>
<p>WMB 应用于对性能要求相对较高，多种复杂协议存在的集成环境中。另外，WMB 构建于 WebSphere Message Queue（WMQ）之上。 WMQ 提供了对异步消息提供了可靠的传送机制，比较适合于信息传输量较大，信息交互频繁的场景中。如图 10 所示：</p>
<p><a name=N10362><strong>图 10. WMB 的使用场景 </strong></a><br><img height=258 alt="" src="http://www.uml.org.cn/soa/images/imabnge023.gif" width=524> </p>
<ul>
    <li>Datapower 是 SOA 中的又一重要的 ESB，在 WESB 和 WMB 中都是用软件来实现 XML 解析和安全支持的，而 Datapower 使用硬件的 XML 解析和加速器，在性能上有了很大的提高。在很多 SOA 的环境里，安全和性能是天平的两端，增加安全势必要牺牲性能；而提高性能则需要牺牲安全。所以在安全和性能要求都比较高的环境中，Datapower 是一首选 ESB，因为 Datapower 可以在实现高性能的同时也保证安全。图 11 是一种 Datapower 的应用场景： </li>
</ul>
<a name=N10376><strong>图 11. Datapower 的使用场景 </strong></a><br><img height=324 alt="" src="http://www.uml.org.cn/soa/images/imabnge025.gif" width=524>
<h3><a name=N10382><span class=atitle>总结 </span></a></h3>
<p>基于上文对三款产品做了详细的比较，我们可以做如下总结，WESB 适用于 J2EE 环境下，对性能要求不是很高的，标遵循标准协议的 SOA 集成；WMB 应用更复杂的集成环境，表现为数据格式多种，传输协议多样，性能要求很高；而在安全和性能要求都很高的应用场景下，选择 Datapower 无疑是最好的选择。下面的图表再次对文中的描述进行总结。</p>
<table class=content id=table14 cellSpacing=0 cellPadding=0 border=1>
    <tbody>
        <tr bgColor=#f9f9f9>
            <th scope=col>ESB 功能特点 </th>
            <th scope=col>WESB 的支持 </th>
            <th scope=col>MB 的支持 </th>
            <th scope=col>Datapower </th>
        </tr>
        <tr bgColor=#ffffff>
            <td><strong>消息转换 </strong></td>
            <td>XML </td>
            <td>XML、非 XML </td>
            <td>XML、非 XML </td>
        </tr>
        <tr bgColor=#ffffff>
            <td><strong>支持的协议 </strong></td>
            <td>HTTP,JMS, WMQ 等 </td>
            <td>多达上百种 </td>
            <td>介于前二者之间 </td>
        </tr>
        <tr bgColor=#ffffff>
            <td><strong>消息路由 </strong></td>
            <td>强大，灵活 </td>
            <td>功能强大，灵活 </td>
            <td>灵活度比前二者稍弱 </td>
        </tr>
        <tr bgColor=#ffffff>
            <td><strong>Web Service</strong> </td>
            <td>强大的支持 </td>
            <td>支持 WS 扩展 </td>
            <td>强大的支持 </td>
        </tr>
        <tr bgColor=#ffffff>
            <td><strong>事件处理 </strong></td>
            <td>CEI，可以和外部事件消费系统监控 </td>
            <td>Trace Service </td>
            <td>用于调试 Probe </td>
        </tr>
        <tr bgColor=#ffffff>
            <td><strong>遗留系统的集成 </strong></td>
            <td>Adapter </td>
            <td>丰富的 SupportPac </td>
            <td>特定的遗留系统 </td>
        </tr>
        <tr bgColor=#ffffff>
            <td><strong>安全 </strong></td>
            <td>依赖 WAS 的安全 </td>
            <td>部署和运行时两个级别的安全 </td>
            <td>超强的安全支持 </td>
        </tr>
        <tr bgColor=#ffffff>
            <td><strong>性能 </strong></td>
            <td>几十到几百每秒 </td>
            <td>几千到几万每秒 </td>
            <td>达到线速 </td>
        </tr>
        <tr bgColor=#ffffff>
            <td><strong>开发和部署 </strong></td>
            <td>WID 集成开发环境 </td>
            <td>WMB Toolkit </td>
            <td>WebGUI </td>
        </tr>
    </tbody>
</table>
<p>在本文的<a href="http://www.ibm.com/developerworks/cn/webservices/0811_magy_esb/2.html" target=_blank cmImpressionSent="1">第 2 部分</a>中，我们将用一个简化的实际案例来描述三款 ESB 产品在实现上的差异。</p>
<h3><a name=resources><span class=atitle>参考资料 </span></a></h3>
<strong>学习</strong>
<ul>
    <li><a href="http://publib.boulder.ibm.com/infocenter/adiehelp/index.jsp?topic=/com.ibm.wasee.doc/info/ee/wei/concepts/cea0100.html" target=_blank cmImpressionSent="1">CEI 的介绍</a>：从这里您可以了解 Common Event Infrastructure 相关的内容。
    <li><a href="http://hosteddocs.ittoolbox.com/Enterprise%20Integration%20-%20SOA%20vs%20EAI%20vs%20ESB.pdf" target=_blank cmImpressionSent="1">EAI vs. SOA vs. ESB</a>： 本文向您讲解了这三个概念之间的关系和相关的内容。
    <li><a href="http://publib.boulder.ibm.com/infocenter/dmndhelp/v6rxmx/index.jsp?topic=/com.ibm.websphere.wesb.root.doc/info/welcome.html" target=_blank cmImpressionSent="1">WebSphere Enterprise Service Bus 的产品文档中心</a>： 在这里您可以找到所有和 WESB 产品相关的资源。
    <li><a href="http://publib.boulder.ibm.com/infocenter/wmbhelp/v6r1m0/index.jsp" target=_blank cmImpressionSent="1">WebSphere Message Broker 的产品文档</a>： 在这里您可以找到所有和 WebSphere Message Broker 产品相关的资源。
    <li><a href="http://www.ibm.com/developerworks/cn/websphere/zones/esb/" target=_blank cmImpressionSent="1">WebSphere Enterprise Service Bus 资源中心</a>： 这里拥有 developerWork 中所有和 WESB 相关的内容，让您可以更全面地了解和学习这个产品。
    <li>IBM developerWorks <a href="http://www.ibm.com/developerworks/cn/webservices" target=_blank cmImpressionSent="1">SOA and Web services 专区 </a>提供了大量的文章，以及关于如何开发 Web 服务应用程序的初级、中级和高级教程。
    <li>使用 <a onmouseover=linkQueryAppend(this) href="http://www.ibm.com/developerworks/downloads/soasandbox/" target=_blank cmImpressionSent="1">IBM SOA Sandbox</a> 进行试验！通过 IBM SOA 进行实际的亲手实践来提高您的 SOA 技能。
    <li><a onmouseover=linkQueryAppend(this) href="http://www.ibm.com/software/solutions/soa/" target=_blank cmImpressionSent="1">IBM SOA 网站 </a>提供 SOA 的概述，并介绍 IBM 是如何帮助您实现 SOA 的。
    <li>了解关于 <a href="http://www.ibm.com/developerworks/cn/offers/techbriefings" target=_blank cmImpressionSent="1">developerWorks 技术事件和网络广播 </a>的最新消息。请特别关注以下 SOA 和 Web 服务技术讲座：
    <ul>
        <li><a onmouseover=linkQueryAppend(this) href="http://www.ibm.com/developerworks/offers/techbriefings/details/scasdo.html" target=_blank cmImpressionSent="1">SCA/SDO:To drive the next generation of SOA</a> </li>
    </ul>
    <li>访问 <a onmouseover=linkQueryAppend(this) href="http://safari.bvdep.com/?x=1&amp;portal=bvdep&amp;uicode=&amp;Key=&amp;GUID=D1F1DB57-50AF-4998-99-DA-6D-BB-A5-E0-E4-0B" target=_blank cmImpressionSent="1">Safari 书店 </a>，浏览有关这些技术主题以及其他方面的书籍。
    <li>查看快速的 <a onmouseover=linkQueryAppend(this) href="http://www.ibm.com/developerworks/offers/lp/demos/" cmImpressionSent="1">Web 服务按需演示 </a>。
    <li>获取 <a href="http://www.ibm.com/developerworks/cn/views/rss/customrssatom.jsp?zone_by=Web+services&amp;type_by=Articles&amp;type_by=Tutorials&amp;search_by=&amp;day=1&amp;month=01&amp;year=2005&amp;max_entries=20&amp;feed_by=rss&amp;isGUI=true&amp;Submit.x=46&amp;Submit.y=16" target=_blank cmImpressionSent="1">SOA and Webservices 专区的 RSS</a>。（了解关于 <a href="http://www.ibm.com/developerworks/cn/rss/" target=_blank cmImpressionSent="1">RSS</a> 的更多信息。） </li>
</ul>
<strong>获得产品和技术</strong>
<ul>
    <li>使用 <a href="http://www.ibm.com/developerworks/cn/downloads/" target=_blank cmImpressionSent="1">IBM 试用软件 </a>开发您的下一个项目，可下载或索取 DVD 光盘。 </li>
</ul>
<strong>讨论</strong>
<ul>
    <li>参与 <a onmouseover=linkQueryAppend(this) href="http://www.ibm.com/developerworks/blogs/" target=_blank cmImpressionSent="1">developerWorks Blog</a>，从而加入到 developerWorks 社区中来，其中包括以下与 SOA 和 Web 服务相关的 Blogs：
    <ul>
        <li>Sandy Carter 的 <a onmouseover=linkQueryAppend(this) href="http://www-03.ibm.com/developerworks/blogs/page/SOA_Off_the_Record" target=_blank cmImpressionSent="1">Service Oriented Architecture -- Off the Record</a>
        <li>Ali Arsanjani 的 <a onmouseover=linkQueryAppend(this) href="http://www-03.ibm.com/developerworks/blogs/page/AliArsanjani" target=_blank cmImpressionSent="1">Best Practices in Service-Oriented Architecture</a>
        <li>Bobby Woolf 的 <a onmouseover=linkQueryAppend(this) href="http://www-03.ibm.com/developerworks/blogs/page/woolf" target=_blank cmImpressionSent="1">WebSphere SOA and J2EE in Practice</a>
        <li>Eoin Lane 博士的 <a onmouseover=linkQueryAppend(this) href="http://www-03.ibm.com/developerworks/blogs/page/SOAPatterns" target=_blank cmImpressionSent="1">Building SOA applications with patterns</a>
        <li>Kerrie Holley 的 <a onmouseover=linkQueryAppend(this) href="http://www-03.ibm.com/developerworks/blogs/page/ClientSOA" target=_blank cmImpressionSent="1">Client Insights, Concerns and Perspectives on SOA</a>
        <li>Simon Johnston 的 <a onmouseover=linkQueryAppend(this) href="http://www-03.ibm.com/developerworks/blogs/page/johnston?S_TACT=105AGX52&amp;S_CMP=content" target=_blank cmImpressionSent="1" doneOnce="true">Service-Oriented Architecture and Business-Level Tooling</a></li>
    </ul>
    </li>
</ul>
<img src ="http://www.cppblog.com/prayer/aggbug/109841.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/prayer/" target="_blank">Prayer</a> 2010-03-16 18:52 <a href="http://www.cppblog.com/prayer/archive/2010/03/16/109841.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>tuxedo执行tmloadcf问题解决</title><link>http://www.cppblog.com/prayer/archive/2010/01/19/106025.html</link><dc:creator>Prayer</dc:creator><author>Prayer</author><pubDate>Tue, 19 Jan 2010 08:56:00 GMT</pubDate><guid>http://www.cppblog.com/prayer/archive/2010/01/19/106025.html</guid><wfw:comment>http://www.cppblog.com/prayer/comments/106025.html</wfw:comment><comments>http://www.cppblog.com/prayer/archive/2010/01/19/106025.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/prayer/comments/commentRss/106025.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/prayer/services/trackbacks/106025.html</trackback:ping><description><![CDATA[<p>执行 tmloadcf -y ubbsimple 出现的问题解决 1. CMDTUX_CAT:868: ERROR: tmloadcf cannot run on a non-master node <br>解决方法：ubbsimple 文件中将改为你的机器名，在windows下使用 echo %computername% 显示机器名，<br>在unix下使用 uname -n 。<br>注意在windows 下,通过hostname 或者 %COMPUTERNAME% 查出来的机器名不论是大小写,在ubb中设置成大写. </p>
<p>&nbsp;</p>
<img src ="http://www.cppblog.com/prayer/aggbug/106025.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/prayer/" target="_blank">Prayer</a> 2010-01-19 16:56 <a href="http://www.cppblog.com/prayer/archive/2010/01/19/106025.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>TUXEDO监视系统运行tmadmin命令</title><link>http://www.cppblog.com/prayer/archive/2010/01/13/105574.html</link><dc:creator>Prayer</dc:creator><author>Prayer</author><pubDate>Wed, 13 Jan 2010 07:44:00 GMT</pubDate><guid>http://www.cppblog.com/prayer/archive/2010/01/13/105574.html</guid><wfw:comment>http://www.cppblog.com/prayer/comments/105574.html</wfw:comment><comments>http://www.cppblog.com/prayer/archive/2010/01/13/105574.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/prayer/comments/commentRss/105574.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/prayer/services/trackbacks/105574.html</trackback:ping><description><![CDATA[<p>TUXEDO监视系统运行</p>
<p>进入linux系统，在linux系统dos输入页面中输入tmadmin</p>
<p>进入tmadmin的监管环境，输入下面的命令即可</p>
<p>启动tmadmin<br>tmboot&nbsp; -y</p>
<p>1查看服务信息psr<br>(1) 命令: printserver 简写 psr<br>(2)&nbsp; psr [-m machine] [-g groupname] [-i srvid] [-q qaddress]<br>-m machine LMID为 machine的所有服务进程<br>-g groupname 组名为groupname的所有服务进程<br>-I srvid SRVID为srvid的服务进程<br>-q qaddress 消息队列为qaddress的所有SERVERS查看<a onclick="javascript:tagshow(event, 'server');" href="javascript:;" target=_self><u><strong><font color=#000066>server</font></strong></u></a>的信息<br>(3) 结果示例:<br>Prog Name&nbsp;&nbsp;&nbsp;&nbsp; Queue Name&nbsp;&nbsp; Grp Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ID&nbsp;&nbsp; RqDone&nbsp; Load Done&nbsp; Current Service<br>---------&nbsp;&nbsp;&nbsp; ----------&nbsp;&nbsp;&nbsp; --------&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; --&nbsp;&nbsp;&nbsp; ------&nbsp; ---------&nbsp; ---------------<br>rz_Ecsb&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 00004.04000&nbsp;&nbsp; APGP2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4000&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (&nbsp; IDLE )<br>BBL&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 70020&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; simple&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp; 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 50&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (&nbsp; IDLE )<br>IFMTMS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; APGP2_TMS&nbsp;&nbsp;&nbsp; APGP2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 30001&nbsp;&nbsp;&nbsp;&nbsp; 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 50&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (&nbsp; IDLE )<br>ftpserv32&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 00002.00001&nbsp; FTPGP&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1&nbsp;&nbsp;&nbsp; 60&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3000&nbsp;&nbsp;&nbsp;&nbsp; (&nbsp; IDLE )<br>结果说明:<br>列号&nbsp; 描述<br>1. 服务的可执行文件名<br>2. 服务连接的队列名<br>3. 组名<br>4. 服务的数字id<br>5. 服务已经处理的请求数(该SERVER的所有service的负载因子总和)<br>6. 服务处理的全部请求的参数和，如果当前没有service被调用，则为IDLE<br>2查看交易信息psc<br>(1)&nbsp; 命令: printservice&nbsp; 简写: psc<br>psc [-m machine] [-g groupname] [-I srvid] [-q qaddress]<br>[-s service] [-a {0|1|2}]<br>-s service 显示名为sevice的service信息<br>-a {0|1|2} 显示系统的隐含的service<br><a onclick="javascript:tagshow(event, '%C6%E4%CB%FB');" href="javascript:;" target=_self><u><strong><font color=#000066>其他</font></strong></u></a>参数与psr命令相同<br>(2)&nbsp; 结果示例:<br>Service Name&nbsp;&nbsp; Routine Name&nbsp;&nbsp; Prog Name&nbsp; Grp Name&nbsp;&nbsp; ID&nbsp;&nbsp; Machine&nbsp;&nbsp; # Done&nbsp;&nbsp; Status<br>------------&nbsp;&nbsp; ------------&nbsp;&nbsp;&nbsp;&nbsp; -------&nbsp;&nbsp;&nbsp; --------&nbsp;&nbsp; --&nbsp;&nbsp; -------&nbsp;&nbsp; ------&nbsp;&nbsp; ------<br>416701&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rz_Ecsb&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rz_Ecsb&nbsp;&nbsp;&nbsp;&nbsp; APGP2&nbsp;&nbsp;&nbsp;&nbsp; 4000&nbsp;&nbsp;&nbsp; simple&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AVAIL<br>416601&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rz_Ecsb&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rz_Ecsb&nbsp;&nbsp;&nbsp;&nbsp; APGP2&nbsp;&nbsp;&nbsp;&nbsp; 4000&nbsp;&nbsp;&nbsp; simple&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AVAIL<br>416501&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rz_Ecsb&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rz_Ecsb&nbsp;&nbsp;&nbsp;&nbsp; APGP2&nbsp;&nbsp;&nbsp;&nbsp; 4000&nbsp;&nbsp;&nbsp; simple&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AVAIL<br>(3)&nbsp; 结果说明:<br>列号&nbsp;&nbsp;&nbsp; 描述<br>1. Service Name :服务名<br>2. Routine Name :函数名(采用TUXEDO服务的别名机制,一个函数可以对应多个服务名)<br>3. Prog Name :service 所在的SERVER名<br>4. Grp Name :组名<br>5. ID ：server的ID号<br>6. Machine :server所在的LMID<br>7. # Done ：service被调用的次数<br>8. Status :service的状态。AVAIL表示可用<br>3查看队列信息pq<br>(1) 命令: printqueue 简写:pq [PADRESS]<br>(2) 结果示例:<br>pq 00004.05062<br>Prog Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Queue Name&nbsp; # Serve&nbsp; Wk Queued&nbsp; # Queued&nbsp; Ave. Len&nbsp;&nbsp;&nbsp; Machine<br>---------&nbsp;&nbsp;&nbsp; ------------&nbsp; ------&nbsp;&nbsp; ---------&nbsp; --------&nbsp; --------&nbsp;&nbsp;&nbsp; -------<br>CCS_GEDAIPC_50 00004.05062&nbsp;&nbsp;&nbsp;&nbsp; 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; simple<br>(3) 结果说明:<br>列号&nbsp;&nbsp;&nbsp; 描述<br>1. Prog Name :队列连接的服务的可执行文件名<br>2. Queue Name :字符队列名，是RQADDR参数或一个随机值<br>3. #Serve :连接的服务数<br>4. Wk Queued :当前队列的所有请求的参数和<br>5. #Queued :实际请求数<br>6. Ave.Len :平均队列长度<br>7. Machine :队列所在机器的LMID<br>4查看客户端信息pclt<br>(1) 命令: printclient 简写:pclt<br>-m machine 显示LMID号为machine上的客户端连接<br>-u username 显示用户名为username 的客户端连接<br>-c ctlname 显示用户进程为ctlname的客户端连接<br>(2) 结果示例:<br>&nbsp; LMID&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; User Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Client Name&nbsp;&nbsp;&nbsp; Time&nbsp;&nbsp;&nbsp; Status&nbsp; Bgn/Cmmt/Abrt<br>---------- --------------- --------------- -------- ------- -------------<br>simple&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ccsmis&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WSH&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 17:42:47&nbsp;&nbsp; IDLE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0/0/0<br>simple&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ccsmis&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tmadmin&nbsp;&nbsp;&nbsp; 0:44:28&nbsp;&nbsp;&nbsp; IDLE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0/0/0<br>(3) 结果说明:<br>列号&nbsp; 描述<br>1. 已经登录的客户端机器的LMID<br>2. 用户名，由tpinit()提供的<br>3. 客户端名，由tpinit()提供的<br>4. 客户端连接后经过的时间<br>5. 客户端状态<br>6. IDLE——表示客户端目前没有任何交易在<a onclick="javascript:tagshow(event, '%B9%A4%D7%F7');" href="javascript:;" target=_self><u><strong><font color=#000066>工作</font></strong></u></a><br>7. IDLET——表示客户端启动了一个交易<br>8. BUSY——表示客户端在工作中<br>9. BUSYT——表示客户端正在交易控制下工作<br>10. 启动/提交/中断的交易数</p>
<p>5查看部分统计信息bbs<br>(4) 命令: bbstats&nbsp; 简写：bbs<br>&gt; bbs<br>Current Bulletin Board Status:<br>Current number of servers: 335<br>Current number of services: 2324<br>Current number of request queues: 27<br>Current number of server groups: 11<br>Current number of interfaces: 0</p>
<p>6观察某个节点的进程信息default<br>(5) 命令：default &#8211;m<br>&gt; default -m SITE13</p>
<p>SITE13&gt; psr<br>Prog Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Queue Name&nbsp; Grp Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ID RqDone Load Done Current Service<br>---------&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ----------&nbsp; --------&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- ------ --------- ---------------<br>BBL&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 30004.00000 SITE13&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp; 22827&nbsp;&nbsp; 1141350 ..ADJUNCTBB<br>BRIDGE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 836437&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SITE13&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0 (&nbsp; IDLE )<br>GWADM&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 00021.00019 BGWGRP1+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 19&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0 (&nbsp; IDLE )<br>GWTDOMAIN&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 00021.00020 BGWGRP1+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 20 123826&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0<br>GWADM&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 00022.00021 BGWGRP2+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 21&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0 (&nbsp; IDLE )<br>GWTDOMAIN&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 00022.00022 BGWGRP2+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 22&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0 (&nbsp; IDLE )<br>GWADM&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 00025.00027 GWGRP1_+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 27&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 200 (&nbsp; IDLE )</p>
<p>7查看消息发送状态pnw<br>(6) 命令：printnetwork 简写 pnw<br>&gt; pnw SITE12</p>
<p>SITE12&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Connected To:&nbsp; msgs sent&nbsp;&nbsp;&nbsp; msgs received<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SITE14&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 61904&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 62319<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SITE13&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 61890&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 62288<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SITE11&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 15972&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 13564<br>8退出管理模式q<br>(7) 命令: quit&nbsp; 简写：q<br></p>
<br>
<img src ="http://www.cppblog.com/prayer/aggbug/105574.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/prayer/" target="_blank">Prayer</a> 2010-01-13 15:44 <a href="http://www.cppblog.com/prayer/archive/2010/01/13/105574.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>tuxedo中间件不能启动异常故障解决方法</title><link>http://www.cppblog.com/prayer/archive/2009/01/21/72413.html</link><dc:creator>Prayer</dc:creator><author>Prayer</author><pubDate>Wed, 21 Jan 2009 04:44:00 GMT</pubDate><guid>http://www.cppblog.com/prayer/archive/2009/01/21/72413.html</guid><wfw:comment>http://www.cppblog.com/prayer/comments/72413.html</wfw:comment><comments>http://www.cppblog.com/prayer/archive/2009/01/21/72413.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/prayer/comments/commentRss/72413.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/prayer/services/trackbacks/72413.html</trackback:ping><description><![CDATA[<div class=articleContent id=articleBody>
<div>&nbsp;<wbr>早晨前台报告不能登陆了，后发现中间件不能正常tmshutdown,错误信息如下：</div>
<div>
<p><font style="BACKGROUND-COLOR: #ffffff" face=宋体>$ tmshutdown -y<br>Shutting down all admin and server processes in /home/billklmy/cfg/tuxconfig</font></p>
<p><font style="BACKGROUND-COLOR: #ffffff" face=宋体>tmshutdown: internal error: CMDTUX_CAT:764: ERROR: can't attach to BB<br></font></p>
</div>
<div>&nbsp;<wbr></div>
<div><font style="BACKGROUND-COLOR: #ffffff" face=宋体>解决办法：执行<font style="BACKGROUND-COLOR: #ffffff" face=宋体>ipcs -qms |&nbsp;<wbr> grep billklmy | grep -v 'grep' |&nbsp;<wbr> awk '{ print "ipcrm -"$1" "$2}' |sh</font></font></div>
<div>然后再tmboot -y即可了。</div>
<div>&nbsp;<wbr></div>
<div>厂方解释原因是执行了大的报表查询程序导致的，很少出现。</div>
</div>
<img src ="http://www.cppblog.com/prayer/aggbug/72413.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/prayer/" target="_blank">Prayer</a> 2009-01-21 12:44 <a href="http://www.cppblog.com/prayer/archive/2009/01/21/72413.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Tuxedo基本命令</title><link>http://www.cppblog.com/prayer/archive/2008/12/15/69470.html</link><dc:creator>Prayer</dc:creator><author>Prayer</author><pubDate>Mon, 15 Dec 2008 02:09:00 GMT</pubDate><guid>http://www.cppblog.com/prayer/archive/2008/12/15/69470.html</guid><wfw:comment>http://www.cppblog.com/prayer/comments/69470.html</wfw:comment><comments>http://www.cppblog.com/prayer/archive/2008/12/15/69470.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/prayer/comments/commentRss/69470.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/prayer/services/trackbacks/69470.html</trackback:ping><description><![CDATA[<div><font color=#660000>#1.设置环境变量TUXDIR,APPDIR,TUXCONFIG，LANG(跟OS相关),LD_LIBRARY_PATH(跟OS相关)<br>#2.编译ubb文本生成二进制配置文件：tmloadcf &#8211;y ubbconfig<br>#3.所有机器上运行tlisten,具体见文档中NETWORK一节<br>#4.启动tmboot &#8211;y<br>#5.关闭tmshutdown &#8211;y<br>参数：<br>-A在所有机器上启动/关闭管理的Server进程<br>-M只在MASTER机器上启动/关闭管理的Server进程<br>-isrvid &nbsp;启动/关闭某个server id指定的Server进程<br>-ggrpname启动/关闭某个server group名字指定的Server Group<br>-S启动/关闭所有应用服务器（LMID）<br>-sserver-name 启动/关闭某个server名字指定的Server进程<br>-llmid option 在指定的机器上启动/关闭所有TMS进程和应用服务器（LMID）<br>-Tgrpname 启动/关闭指定的server group中所有的TMS进程<br>-Blmid 在指定的机器上启动/关闭BBL进程<br>-ecommand 指定一个程序可以当在MASTER机器上启动任何一个进程失败时执行<br>-c计算出当前UBB配置的Tuxedo启动最少要占用的系统IPC资源</font></div>
<div><font color=#660000>#用tmunloadcf &gt; generated.ubb 可以得出目前配置得UBB文件所有得参数值（没有设置的有缺省值）<br>#用tmloadcf &#8211;c或tmboot &#8211;c可以计算出当前UBB配置的Tuxedo启动最少要占用的系统IPC资源。</font></div>
<img src ="http://www.cppblog.com/prayer/aggbug/69470.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/prayer/" target="_blank">Prayer</a> 2008-12-15 10:09 <a href="http://www.cppblog.com/prayer/archive/2008/12/15/69470.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>server端ATMI </title><link>http://www.cppblog.com/prayer/archive/2008/12/11/69171.html</link><dc:creator>Prayer</dc:creator><author>Prayer</author><pubDate>Thu, 11 Dec 2008 07:48:00 GMT</pubDate><guid>http://www.cppblog.com/prayer/archive/2008/12/11/69171.html</guid><wfw:comment>http://www.cppblog.com/prayer/comments/69171.html</wfw:comment><comments>http://www.cppblog.com/prayer/archive/2008/12/11/69171.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/prayer/comments/commentRss/69171.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/prayer/services/trackbacks/69171.html</trackback:ping><description><![CDATA[<font size=2>索引：<br>1.TPSVCINFO<br>2.buffer管理<br>3.server的client角色<br>4.tpadvertise<br>5.tpunadvertise<br>6.tpreturn<br>7.tpforward<br>8.</font><a name=baidusnap1></a><font size=2><strong style="COLOR: black; BACKGROUND-COLOR: #a0ffff">tpsvrinit</strong>/tpsvrdone<br><br>--------------------------------------------------------------------------------</font><br><font size=2>在server端<strong style="COLOR: black; BACKGROUND-COLOR: #ffff66">tuxedo</strong>本身提供了一个标准的main()函数，它负责完成一些必要的工作。server端编程只需要编写service处理函数，进行service的请求处理和回应处理。所以，在server端不需要调用tpinit()和tpterm()。</font><br><br><br><font size=2>1.TPSVCINFO<br>每个service函数都有统一的形式：<br>void tpservice (TPSVCINFO *svcinfo);</font><br><font size=2>只有一个参数，该参数是指向TPSVCINFO结构的指针（atmi.h）。该结构定义如下：<br>struct tpsvcinfo {<br>&nbsp; char name[32]; /*service名（最大15个字符）*/<br>&nbsp; long flags; /* client调用时指定的flags */<br>&nbsp; char *data; /* 接收的数据地址 */<br>&nbsp; long len; /* 数据长度 */<br>&nbsp; int cd; /* 会话方式下的连接描述符 */<br>&nbsp; long appkey; /* 应用认证的key */<br>&nbsp; CLIENTID cltid; /* client ID */<br>};</font><br><br><font size=2>--------------------------------------------------------------------------------</font><br><font size=2>2.buffer管理<br>在service函数里，一样可以调用tpalloc()、tpfree()、tprealloc()处理自定义的buffer。</font><br><font size=2>通过TPSVCINFO参数传递的buffer是使用tpalloc()分配的，所以可以对它使用tprealloc()。</font><br><br><font size=2>要注意的是在service函数里自己调用tpalloc()分配的空间在退出要释放，除非该空间作为tpreturn()或tpforward()的参数。如果分配的空间不释放，最终会耗尽该server的内存资源。</font><br><br><font size=2>对于TPSVCINFO传递的buffer不用手动释放。</font><br><br><font size=2>使用举例：<br>void<br>BAL (TPSVCINFO* input)<br>{<br>&nbsp; char* f, f1, f2;<br>&nbsp; f=input-&gt;data;<br>&nbsp; f1=tpalloc (&#8220;STRING&#8221;, NULL, 80);<br>&nbsp; f2=tpalloc (&#8220;STRING&#8221;, NULL, 120);<br>&nbsp; . . .<br>&nbsp; tpfree ((char *) f2);<br>&nbsp; tpreturn (TPSUCCESS, 0, f1, 0, 0);<br>}<br>可以使用tptypes()查看buffer的类型。如：<br>void ABAL(TPSVCINFO *transb)<br>{<br>&nbsp; char type[20], subtype[20];<br>&nbsp; long len;<br>&nbsp; len = tptypes(transb-&gt;data, type, subtype);<br>&nbsp; if (len == 0) {<br>&nbsp; &nbsp; /*error*/<br>&nbsp; &nbsp; userlog(&#8220;NULL message sent...\n&#8221;);<br>&nbsp; &nbsp; ...<br>&nbsp; }<br>&nbsp; if (strcmp(type, &#8220;FML&#8221;) == 0) {<br>&nbsp; &nbsp; /* convert FML to aud VIEW; */<br>&nbsp; } else if (strcmp(type, &#8220;VIEW&#8221;) == 0) {<br>&nbsp; &nbsp; if (strcmp(subtype, &#8220;aud&#8221;) != 0) {<br>&nbsp; &nbsp; &nbsp; &nbsp; /*error*/<br>&nbsp; &nbsp; &nbsp; &nbsp; userlog(&#8220;Wrong VIEW subtype...&#8221;);<br>&nbsp; &nbsp; &nbsp; &nbsp; ...<br>&nbsp; &nbsp; }<br>&nbsp; } else {<br>&nbsp; &nbsp; /*error*/<br>&nbsp; &nbsp; userlog(&#8220;Invalid buffer type ...&#8221;);<br>&nbsp; &nbsp; ...<br>&nbsp; }<br>}</font><br><br><font size=2>--------------------------------------------------------------------------------</font><br><font size=2>3.server的client角色<br><strong style="COLOR: black; BACKGROUND-COLOR: #ffff66">tuxedo</strong>的机制允许一个server程序作为client，调用tpcall()去请求别的service服务。这样做可以避免代码的冗余，但效率上会有牺牲。</font><br><font size=2>这样做时有一些情况要注意：</font><br><br><font size=2>如果一个server要把负责返回接收到的buffer，则不要使用这个buffer作为参数来请求别的service服务。可以分配辅助性的buffer来处理，这样做可以避免在tpcall()过程中改变了输入buffer的内容和类型。 <br>一个server不能请求一个只被它本身发布的service。这样做会导致死锁。例外是请求时指定TPNOREPLY标志。 </font><br><font size=2>--------------------------------------------------------------------------------</font><br><font size=2>4.tpadvertise<br>service可以在启动时发布，也可使用tmadmin或使用tpadvertise动态发布。</font><br><font size=2>int tpadvertise (char *svcname, void (*func)(TPSVCINFO *));</font><br><br><font size=2>参数说明：<br>svcname：要发布的service名；<br>func：该service对应的处理函数指针；</font><br><br><font size=2>如果该service用func已经发布，则函数立即成功返回。如果调用server是MSSQ集的一员，则该MQSQ中的所有server都发布这个service。失败时返回-1。</font><br><br><font size=2>出错原因：</font><br><br><font size=2>该service已经用别的函数发布了； <br>超过了最大允许发布的service数量（MAXSERVICES）； <br>参数错误（有为NULL的）； <br>协议错； <br>操作系统错等。 </font><br><font size=2>--------------------------------------------------------------------------------</font><br><font size=2>5.tpunadvertise<br>一个server取消发布一个它已经发布的service。</font><br><font size=2>int tpunadvertise (char *svcname);</font><br><br><font size=2>参数说明：<br>svcname：操作的service名；</font><br><br><font size=2>如果调用server是MSSQ集的一员，则该MQSQ中的所有server都取消发布这个service。失败时返回-1。</font><br><br><font size=2>失败原因：</font><br><br><font size=2>service没有发布； <br>参数错误； <br>协议错等。 </font><br><font size=2>--------------------------------------------------------------------------------</font><br><font size=2>6.tpreturn<br>普通的C函数返回时使用return语句。但在<strong style="COLOR: black; BACKGROUND-COLOR: #ffff66">tuxedo</strong>程序里，不能使用return，必须使用tpreturn()终止当前处理并发送回应给请求端；或者使用tpforward()把请求传递给别的service处理。</font><br><font size=2>void tpreturn(int rval, int rcode, char *data,long len, long flags);</font><br><br><font size=2>参数说明：<br>rval：返回值，决定该service请求是否成功。如三个可选值：</font><br><br><font size=2>TPSUCCESS：成功。tpcall和tpgetrply将返回一个非负值；如果是会话service，则产生TPEV_SVCSUCC事件； <br>TPFAIL：失败。tpcall和tpgetrply将返回-1；tperrno设置为TPESVCFAIL，如果是会话service，则产生TPEV_SVCFAIL事件； <br>TPEXIT：除了TPFAIL的功能外，该server随后将终止，如果配置了重启动，则该server将重新启动。 <br>rcode：应用定义的返回码。service将向client返回该数字，<strong style="COLOR: black; BACKGROUND-COLOR: #ffff66">tuxedo</strong>本身不对其做任何解释，接收端通过全局变量tpurcode得到该值，在成功或失败时该值都会返回；<br>data：返回给client端的数据buffer；<br>len：返回数据的长度（只CARRAY类型有用）；<br>flags：标志，当前没用。</font><br><font size=2>--------------------------------------------------------------------------------</font><br><font size=2>7.tpforward<br>调用tpforward的server不向client返回数据，而是把更新过的buffer传递给另一个service做更多的处理，由它处理返回client数据等后续的工作。本身则返回到标准的main流程中。</font><br><font size=2>void tpforward(char *service, char *data, long len, long flags);</font><br><br><font size=2>参数说明：<br>service：后续的service的名称；<br>data：指向传递的buffer的指针；<br>len：buffer的长度（只CARRAY有用）；<br>flags：当前没有使用；</font><br><br><font size=2>该函数不能用在会话service中。</font><br><br><font size=2>--------------------------------------------------------------------------------</font><br><font size=2>8.<strong style="COLOR: black; BACKGROUND-COLOR: #a0ffff">tpsvrinit</strong>/tpsvrdone<br>在一个server的实例启动时会调用<strong style="COLOR: black; BACKGROUND-COLOR: #a0ffff">tpsvrinit</strong>()，在结束时会调用tpsvrdown()。如果应用没有定义这两个函数，则使用<strong style="COLOR: black; BACKGROUND-COLOR: #ffff66">tuxedo</strong>提供的缺省函数。</font><br><font size=2>int <strong style="COLOR: black; BACKGROUND-COLOR: #a0ffff">tpsvrinit</strong>(int argc, char **argv);</font><br><br><font size=2>参数说明：形式类似与main函数的参数，函数里可以使用getopt和全局变量optind进行处理，配置文件中的CLOPT命令行选项也传递到该函数。</font><br><br><font size=2>函数成功返回0，失败返回-1。</font><br><br><font size=2>void tpsvrdone();</font><br>
<img src ="http://www.cppblog.com/prayer/aggbug/69171.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/prayer/" target="_blank">Prayer</a> 2008-12-11 15:48 <a href="http://www.cppblog.com/prayer/archive/2008/12/11/69171.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>基于tuxedo中间件架构的应用研究</title><link>http://www.cppblog.com/prayer/archive/2008/12/11/69170.html</link><dc:creator>Prayer</dc:creator><author>Prayer</author><pubDate>Thu, 11 Dec 2008 07:46:00 GMT</pubDate><guid>http://www.cppblog.com/prayer/archive/2008/12/11/69170.html</guid><wfw:comment>http://www.cppblog.com/prayer/comments/69170.html</wfw:comment><comments>http://www.cppblog.com/prayer/archive/2008/12/11/69170.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.cppblog.com/prayer/comments/commentRss/69170.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/prayer/services/trackbacks/69170.html</trackback:ping><description><![CDATA[<strong>&nbsp;摘&nbsp; 要</strong>&nbsp; 本文<a href="http://bbs.studa.com/"><u><font color=#333333>研究</font></u></a>了中间件产品BEA Tuxedo（Transaction for UNIX has been Extended for Distributed Operation）的特点和优势。并结合具体的例子研究了BEA Tuxedo的客服程序、服务程序的实现，以及BEA Tuxedo的通信方式。
<div><strong>&nbsp;&nbsp;&nbsp; 关键词</strong>&nbsp; BEA Tuxedo、中间件</div>
<div>&nbsp;</div>
<div align=left><strong>引 言 </strong></div>
<div align=left>&nbsp;&nbsp;&nbsp; 中间件(Middleware)是近年来迅速<a href="http://www.studa.net/fazhan/"><u><font color=#333333>发展</font></u></a>、壮大起来的一个软件领域。在系统<a href="http://soft.studa.com/"><u><font color=#333333>应用</font></u></a>的层次信息结构中，他处于操作系统和用户应用之间。对应用程序来说，其主要作用是屏蔽操作系统的异构和实现稳定安全的支撑环境，以便于不同系统间的信息交换。开发人员编程时可以利用中间件产品提供的跨平台的、统一的接口，来规避操作系统的差异。这在提高应用程序的可移植性的同时也缩短了应用开发的周期。</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;中间件用以提供客户机与服务器之间的连接服务，这些服务具有标准的程序接口和协议。针对不同的操作系统和硬件平台，中间件能提供符合接口和协议规范的多种实现方式。由于标准接口对于可移植性和标准协议对于互操作性的重要性，中间件已成为许多标准化工作的主要部分。</div>
<div>&nbsp;&nbsp;&nbsp; 中间件是一种独立的系统软件或服务程序，分布式应用软件借助这种软件在不同的技术之间共享资源。中间件系统管理着客户端程序和数据库或者早期应用软件之间的通讯。而且中间件在分布式的客户和服务之间扮演着承上启下的角色，如事务管理、负载均衡以及基于Web的<a href="http://www.studa.net/pc/"><u><font color=#333333>计算</font></u></a>等。</div>
<div align=left><strong>1</strong><strong>&nbsp; 主要中间件的分类</strong><strong></strong></div>
<div>&nbsp;&nbsp;&nbsp;&nbsp; 中间件包括的范围十分广泛，针对不同的需求涌现出多种各具特色的中间件产品。由于中间件需要屏蔽分布环境中异构的操作系统和<a href="http://www.studa.net/network/"><u><font color=#333333>网络</font></u></a>协议，它必须能够提供分布环境下的通讯服务，我们将这种通讯服务称之为平台。基于目的和实现机制的不同，我们将平台分为以下主要几类：</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ⑴&nbsp;&nbsp;远程过程调用（Remote Procedure Call）</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ⑵&nbsp;&nbsp;面向消息的中间件（Message-Oriented Middleware）</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ⑶&nbsp;&nbsp;对象请求代理（Object Request Brokers）</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 平台可向上提供不同形式的通讯服务，包括同步、排队、订阅发布、广播等等。在这些基本的通讯平台之上，可构筑各种框架，为应用程序提供不同领域内的服务，如事务处理监控器、分布数据访问、对象事务管理器OTM等。平台为上层应用屏蔽了异构操作系统的差异，而其上的框架又定义了相应领域内的系统结构、标准的服务组件等。用户只需告诉框架所关心的事件，然后提供处理这些事件的代码，事件发生时，框架调用用户的代码。用户代码不用调用框架，用户程序也不用关心框架结构、执行流程、对系统级API的调用等，所有这些都由框架负责完成。因此，基于中间件开发的应用具有良好的可扩充性、易管理性、高可用性和可移植性。</div>
<div align=left><strong>2</strong><strong> </strong><strong>中间件产品</strong><strong>TUXEDO</strong><strong><a href="http://www.studa.net/"><u><font color=#333333>分析</font></u></a></strong><strong></strong></div>
<div>&nbsp;&nbsp;&nbsp;&nbsp; 中间件产品TUXEDO是Transaction for UNIX has been Extended for Distributed Operation的简称，即被分布式操作扩展之后的UNIX事务系统 。TUXEDO是一个基于消息类型的中间件产品，在1984年由AT&amp;&amp;T的贝尔实验室开发完成的。1995年被BEA公司收购。BEA TUXEDO是在<a href="http://www.studa.net/company/"><u><font color=#333333>企业</font></u></a>、Internet 这样的分布式运算环境中开发和管理三层结构的客户/服务器型关键任务应用系统的强有力工具。它具备分布式事务处理和应用通信功能，并提供完善的各种服务来建立、运行和管理关键任务应用系统。开发人员能够用它建立跨多个硬件平台、数据库和操作系统的可互操作的应用系统。 TUXEDO中间件的工作原理如图一所示：</div>
<div>Client向System/T发出查询请求，以找到Server消息队列的地址；</div>
<div>Client根据找到的入口地址将请求发送到Server的消息队列中；</div>
<div align=center><img src="http://www.studa.net/Newspic/200852/1552197897.jpg" border=0><br clear=all>图1&nbsp; tuxedo中间件工作原理</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Server处理请求，并将结果返回给Client的消息队列。 System/T是Tuxedo系统的核心，它实现了Tuxedo的所有功能和特征，如C/S数据流管理、服务请求的负载均衡、全局事务管理以保证交易的完整性、同步/异步服务请求、两阶段提交以确保消息的发送等。System/T提供了一个类似公告栏的服务，用以发布C/S计算机环境中所有服务器、服务和客户机的信息，供其它分布式计算的参与者使用。</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 中间件产品TUXEDO的特点<sup>[1]</sup>：</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ⑴ 分布式交易管理：BEA Tuxedo使客户机和服务器可参与涉及多个数据库协调更新的分布式交易。并确保所有数据库的正确更新或恢复到初始状态，从而在任何组件出现故障时均能保证数据的完整性；</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ⑵ 高可用性：BEA Tuxedo的一个主要性能是保证对系统组件进行持续的监视，查看应用系统、交易、网络及硬件是否出现故障。一旦出现故障，BEA Tuxedo会从逻辑上把故障组件从系统中排除，管理必要的恢复程序并重新为消息和交易选择路由，以使系统继续运行。对于最终用户而言，所有这些都是完全透明的，且不需要中断服务；</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ⑶ 动态负载均衡：BEA Tuxedo可以根据系统的负载指示，自动开启和关闭应用服务，以满足对应用系统的高强度使用需求。同时还可以均衡所有可用系统的负载，以确保无论服务是在同一个节点还是分布在节点之间系统都能被平均使用资源，达到负载均衡；</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ⑷ 数据依赖路由(DDR)：BEA Tuxedo可按照消息的传输的关键路由信息来选择消息路由。这样就能够实现交易的高效处理，并发挥最佳性能；</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ⑸ 安全性：BEA Tuxedo支持加密(LLE安全机制)，当跨网络部署BEA Tuxedo应用系统时，这些安全性机制可确保用户数据的保密性。Tuxedo还提供了插件程序机制，支持公共密钥和数字签名，以及连接应用系统的非BEA安全产品，保证了系统的安全性。</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ⑹ 应用系统并行化：BEA Tuxedo通过动态复制整个网络中的分布式应用系统，可使<a href="http://www.studa.net/dianzijixie/"><u><font color=#333333>电子</font></u></a>商务应用系统发挥最佳性能。同时Tuxedo允许应用系统并行处理请求，并发处理位于不同分布式节点上的业务请求，提高开发效率。</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ⑺ 提供Application To Transaction Manager Interface—ATMI：BEA TUXEDO提供的 ATMI支持为50多种硬件平台和操作系统提供了一致的应用编程接口。ATMI让开发人员不用考虑程序所在的硬件环境，直接编写BEA Tuxedo应用系统。</div>
<div align=left><strong>3</strong><strong> </strong><strong>中间件产品</strong><strong>TUXEDO</strong><strong>开发</strong><strong></strong></div>
<div>&nbsp;&nbsp;&nbsp;&nbsp; TUXEDO应用开发主要包括到客户端程序、服务端程序的开发。BEA Tuxedo提供了一个其于C语言的编程接口，即应用程序事务监控接口ATMI，以便用于开发客户程序和服务程序。除了C语言接口外，BEA Tuxedo还提供</div>
了COBOL接口。在Bea Tuxedo系统中的客户端到服务端的通信过程都是通过类型缓冲区来完成的，Bea Tuxedo系统提供了大量的类型缓冲区来供使用。所有类型缓冲区都必须通过Bea Tuxedo的tpalloc(), tprealloc(), tpfree()这些公共ATMI来分配回收<sup>[2]</sup>。
<div>3.1 创建BEA TUXEDO客户端程序</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 客户程序一般执行如下任务：</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ⑴ 调用tpchkauth()决定加入一个<a href="http://soft.studa.com/"><font color=#333333>应用</font></a>程序所需的安全级别。可能出现的响应包括：没有安全级别，应用程序口令，应用程序授权，访问控制列表，连接级加密，公钥加密，审计。这些可以根据你的需求进行选择；</div>
<div align=left>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ⑵ 调用tpinit()来连接到一个BEA Tuxedo应用程序，所需的安全信息作为tpinit()的参数传给了应用程序；</div>
<div align=left>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ⑶ 执行服务请求；</div>
<div align=left><br clear=all>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ⑷ 调用tpterm()来断开和BEA Tuxedo应用程序的连接。</div>
<div>客户端程序调用流程如图2所示：</div>
<div align=center><img src="http://www.studa.net/Newspic/200852/1552207057.jpg" border=0></div>
<div align=center>图2&nbsp; 创建BEA TUXEDO客户端程序</div>
<div>3.2 创建BEA TUXEDO服务端程序</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;服务程序一般执行如下任务：</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ⑴ 在BEA Tuxedo服务程序启动时，执行tpsvrinit()函数，可以在里面打开一些如数据库之类的资源供以后使用；</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ⑵ 在BEA Tuxedo服务程序关闭时，执行tpsvrdown()函数，可以在里面关闭tpsvrinit()中打开的资料；</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ⑶ BEA Tuxedo服务程序以服务的形式来响应客户程序的请求，客户程序不是通过名字来调用服务程序的，而是调用服务，客户程序不知道处理它请求的服务程序的位置；</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ⑷ 服务程序调用tpreturn()函数来结束服务请求，并返回一个缓冲区，必要时，将它传给客户程序；</div>
<div><br clear=all>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 服务端程序调用流程如图3所示：</div>
<div align=center><img src="http://www.studa.net/Newspic/200852/1552209129.jpg" border=0></div>
<div align=center>图3 创建BEA TUXEDO服务端程序</div>
<div align=left><strong>4</strong><strong> </strong><strong>BEA TUXEDO</strong><strong>通讯缓冲区：</strong><strong></strong></div>
<div>&nbsp;&nbsp;&nbsp;&nbsp; TUXEDO之间通过统一定义的类型缓冲区进行通讯，类型缓冲区可以使应用跨越不同<a href="http://www.studa.net/network/"><font color=#333333>网络</font></a>、不同协议、不同CPU构架以及不同操作系统之间得到统一的处理，这就使得开发者在分布式<a href="http://www.studa.net/pc/"><font color=#333333>计算</font></a>环境中有效地避开了异构网络和异构计算机系统带来的差异，只需进行商业逻辑的开发上。通讯缓冲区结构如图4所示：</div>
<div align=center><img src="http://www.studa.net/Newspic/200852/1552213636.jpg" border=0><br clear=all>图4&nbsp; TUXEDO通讯缓冲区</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp; BEA TUXEDO提供以下几种通讯方式<sup>[3]</sup>：</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp; ⑴&nbsp;同步请求/应答通信</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp; ⑵&nbsp;异步请求/应答通信</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp; ⑶&nbsp;嵌套调用通信</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp; ⑷&nbsp;转发调用通信</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp; ⑸&nbsp;会话通信</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp; ⑹&nbsp;消息通告通信</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp; ⑺&nbsp;基于事件通信</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp; ⑻&nbsp;队列通信</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp; ⑼&nbsp;事务控制通信</div>
<div align=left><strong>5&nbsp; </strong><strong>结束语：</strong><strong></strong></div>
<div>&nbsp;&nbsp;&nbsp;&nbsp; 随着系统的规模不断<a href="http://www.studa.net/fazhan/"><font color=#333333>发展</font></a>，对系统进行有效分布式处理，提高资源利用率的要求越来越高，因此从客户/数据库方案转变到三层客户/应用系统/数据服务器结构是业界发展的趋势。本文讨论了主要中间件架构的优势，并<a href="http://www.studa.net/"><font color=#333333>分析</font></a>了中间件产品BEA TUXEDO的开发模式和特点。分析BEA TUXEDO常见的通讯方式，包括同步请求/应答通信、异步请求/应答通信、嵌套调用通信、转发调用通信、会话通信、消息通告通信、基于事件通信、队列通信、事务控制通信的方式，并结合通讯方式分析了TUXEDO的客服程序和服务程序伪代码和部分ATMI函数。</div>
<div>&nbsp;</div>
<div><strong><a href="http://book.studa.com/"><font color=#333333>参考</font></a><a href="http://book.studa.com/"><font color=#333333>文献</font></a>：</strong></div>
<div>1 BEA Tuxedo 8.0 Documentation for the e-generation e-docs.bea.com</div>
<div>2 徐春金. TUXEDO中间件开发与配置[M]. <a href="http://www.studa.net/china/"><font color=#333333>中国</font></a>电力出版社</div>
<div>3 Chris Britton. IT体系结构与中间件——建设大型集成系统的策略[M]. 人民邮电出版社</div>
<img src ="http://www.cppblog.com/prayer/aggbug/69170.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/prayer/" target="_blank">Prayer</a> 2008-12-11 15:46 <a href="http://www.cppblog.com/prayer/archive/2008/12/11/69170.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>BCB 客户端 tuxedo 开发实例 </title><link>http://www.cppblog.com/prayer/archive/2008/12/11/69167.html</link><dc:creator>Prayer</dc:creator><author>Prayer</author><pubDate>Thu, 11 Dec 2008 07:07:00 GMT</pubDate><guid>http://www.cppblog.com/prayer/archive/2008/12/11/69167.html</guid><wfw:comment>http://www.cppblog.com/prayer/comments/69167.html</wfw:comment><comments>http://www.cppblog.com/prayer/archive/2008/12/11/69167.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/prayer/comments/commentRss/69167.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/prayer/services/trackbacks/69167.html</trackback:ping><description><![CDATA[&nbsp;
<p><span id=ArticleTitle1_ArticleTitle1_lblTitle><strong>BCB 客户端 tuxedo 开发实例<br>-supermgr</strong></span></p>
<p><span>在BCB中怎样使用tuxedo呢？</span></p>
<p><span>本文给出了一个例子。</span></p>
<p><span>然而，这个例子在后来被证明还是有点问题的，</span></p>
<p><span>就是在tpcall调用后，无法释放dll，而且会出错。</span></p>
<p><span>这一问题咨询过tuxedo，多少年过去了，我还没有</span></p>
<p><span>得到问题的解。</span></p>
<p><span></span>&nbsp;</p>
<p>tuxedo 的函数很多，所有应用都使用其中子集。这些函数子集包含在开发</p>
<p>包中一定的动态库中。下面以</p>
<p>tpinit,tpcall,tpterm,tpfree,tpalloc,Fget32,Fchg32,FLDOCC32 几个函数为</p>
<p>例介绍一下在该子集下的编程方式。（不是很准哟）</p>
<p>1、首先 找到这些函数所在的动态库。经过解析发现以上函数包含&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </p>
<p>&nbsp;&nbsp;&nbsp; 在wtuxws32.dll，libfml32.dll 两个动态库中。多好，有了这两个动</p>
<p>&nbsp;&nbsp; 态库，应用程序发行时，带上他们就可以了。再也不会出现 操作系统弹出</p>
<p>&nbsp;&nbsp; 的动态库定位错误了。 且慢，后经研究发现，光有这两个dll不行，他们</p>
<p>&nbsp;&nbsp; 的运行还需如下6个dll：libbuft.dll，libengine.dll，libfml.dll，<br>&nbsp; <br>&nbsp;&nbsp; libgpnet.dll，libtux.dll，libwsc.dll。 哈哈。总算解析完了。</p>
<p>&nbsp;&nbsp; 好，把这些文件copy出来到自己的工程目录下。多棒。赶紧进入下一步。</p>
<p>2、配置编译环境。这很重要。为使大家编程方便，我们做些小动作。在</p>
<p>&nbsp;&nbsp; BCB 的安装目录下（即$(BCB)标识的目录）建立tuxedo\目录，将</p>
<p>&nbsp;&nbsp; tuxedo开发包中的 \bin\,\include\,\lib\几个目录拷贝到该目录下。<br>&nbsp;&nbsp; <br>&nbsp;&nbsp; 然后，在Option|Directories/Conditionals中设置<br>&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; Include Path :&nbsp;&nbsp; $(BCB)\Tuxedo\include<br>&nbsp;&nbsp;&nbsp; Library Path :&nbsp;&nbsp; $(BCB)\Tuxedo\lib<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; 好了，环境设置好了。在你的工程中include :<br>&nbsp;&nbsp;&nbsp; #include &lt;atmi.h&gt;<br>&nbsp;&nbsp;&nbsp; #include &lt;fml32.h&gt;<br>&nbsp;&nbsp;&nbsp; #include &lt;tmenv.h&gt;<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; 哦，他们三个文件实在太重要了，不包含进来你会后悔的:)<br>&nbsp;&nbsp;&nbsp; <br>3、建立一个tuxedo子集函数结构。为什么这样做呢，直接使用tuxedo函数</p>
<p>&nbsp;&nbsp; 不好吗？ 这没什么的，依个人编程环境而定。我习惯于在结构名下<br>&nbsp;&nbsp; <br>&nbsp;&nbsp; 使用这些 外来开发包中的函数，因为你对他们不是很熟，有时会遗忘<br>&nbsp;&nbsp; <br>&nbsp;&nbsp; 其名称，将其放在结构中，利用BCB自动提示功能，你就可以很容易<br>&nbsp;&nbsp; <br>&nbsp;&nbsp; 找到（想起）需要的函数了。我定义的结构如下：<br>&nbsp;&nbsp; <br>&nbsp;typedef <br>&nbsp;struct _FunTuxedo<br>&nbsp;{ <br>&nbsp;<br>&nbsp;&nbsp;int<br>&nbsp;&nbsp;(_TMDLLENTRY *<br>&nbsp;&nbsp;tpcall)(char _TM_FAR *,<br>&nbsp;&nbsp;&nbsp;char _TM_FAR *, <br>&nbsp;&nbsp;&nbsp;long , <br>&nbsp;&nbsp;&nbsp;char _TM_FAR * _TM_FAR *,<br>&nbsp;&nbsp;&nbsp;long _TM_FAR *,<br>&nbsp;&nbsp;&nbsp;long );<br>&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;int<br>&nbsp;&nbsp;(_TMDLLENTRY *<br>&nbsp;&nbsp;tpinit)(TPINIT _TM_FAR *);<br>&nbsp;&nbsp;<br>&nbsp;&nbsp;int<br>&nbsp;&nbsp;(_TMDLLENTRY *<br>&nbsp;&nbsp;tpterm)(void);<br>&nbsp;&nbsp;void<br>&nbsp;&nbsp;(_TMDLLENTRY *<br>&nbsp;&nbsp;tpfree)(char _TM_FAR *);<br>&nbsp;&nbsp;<br>&nbsp;&nbsp;char *<br>&nbsp;&nbsp;(_TMDLLENTRY *<br>&nbsp;&nbsp;tpalloc)(char _TM_FAR *,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; char _TM_FAR *,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; long);<br>&nbsp;&nbsp;<br>&nbsp;&nbsp;int<br>&nbsp;&nbsp;(_TMDLLENTRY *<br>&nbsp;&nbsp;Fget32)(FBFR32 _TM_FAR *,<br>&nbsp;&nbsp;&nbsp;&nbsp; FLDID32, <br>&nbsp;&nbsp;&nbsp;&nbsp; FLDOCC32,<br>&nbsp;&nbsp;&nbsp;&nbsp; char _TM_FAR *,<br>&nbsp;&nbsp;&nbsp;&nbsp; FLDLEN32 _TM_FAR *);<br>&nbsp;&nbsp;<br>&nbsp;&nbsp;<br>&nbsp;&nbsp;int<br>&nbsp;&nbsp;(_TMDLLENTRY *<br>&nbsp;&nbsp;Fchg32)(FBFR32 _TM_FAR *, <br>&nbsp;&nbsp;&nbsp;&nbsp; FLDID32, <br>&nbsp;&nbsp;&nbsp;&nbsp; FLDOCC32,<br>&nbsp;&nbsp;&nbsp;&nbsp; char _TM_FAR *, <br>&nbsp;&nbsp;&nbsp;&nbsp; FLDLEN32);<br>&nbsp;&nbsp;FLDOCC32 <br>&nbsp;&nbsp;(_TMDLLENTRY *<br>&nbsp;&nbsp;Foccur32)( FBFR32 _TM_FAR *, <br>&nbsp;&nbsp;&nbsp;&nbsp;FLDID32);<br>&nbsp;&nbsp;<br>&nbsp;&nbsp;HMODULE hLibfml32;&nbsp;// libfml32.dll 动态库句柄<br>&nbsp;&nbsp;HMODULE hWtuxws32;&nbsp;// wtuxws32.dll 动态库句柄<br>&nbsp;<br>&nbsp;}FUNTUXEDO,*PFUNTUXEDO;<br>&nbsp;<br>&nbsp;&nbsp;&nbsp; 这里，我将两个动态库句柄加入到了结构中，是因为我打算动态使用<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp; tuxedo中间件。方便我释放他们。，下一节介绍装载/释放他们<br>&nbsp;&nbsp; <br>4 装载、释放中间件(基于FUNTUXEDO结构)</p>
<p>&nbsp;&nbsp; 哈，这很容易，主要用到LoadLibrary,FreeLibrary,GetProcAddress<br>&nbsp;&nbsp; <br>&nbsp;&nbsp; 三个函数。装载代码如下：<br>&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; PFUNTUXEDO pFun;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;<br>&nbsp;&nbsp;&nbsp; //Loading Fchg32, Fget32 by LIBFML32.DLL<br>&nbsp;&nbsp;&nbsp; pFun-&gt;hLibfml32 = LoadLibrary(libfml32.dll);<br>&nbsp;&nbsp;&nbsp; if (pFun-&gt;hLibfml32 == NULL)<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;return -1;<br>&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; (FARPROC &amp;)pFun-&gt;Fchg32<br>&nbsp;&nbsp;&nbsp; &nbsp;=(FARPROC)GetProcAddress(pFun-&gt;hLibfml32,Fchg32);<br>&nbsp;&nbsp;&nbsp; (FARPROC &amp;)pFun-&gt;Fget32<br>&nbsp;&nbsp;&nbsp; &nbsp;=(FARPROC)GetProcAddress(pFun-&gt;hLibfml32,Fget32);<br>&nbsp;(FARPROC &amp;)pFun-&gt;Foccur32<br>&nbsp;&nbsp;&nbsp; &nbsp;=(FARPROC)GetProcAddress(pFun-&gt;hLibfml32,Foccur32);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; if (pFun-&gt;Fchg32 == NULL || pFun-&gt;Fget32 == NULL || pFun-&gt;Foccur32 == NULL)<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;FreeLibrary(pFun-&gt;hLibfml32);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pFun-&gt;hLibfml32 = NULL;<br>&nbsp;&nbsp;&nbsp; &nbsp;return -2;<br>&nbsp;&nbsp;&nbsp; }<br>&nbsp;//Loading tpacall, tpalloc, tpfree, tpinit, tpterm by WTUXWS32.DLL<br>&nbsp;pFun-&gt;hWtuxws32 = LoadLibrary(wtuxws32.dll);<br>&nbsp;&nbsp;&nbsp; if (pFun-&gt;hWtuxws32 == NULL)<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;FreeLibrary(pFun-&gt;hLibfml32);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pFun-&gt;hLibfml32 = NULL;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; &nbsp;return -3;<br>&nbsp;&nbsp;&nbsp; }&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; (FARPROC &amp;)pFun-&gt;tpcall<br>&nbsp;&nbsp;&nbsp; &nbsp;=(FARPROC)GetProcAddress(pFun-&gt;hWtuxws32,tpacall);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; (FARPROC &amp;)pFun-&gt;tpalloc<br>&nbsp;&nbsp;&nbsp; &nbsp;=(FARPROC)GetProcAddress(pFun-&gt;hWtuxws32,tpalloc); <br>&nbsp;&nbsp;&nbsp; (FARPROC &amp;)pFun-&gt;tpfree<br>&nbsp;&nbsp;&nbsp; &nbsp;=(FARPROC)GetProcAddress(pFun-&gt;hWtuxws32,tpfree); <br>&nbsp;&nbsp;&nbsp; (FARPROC &amp;)pFun-&gt;tpinit<br>&nbsp;&nbsp;&nbsp; &nbsp;=(FARPROC)GetProcAddress(pFun-&gt;hWtuxws32,tpinit); <br>&nbsp;&nbsp;&nbsp; (FARPROC &amp;)pFun-&gt;tpterm<br>&nbsp;&nbsp;&nbsp; &nbsp;=(FARPROC)GetProcAddress(pFun-&gt;hWtuxws32,tpterm);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; if (pFun-&gt;tpcall == NULL || pFun-&gt;tpalloc == NULL ||<br>&nbsp;&nbsp;&nbsp; &nbsp;pFun-&gt;tpfree == NULL || pFun-&gt;tpinit&nbsp; == NULL ||<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pFun-&gt;tpterm == NULL)<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;FreeLibrary(pFun-&gt;hLibfml32);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pFun-&gt;hLibfml32 = NULL;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FreeLibrary(pFun-&gt;hWtuxws32);<br>&nbsp;pFun-&gt;hWtuxws32 = NULL;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return -4;<br>&nbsp;&nbsp;&nbsp; }&nbsp;&nbsp; &nbsp;<br>&nbsp;&nbsp; <br>&nbsp;&nbsp; 释放时很简单，只需<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;FreeLibrary(pFun-&gt;hLibfml32);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FreeLibrary(pFun-&gt;hWtuxws32);<br>&nbsp;&nbsp; 即可。</p>
<p>(注：传统情况下，FreeLibrary(DllHandle) 是不会出问题的。但在</p>
<p>BEA 公司 的 这些dll面前，ms 的 FreeLibrary 就不行了，当应用程序</p>
<p>退出时，会有非法地址访问的问题。我检查过数次，只要一经调用tpcall</p>
<p>，退出时就会有问题。)</p>
<p>&nbsp;&nbsp;折衷的办法是 使用 try-catch，释放时不使用FreeLibrary,</p>
<p>而在应用程序退出时，最后使用 FreeLibraryAndExitThread,否则即使</p>
<p>你使用FreeLibrary 也没法通过 catch 捕捉到异常。呵呵。</p>
<p><br>&nbsp;&nbsp;&nbsp;<br>&nbsp;5、使用。例：...的内容查帮助吧。<br>&nbsp;<br>&nbsp;&nbsp;&nbsp; PFUNTUXEDO pFun;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; char *pSendBuff;<br>&nbsp;&nbsp;&nbsp; char *pRecvBuff;<br>&nbsp;&nbsp;&nbsp; long lRet;<br>&nbsp;&nbsp;&nbsp; short sRet;<br>&nbsp;&nbsp;&nbsp; int iRet;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; //中间件服务<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; pSendBuff = pFun-&gt;tpalloc(...);<br>&nbsp;&nbsp;&nbsp; if (pSendBuff == NULL)<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;return ERR_TUXEDO;<br>&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; pRecvBuff = pFun-&gt;tpalloc(...);<br>&nbsp;&nbsp;&nbsp; if (pRecvBuff == NULL)<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;pFun-&gt;tpfree(pSendBuff);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return ERR_TUXEDO;<br>&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; try<br>&nbsp;&nbsp;&nbsp; {&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; iRet = pFun-&gt;Fchg32(...);<br>&nbsp;&nbsp;&nbsp; if (iRet == -1)<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;throw(1);<br>&nbsp;&nbsp;&nbsp; }&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; //建立连接<br>&nbsp;&nbsp;&nbsp; iRet = pFun-&gt;tpinit(NULL);<br>&nbsp;&nbsp;&nbsp; if (iRet == -1)<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;throw(2);<br>&nbsp;&nbsp;&nbsp; }&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp; iRet = pFun-&gt;tpcall(...); <br>&nbsp;&nbsp;&nbsp; if (iRet == -1)<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;throw(3);<br>&nbsp;&nbsp;&nbsp; }&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; iRet = pFun-&gt;tpterm();<br>&nbsp;&nbsp;&nbsp; if (iRet == -1)<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;throw(4);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<br>&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; iRet =pFun-&gt;Fget32(...);<br>&nbsp;&nbsp;&nbsp; if (iRet == -1)<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;throw(4);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<br>&nbsp;&nbsp;&nbsp; }&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; pFun-&gt;tpfree(pSendBuff); <br>&nbsp;&nbsp;&nbsp; pFun-&gt;tpfree(pRecvBuff);<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; catch(int Err)<br>&nbsp;&nbsp;&nbsp; {&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; &nbsp;pFun-&gt;tpfree(pSendBuff); <br>&nbsp;&nbsp;pFun-&gt;tpfree(pRecvBuff);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return Err;<br>&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; catch(...)<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;return ERR_UNKNOWN;<br>&nbsp;&nbsp;&nbsp; }&nbsp;&nbsp;&nbsp; </p>
<p>&nbsp;&nbsp;&nbsp; //这里可以处理接收到的数据结果<br>&nbsp;&nbsp;&nbsp; //...&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>6、编译。</p>
<p>&nbsp;</p>
<p>注意，<span id=CommnetList1_CommnetList1_rpCommentList__ctl0_lblContent>这里有一个问题。当tpcall后，释放dll时，有一点麻烦。</span> </p>
<p>后来发现的。</p>
<p>2003-7</p>
<img src ="http://www.cppblog.com/prayer/aggbug/69167.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/prayer/" target="_blank">Prayer</a> 2008-12-11 15:07 <a href="http://www.cppblog.com/prayer/archive/2008/12/11/69167.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Tuxedo常用的命令</title><link>http://www.cppblog.com/prayer/archive/2008/12/09/68931.html</link><dc:creator>Prayer</dc:creator><author>Prayer</author><pubDate>Tue, 09 Dec 2008 05:38:00 GMT</pubDate><guid>http://www.cppblog.com/prayer/archive/2008/12/09/68931.html</guid><wfw:comment>http://www.cppblog.com/prayer/comments/68931.html</wfw:comment><comments>http://www.cppblog.com/prayer/archive/2008/12/09/68931.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/prayer/comments/commentRss/68931.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/prayer/services/trackbacks/68931.html</trackback:ping><description><![CDATA[<br>
<div class=articleText>中间件系统检查<br>1.日志检查清理。检查Tuxedo日志，用vi命令查看日志文件内容，检查有无Tuxedo系统出错记录；检查有无服务异常错误记录；检查有无服务被重起记录；对发现的异常记录进行分析；若无异常情况清除无用的历史日志。<br>2. 服务器运行情况。检查Tuxedo系统和应用的服务器的运行情况，用&#8220;ps －ｅｌｆ｜ｇｒｅｐｓｅｒｖｅｒ名&#8221;查看进程相关信息，如运行时间、占用内存大小等；用ｔｍａｄｍｉｎ命令检查看服务器运行情况，执行ｐｓｒ监控服务器运 行情况，查看处理的请求数目、忙闲程度。<br>3. ｓｅｒｖｉｃｅ运行情况。检查ｓｅｒｖｉｃｅ运行情况，用ｔｍａｄｍｉｎ命令中的ｐｓｃ命令查看Ｔｕｘｅｄｏ各ｓｅｒｖｉｃｅ的运行情况和处理的交易数。<br>4. 队列使用情况。检查Ｔｕｘｅｄｏ队列的使用情况，用ｔｍａｄｍｉｎ命令中的ｐｑ命令查看Ｔｕｘｅｄｏ各ｓｅｒｖｅｒ队列的使用情况，主要查看交易高峰期队列中消息的增加情况，确定是否存在阻塞现象，是否需要对服务数进行调整。<br>5. 客户机连接情况。检查ＴｕｘｅｄｏＣｌｉｅｎｔ的连接情况，用ｔｍａｄｍｉｎ命令中的ｐｃｌｔ命令查看Ｔｕｘｅｄｏ各客户机的连接情况，检查ＭＡＸＣＬＩＥＮＴ参数是否足够，Ｌｉｃｅｎｃｅ数是否满足并发要求。<br>6 .配置参数配置。检查Ｔｕｘｅｄｏ ｕｂｂｃｏｎｆｉｇ文件和ｄｍｃｏｎｆｉｇ文件，根据以上各项检查结果，查看Ｔｕｘｅｄｏ配置文件是否需要调整优化，以使中间件平台良好运行，保存配置文件并归档备案。<br>7. 系统核心参数配置。检查操作系统核心参数配置是否满足目前应用系统规模要求，是否需要调整，根据具体使用的操作系统提供的命令查看核心参数。</div>
<div class=articleText>8. tmunloadcf 可以导出 ubb 文件, tmloadcf 加载ubb 文件</div>
9. tmboot 启动, tmshutdown 关闭, 当然还有很多参数 比如 -y -i -s 等
<img src ="http://www.cppblog.com/prayer/aggbug/68931.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/prayer/" target="_blank">Prayer</a> 2008-12-09 13:38 <a href="http://www.cppblog.com/prayer/archive/2008/12/09/68931.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>tuxedo编译</title><link>http://www.cppblog.com/prayer/archive/2008/12/09/68913.html</link><dc:creator>Prayer</dc:creator><author>Prayer</author><pubDate>Tue, 09 Dec 2008 02:51:00 GMT</pubDate><guid>http://www.cppblog.com/prayer/archive/2008/12/09/68913.html</guid><wfw:comment>http://www.cppblog.com/prayer/comments/68913.html</wfw:comment><comments>http://www.cppblog.com/prayer/archive/2008/12/09/68913.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/prayer/comments/commentRss/68913.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/prayer/services/trackbacks/68913.html</trackback:ping><description><![CDATA[&nbsp;
<p>编译客户程序 </p>
<p>buildclient -o clnt -f cl.c </p>
<p>&#160;</p>
<p>编译服务程序 </p>
<p>buildserver -o simpserv -f srv.c -s TOUPPER</p>
<p>&#160;</p>
<p>启动服务程序 </p>
<p>tmboot &#8211;y<br><br>&nbsp;</p>
<p style="FONT-SIZE: 10pt">buildclient -o clnt -f cl.c </p>
<p style="FONT-SIZE: 10pt">-o:指定生成的目标文件名</p>
<p style="FONT-SIZE: 10pt">-f:指定要编译的源程序</p>
<p style="FONT-SIZE: 10pt"></p>
<p style="FONT-SIZE: 10pt">编译服务程序 </p>
<p style="FONT-SIZE: 10pt">buildserver -o simpserv -f srv.c -s TOUPPER</p>
<p style="FONT-SIZE: 10pt">-o:指定生成的目标文件名</p>
<p style="FONT-SIZE: 10pt">-f:源程序</p>
<p style="FONT-SIZE: 10pt">-s:提供系统启动时的tuxedo服务名称 </p>
<p style="FONT-SIZE: 10pt"></p>
<p style="FONT-SIZE: 10pt">说明:buildclient和buildserver没有编译能力,要编译tuxedo应用程序,需要安装第三方的编译器,如cc </p>
<img src ="http://www.cppblog.com/prayer/aggbug/68913.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/prayer/" target="_blank">Prayer</a> 2008-12-09 10:51 <a href="http://www.cppblog.com/prayer/archive/2008/12/09/68913.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>tuxedo客户端程序主要流程</title><link>http://www.cppblog.com/prayer/archive/2008/12/09/68908.html</link><dc:creator>Prayer</dc:creator><author>Prayer</author><pubDate>Tue, 09 Dec 2008 02:18:00 GMT</pubDate><guid>http://www.cppblog.com/prayer/archive/2008/12/09/68908.html</guid><wfw:comment>http://www.cppblog.com/prayer/comments/68908.html</wfw:comment><comments>http://www.cppblog.com/prayer/archive/2008/12/09/68908.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/prayer/comments/commentRss/68908.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/prayer/services/trackbacks/68908.html</trackback:ping><description><![CDATA[&nbsp;
<p style="FONT-SIZE: 10pt">客户端程序主要流程：</p>
<p style="FONT-SIZE: 10pt">1.tpinit连接TUXEDO服务器.</p>
<p style="FONT-SIZE: 10pt"></p>
<p style="FONT-SIZE: 10pt">2.开辟数据缓冲区 </p>
<p style="FONT-SIZE: 10pt"></p>
<p style="FONT-SIZE: 10pt">3.将要传给service的数据放入缓冲区 </p>
<p style="FONT-SIZE: 10pt"></p>
<p style="FONT-SIZE: 10pt">4.tpcall调用服务。指定服务名,发送数据,并接收返回数据。（这里仅以同步调用为例） </p>
<p style="FONT-SIZE: 10pt"></p>
<p style="FONT-SIZE: 10pt">5.tpfree释放缓冲区 </p>
<p style="FONT-SIZE: 10pt"></p>
<p style="FONT-SIZE: 10pt">6.tpterm退出应用，断开连接。 </p>
<img src ="http://www.cppblog.com/prayer/aggbug/68908.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/prayer/" target="_blank">Prayer</a> 2008-12-09 10:18 <a href="http://www.cppblog.com/prayer/archive/2008/12/09/68908.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Tuxedo介绍</title><link>http://www.cppblog.com/prayer/archive/2008/09/01/60589.html</link><dc:creator>Prayer</dc:creator><author>Prayer</author><pubDate>Mon, 01 Sep 2008 06:07:00 GMT</pubDate><guid>http://www.cppblog.com/prayer/archive/2008/09/01/60589.html</guid><wfw:comment>http://www.cppblog.com/prayer/comments/60589.html</wfw:comment><comments>http://www.cppblog.com/prayer/archive/2008/09/01/60589.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/prayer/comments/commentRss/60589.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/prayer/services/trackbacks/60589.html</trackback:ping><description><![CDATA[<font color=#333399>1.1 &nbsp; &nbsp; 中间件介绍<br>介于客户机与服务器之间的夹层，它突破了二层C/S结构的局限性，为构建大规<br>模、高性能、分布式C/S应用程序提供了通信、事务、安全、容错等基础服务，它屏蔽了底层技术细节，使应用程序开发不必再从底层做起，以自身的复杂性换来了应用程序开发的简单。<br><br>最早具有中间件技术思想及功能的软件是IBM的CICS，但由于CICS不是分布式环境的产物，因此人们一般把Tuxedo作为第一个严格意义上的中间件产品。Tuxedo是1984年在当时属于AT&amp;&amp;T的贝尔实验室开发完成的，但由于分布式处理当时并没有在商业应用上获得像今天一样的成功，Tuxedo在很长一段时期里只是实验室产品，后来被Novell收购，在经过Novell并不成功的商业推广之后，1995年被现在的BEA公司收购。尽管中间件的概念很早就已经产生，但中间件技术的广泛运用却是在最近10年之中。BEA公司1995年成立后收购Tuxedo才成为一个真正的中间件厂商，IBM的中间件MQSeries也是90年代的产品，其它许多中间件产品也都是最近几年才成熟起来。 简单提一下东方通TongLINK，TONGEASY.<br>TUXEDO为交易中间件。<br>1.2 TUXEDO是什么<br>TUXEDO名字的由来:<br>Transaction for UNIX has been Extended for Distributed Operation，即被分布式操作扩展之后的UNIX事务系统 。<br>BEA TUXEDO是在企业、Internet 这样的分布式运算环境中开发和管理三层结构的客 户/服务器型关键任务应用系统的强有力工具。它具备分布式事务处理和应用通信功能，并提供完善的各种服务来建立、运行和管理关键任务应用系统。开发人员能够用它建立跨多个硬件平台、数据库和操作系统的可互操作的应用系统。 <br>在当今系统整合、全球应用、永远可用的业务环境中，企业要求分布式事务处理（TP）的基础结构，不仅能够充分发挥现有技能和应用资产的作用，而且还要具备基于标准的互操作性以简化集成。<br>BEA Tuxedo 是当今 C、 C++ 和 COBOL 解决方案的首选平台。它运行着一些最大型的关键任务事务处理系统，如有线传输、ATM和电信。它是许多世界领先公司的支柱。<br>只有 BEA Tuxedo 才能提供这样强大的平台，满足在分布式异构计算环境下运行如此大量应用的需求；它能够使事务在全球范围内跨任何系统，从面向客户的关键任务应用延伸到后台处理。<br>BEA Tuxedo 是一种多语言、可任意伸缩的事务处理平台，它提供了用户为实现下列目标所必需的任务关键型基础结构： <br>&#8226; &nbsp; &nbsp; 增强现有应用的可访问性 <br>&#8226; &nbsp; &nbsp; 整合企业事务处理和消息传递解决方案 <br>&#8226; &nbsp; &nbsp; 采用Web 服务的核心应用 <br>&#8226; &nbsp; &nbsp; 确保应用最高的可用性和吞吐量 <br>&#8226; &nbsp; &nbsp; 提升处理效率，改善资源管理 <br>&#8226; &nbsp; &nbsp; 降低总体拥有成本 <br><br>用我们更加通俗的语言描述,tuxedo有以下五大功能：<br>&#8226; &nbsp; &nbsp; &nbsp; 应用开发平台<br>ATMI函数（API接口函数）<br>&#8226; &nbsp; &nbsp; &nbsp; BUFFER<br>&#8226; &nbsp; &nbsp; &nbsp; 应用部署平台<br>UBB（TUXEDO的系统信息存放在共享内存）<br>&#8226; &nbsp; &nbsp; &nbsp; 应用运行平台 <br>NATIVE本机<br>WORKSTATION（/WS）远程CLIENT<br>MP（Claster）<br>&#8226; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DOMAIN<br>&#8226; &nbsp; &nbsp; &nbsp; 应用管理平台<br>命令行COMMAND LINE<br>图形管理界面GUI<br>&#8226; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MIB管理信息库<br>&#8226; &nbsp; &nbsp; &nbsp; 应用互联平台<br>JOLT,WTC与WEBLOGIC互联<br>&#8226; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ELINK与已有系统互联<br><br>1.3 TUXEDO的历史以及现状<br> &nbsp; &nbsp; 1983，Bell实验室的AT&amp;T分部<br> &nbsp; &nbsp; 命名为UNITS（Unix Transaction System）<br> &nbsp; &nbsp; UNITS －&gt; TUX（Transaction for UNIX）<br> &nbsp; &nbsp; 用于构建AT&amp;T内部基于UNIX系统的 BSS<br> &nbsp; &nbsp; 1984，TUX应用于LMOS项目<br> &nbsp; &nbsp; LMOS是一个跟踪电话电路维修事件的应用程序 <br> &nbsp; &nbsp; 由于用户数据量增加，TUX引入了DUX（Database for UNIX ） <br> &nbsp; &nbsp; 由于并发用户数增加，TUX引入了C/S框架结构<br> &nbsp; &nbsp; TUX3.0应用于AT&amp;T内部的3B4000计算机时，正式定名为Tuxedo<br> &nbsp; &nbsp; 1989，AT&amp;T－&gt;USL，Tuxedo正式以商业目的出售<br> &nbsp; &nbsp; 1993，USL-&gt;NOVELL，用户数：200<br> &nbsp; &nbsp; 1996，NOVELL-&gt;BEA，用户数：2000<br> &nbsp; &nbsp; 用户量猛增，占有70%的市场份额，成为交易中间件事实上的标准<br><br>日前BEA推出了Tuxedo 9.0版本。我们就目前使用最多的8.1版本进行分析。新版Tuxedo实现了对Web服务的全面支持，同时，凭借与BEA WebLogic Enterprise PlatformTM的良好集成，BEA Tuxedo能够显著简化Web服务的开发，并将Tuxedo&#8220;面向服务&#8221;的体系结构延伸至Web。新版BEA Tuxedo延续了对包括C、C++、COBOL在内的多语言支持，该产品仍将是BEA产品系列乃至其全面的应用基础架构策略的关键组成部分。借助Tuxedo与WebLogic Server及WebLogic Workshop更为紧密的集成，客户能够轻松地将其关键业务应用扩展成为标准的Web服务。不仅如此，更加紧密的集成使BEA Tuxedo 8.1的操作、管理和维护更加完善，其中包括对单点登录和集中安全管理的支持。<br>&nbsp; 8．1发布增强了比如支持XML，加强了全局事务控制，域，gateway，Domain，TUXCONFIG等。<br><br>1.4 TUXEDO的体系结构<br>面对更大规模的关键业务应用，如要进行有效的分布式处理，就要求从客户/数据库方案转变到三层 客户/应用系统/数据服务器结构。以后者为核心的组件软件 模型是客户/服务 器计算的拓展，它支持应用分区，能有效地开发和调度应用业务逻辑，管理分布式应用的可靠执行。<br>BEA TUXEDO 采用三层结构的组件软件模型。优势如下：<br>分开表达逻辑，业务逻辑，数据逻辑。<br>BEA TUXEDO以服务为中心 而不是以SQL(数据)为中心<br>大并发用户数支持：三层结构（资源合理调配）<br><br>1.5 TUXEDO系统的开放性<br>&#8226; &nbsp; &nbsp; 任何开放工具<br>&#8226; &nbsp; &nbsp; 任何语言<br>&#8226; &nbsp; &nbsp; 任何遵循 XA 的资源管理器<br>&#8226; &nbsp; &nbsp; 任何硬件平台<br>&#8226; &nbsp; &nbsp; 任何操作系统<br>&#8226; &nbsp; &nbsp; 任何网络<br><br>1.6 TUXEDO平台支持<br>BEA TUXEDO是一个非常开放的平台，支持五十多种硬件和操作系统平台，包括大多<br>数的 UNIX服务器 ，WindowsNT 服务器,IBM的S/370,S/390, 加上AS/400和 Tandem公司的 NonStop系统。它的客户支持几乎所有的工作站，包括 UNIX,MS-DOS,Windows3.1/95, Windows NT, OS/2,Macintosh等。 &nbsp; <br>BEA TUXEDO支持X/Open组织 的分布式 事务 处 理 模型DTP，事务定界标准TX, 应用程序事务处理接口标准XA TMI以及 和资源 管理 器 （像数据库系统）的接口标准XA，并且还支持事务处理器之间的互操作标准OSI-TP。 BEA TUXEDO的客户端通过DLL 可以和Visual C++、Visual Basic、 Power Builder、 SQL Windows、Delphi、Develop/2000 以及其他4GL和CASE 工具互连。<br>此外，BEA TUXEDO还得到其他第三方开发管理工具厂商的支持。<br>无论从市场份额、技术体制、产品历史、成功案例来看，毋庸置疑的世界第一的产品；<br>拥有企业级应用所必须的一切底层功能；极强的动态部署、自适应调整能力；完全的第三方独立产品，支持业界几乎所有的主机、数据库厂商。<br><br>1.7 WEB服务技术发展现状与WTC介绍<br>　　Web Services领域的两个主要的应用框架J2EE和.NET是正面竞争的两个强大的平台，然而在Web Services的技术支持下，同时它们也是能够互相融合和集成的应用部署环境。Microsoft .NET与Sun J2EE是目前企业Web Services平台市场上两个最重要的应用框架(Application Framework)。<br>　　在对Web Services的支持上，Microsoft的.NET在设计之初就紧紧地把平台规范与产品胶合在一起。不过随着.NET架构中的C#、CLI等逐渐标准化，.NET也正在向J2EE的模式靠拢。<br>　　J2EE做为一种开放的规范，从一开始就得到了众多厂商的支持，如IBM、BEA、HP、Oracle等在J2EE的实施上都洒下了大笔的投资。目前市场上最好的J2EE Application Server，并不是Sun与Netscape合资的iPlanet，而是Bea的WebLogic和IBM的WebShpere。<br><br>WebLogic Tuxedo Connector (WTC): <br>由于BEA Tuxedo 和 BEA WebLogic Platform 之间通过 WebLogic Tuxedo Connector (WTC)实现了紧密集成，因此，IT 部门可以轻松地扩展和将 BEA Tuxedo 服务与新的和现有的 J2EE 解决方案集成在一起。利用双向对等协议， WTC 完全支持BEA Tuxedo C、C++、COBOL 应用和 BEA WebLogic Server 、Platform J2EE工具与应用之间的事务和安全性传播（非代理事务）。<br>总结：<br>通过WTC实现与WEBLOGIC SERVER的集成<br>其它JAVA产器可以通过JOLT访问TUXEDO提供服务</font>
<div><font color=#333399 size=3>---------------------------------------------------------------------------------------------</font></div>
<div><font size=3>相关网站：</font><a href="http://dev2dev.bea.com.cn/products/tuxedo/list3.html"><font color=#d15cd7 size=3>dev2dev的Tuxedo资源</font></a></div>
<img src ="http://www.cppblog.com/prayer/aggbug/60589.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/prayer/" target="_blank">Prayer</a> 2008-09-01 14:07 <a href="http://www.cppblog.com/prayer/archive/2008/09/01/60589.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>