??xml version="1.0" encoding="utf-8" standalone="yes"?>在线看小视频,julia京香一区二区三区,91亚洲精品久久久http://www.aygfsteel.com/flyingbug/category/1524.html目前x:ESB框架、中间g技术、代码运行期理<br> <script type="text/javascript"><!-- google_ad_client = "pub-8329809642402918"; google_ad_width = 468; google_ad_height = 60; google_ad_format = "468x60_as"; google_ad_type = "text_image"; google_ad_channel =""; //--></script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script>zh-cnTue, 27 Feb 2007 08:58:12 GMTTue, 27 Feb 2007 08:58:12 GMT60[调查]国内有多h使用MINAQ?/title><link>http://www.aygfsteel.com/flyingbug/archive/2006/12/27/90277.html</link><dc:creator>fisher</dc:creator><author>fisher</author><pubDate>Wed, 27 Dec 2006 05:00:00 GMT</pubDate><guid>http://www.aygfsteel.com/flyingbug/archive/2006/12/27/90277.html</guid><wfw:comment>http://www.aygfsteel.com/flyingbug/comments/90277.html</wfw:comment><comments>http://www.aygfsteel.com/flyingbug/archive/2006/12/27/90277.html#Feedback</comments><slash:comments>6</slash:comments><wfw:commentRss>http://www.aygfsteel.com/flyingbug/comments/commentRss/90277.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/flyingbug/services/trackbacks/90277.html</trackback:ping><description><![CDATA[ <p>最q看到越来越多的Z用minaQ甚臛_U下也碰到合作公司的库中使用MINAQ出于好奇,试一下用自己的blog做一下调查,讉K本blog的兄弟,如果(zhn)用MINA作ؓ(f)自己的通讯基础ӞL(fng)a介绍一下自?/p> <img src ="http://www.aygfsteel.com/flyingbug/aggbug/90277.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/flyingbug/" target="_blank">fisher</a> 2006-12-27 13:00 <a href="http://www.aygfsteel.com/flyingbug/archive/2006/12/27/90277.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Hello World?96U写?/title><link>http://www.aygfsteel.com/flyingbug/archive/2006/05/18/46859.html</link><dc:creator>fisher</dc:creator><author>fisher</author><pubDate>Thu, 18 May 2006 08:58:00 GMT</pubDate><guid>http://www.aygfsteel.com/flyingbug/archive/2006/05/18/46859.html</guid><wfw:comment>http://www.aygfsteel.com/flyingbug/comments/46859.html</wfw:comment><comments>http://www.aygfsteel.com/flyingbug/archive/2006/05/18/46859.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/flyingbug/comments/commentRss/46859.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/flyingbug/services/trackbacks/46859.html</trackback:ping><description><![CDATA[q记得孔乙己_(d)(x)茴香豆的‘茴’字有四U写法吗Q现在我们的知识份子已经q步?jin),看看Hello World?96U写?)<br /><br /><a >http://man.lupaworld.com/content/develop/hello/HelloWorld.shtml</a><img src ="http://www.aygfsteel.com/flyingbug/aggbug/46859.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/flyingbug/" target="_blank">fisher</a> 2006-05-18 16:58 <a href="http://www.aygfsteel.com/flyingbug/archive/2006/05/18/46859.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>webwork2.2.2的dtd解析问题Q感谢飞云小侠)(j)http://www.aygfsteel.com/flyingbug/archive/2006/04/21/42324.htmlfisherfisherFri, 21 Apr 2006 07:07:00 GMThttp://www.aygfsteel.com/flyingbug/archive/2006/04/21/42324.htmlhttp://www.aygfsteel.com/flyingbug/comments/42324.htmlhttp://www.aygfsteel.com/flyingbug/archive/2006/04/21/42324.html#Feedback0http://www.aygfsteel.com/flyingbug/comments/commentRss/42324.htmlhttp://www.aygfsteel.com/flyingbug/services/trackbacks/42324.html
org.xml.sax.SAXParseException: Element type "global-exception-mappings" must be declared.
com.opensymphony.xwork.config.ConfigurationException: Caught exception 
while loading file xwork.xml
    with nested exception 
org.xml.sax.SAXParseException: Element type 
"global-exception-mappings" must be declared.
如果xwork.xml中的global-exception-mappings注释掉便?br />
头疼?jin)几个小时解决不了(jin),不得不求助飞云小?br />飞云侠一出手果然不同Q马上定位了(jin)问题所?br />是q句Q?br />
<!DOCTYPE xwork PUBLIC "-//OpenSymphony Group//XWork 1.1.1//EN" "http://www.opensymphony.com/xwork/xwork-1.1.1.dtd">

原来虽然几次升webwork.jarQ但是xwork.xml的DTD解析q是用的原来的DTDQ顶多就是改?jin)DTD的地址Q也是这?br />
 "http://www.opensymphony.com/xwork/xwork-1.1.dtd">
改ؓ(f)q样
 "http://www.opensymphony.com/xwork/xwork-1.1.1.dtd">

而实际上解析DTD是靠的前面那?br />
<!DOCTYPE xwork PUBLIC "-//OpenSymphony Group//XWork 1.1.1//EN" >
原来一直是
<!DOCTYPE xwork PUBLIC "-//OpenSymphony Group//XWork 1.0//EN" >
于是出C(jin)上面的问?br />多谢飞云侠的帮助^_^

fisher 2006-04-21 15:07 发表评论
]]>
MINA vs. QuickServerhttp://www.aygfsteel.com/flyingbug/archive/2006/02/24/32350.htmlfisherfisherFri, 24 Feb 2006 13:58:00 GMThttp://www.aygfsteel.com/flyingbug/archive/2006/02/24/32350.htmlhttp://www.aygfsteel.com/flyingbug/comments/32350.htmlhttp://www.aygfsteel.com/flyingbug/archive/2006/02/24/32350.html#Feedback5http://www.aygfsteel.com/flyingbug/comments/commentRss/32350.htmlhttp://www.aygfsteel.com/flyingbug/services/trackbacks/32350.htmlMINA is a good framwork 》中回复提到比较一下MNA和QuickServerQ遂写一小文:(x)

First for all, QuickServer is licensed as LGPL, and MINA as ASL

从我个h角度而言Q去q看qQuickServer的源码,我在目中采用的每一个框架或cd都会(x)做综合评P通常不会(x)是一个原因导致我采用或没有采用某个库或框Ӟ具体最后没有采用QuickServer的原因忘C(jin)Q但是当时给我的M感觉是,QuickServer虽然很方便,但不?x)让我在架构上得到新的好处。而它最大的优点则是Q支持JDK1.3Q如果没记错的话Q,另外是License的问?BR>
下面看一看来自TrusinLee的评论:(x)

Thank for the information about another network application framework.  I found a few differences:

* QuickServer supports blocking mode.  (MINA supports only non-blocking mode, but you can make your operation block at your will.)
* QuickServer provides GUI-based admin.  (MINA doesn't have one yet, but will have full JMX support soon, which is a standard.)
* QuickServer uses java.util.logging.  (MINA uses SLF4J, which is a safe replacement of commons-logging.)
* QuickServer uses its own XML settings.  (MINA provides Spring framework integration instead.)
* QuickServer can specify maximum number of clients allowed.  (MINA can do this using a filter, but not implemented by default.  Of course, this will be implemented as an overload prevention filter.)
* QuickServer team has one crew.  (MINA has three crews.)
* QuickServer project started in 2003.  (MINA started in 2005.)
* QuickServer has a difference event handler interface from MINA.  (You'll have to compare it by yourself.  IMHO, MINA has one simple enough handler which covers all QuickServer provides.)
* QuickServer doesn't support UDP at all.  (MINA does)
* QuickServer doesn't support client-side API at all.  (MINA does)
* QuickServer integrated authentication and text protocol in its core.  (MINA didn't and they are considered as a cross-cutting concern that a filter should take care of.  IMHO, MINA is more extensible here.)


至于对MINA更详l的介绍Q可以看看我d译的MINA的Tutorial

MinaTutorialInChinese

MINA的应用,在MINA的Testimonials中有两个目Q?BR>开源Flash serverQ?A >red5
http://ludonet.leonardo.it/的game server
q有Q就是MINA所在的目QApache?A >LDAP



fisher 2006-02-24 21:58 发表评论
]]>
【ESB专题】之?Q?System Management?qing)其相关模?/title><link>http://www.aygfsteel.com/flyingbug/archive/2005/11/23/21170.html</link><dc:creator>fisher</dc:creator><author>fisher</author><pubDate>Wed, 23 Nov 2005 12:20:00 GMT</pubDate><guid>http://www.aygfsteel.com/flyingbug/archive/2005/11/23/21170.html</guid><wfw:comment>http://www.aygfsteel.com/flyingbug/comments/21170.html</wfw:comment><comments>http://www.aygfsteel.com/flyingbug/archive/2005/11/23/21170.html#Feedback</comments><slash:comments>6</slash:comments><wfw:commentRss>http://www.aygfsteel.com/flyingbug/comments/commentRss/21170.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/flyingbug/services/trackbacks/21170.html</trackback:ping><description><![CDATA[<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p> </o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">开发一个基于消息的解决Ҏ(gu)是不Ҏ(gu)的事情,在生产中操作q样一个品同样也是一个挑战:(x)一个基于消息的集成解决Ҏ(gu)一天可以生、\由和转换成千上万的消息。我们不得不处理异常、效率瓶颈或改变合作pȝ。而ؓ(f)?jin)事情变得更加有挑战性,lgl常被分布在不同的^台和机器上,甚至位于不同的地理位|?/SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p> </o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US>System Management</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">包含以下几种模式</SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 21.0pt"><SPAN lang=EN-US style="FONT-FAMILY: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-family: Wingdings"><SPAN style="mso-list: Ignore">l<SPAN style="FONT: 7pt 'Times New Roman'">         </SPAN></SPAN></SPAN><SPAN lang=EN-US>Control Bus</SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 21.0pt"><SPAN lang=EN-US style="FONT-FAMILY: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-family: Wingdings"><SPAN style="mso-list: Ignore">l<SPAN style="FONT: 7pt 'Times New Roman'">         </SPAN></SPAN></SPAN><SPAN lang=EN-US>Detour</SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 21.0pt"><SPAN lang=EN-US style="FONT-FAMILY: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-family: Wingdings"><SPAN style="mso-list: Ignore">l<SPAN style="FONT: 7pt 'Times New Roman'">         </SPAN></SPAN></SPAN><SPAN lang=EN-US>Wire Tap<SPAN style="mso-tab-count: 1"> </SPAN></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 21.0pt"><SPAN lang=EN-US style="FONT-FAMILY: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-family: Wingdings"><SPAN style="mso-list: Ignore">l<SPAN style="FONT: 7pt 'Times New Roman'">         </SPAN></SPAN></SPAN><SPAN lang=EN-US>Message History</SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 21.0pt"><SPAN lang=EN-US style="FONT-FAMILY: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-family: Wingdings"><SPAN style="mso-list: Ignore">l<SPAN style="FONT: 7pt 'Times New Roman'">         </SPAN></SPAN></SPAN><SPAN lang=EN-US>Message Store<SPAN style="mso-tab-count: 1">       </SPAN></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 21.0pt"><SPAN lang=EN-US style="FONT-FAMILY: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-family: Wingdings"><SPAN style="mso-list: Ignore">l<SPAN style="FONT: 7pt 'Times New Roman'">         </SPAN></SPAN></SPAN><SPAN lang=EN-US>Smart Proxy</SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 21.0pt"><SPAN lang=EN-US style="FONT-FAMILY: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-family: Wingdings"><SPAN style="mso-list: Ignore">l<SPAN style="FONT: 7pt 'Times New Roman'">         </SPAN></SPAN></SPAN><SPAN lang=EN-US>Test Message</SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 21.0pt"><SPAN lang=EN-US style="FONT-FAMILY: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-family: Wingdings"><SPAN style="mso-list: Ignore">l<SPAN style="FONT: 7pt 'Times New Roman'">         </SPAN></SPAN></SPAN><SPAN lang=EN-US>Channel Purger</SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p> </o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p> </o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">除了(jin)与生据来的复杂性、分布式集成的规模以?qing)个性化的应用之外,低耦合的架构得测试和</SPAN><SPAN lang=EN-US>debug</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">变得更加困难?/SPAN><SPAN lang=EN-US>Martin Fowler</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">这个症状称为?SPAN style="COLOR: red">架构师的梦想Q开发者的梦魇</SPAN>”。低耦合的架构原则以?qing)间接的依赖于外部系l提供了(jin)灉|性。然而,试一个消息生产者不?jin)解消息消费者的pȝ可能?x)是一个挑战。另外异步的和时间相关的消息使得事情变的更加复杂。D例来_(d)消息Ҏ(gu)可能被设计没有被成消息生产者者必M接受者那里得C个回应。同L(fng)消息基础设施通常保证传输消息Q但不能保证传输旉。这是的开发基于消息传送结果的试用例变得困难?/SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p> </o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">当监控一个消息解x案,我们可以在两个抽象层面上跟踪消息。一个典型的pȝ理Ҏ(gu)监控多少消息被发送或者它多长旉得到一个被处理的消息。这些监控方案不(g)查消息数据,除了(jin)可能?x)检查消息头中的几个字段Q比如消息标识或者消息历Ԍ(j)。与之相对的Q?/SPAN><SPAN lang=EN-US>BAM</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q?/SPAN><SPAN lang=EN-US>business activity monitoring</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q方案聚焦于包含在消息中的有效数据,举例来说Q发生在q去一时的所有订单的金额?/SPAN><SPAN lang=EN-US>System Management</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">中的很多模式都够通用q可以用在以上两个目的中Q监控消息头或者消息内容)(j)。然而,׃</SPAN><SPAN lang=EN-US>BAM</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">本n是一个新领域Qƈ且需要从数据仓库中获得很多数据(有些我们Ҏ(gu)没有涉?qing)到Q,我们军_在系l管理的内容中讨些模式?/SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p> </o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">pȝ理模式被设计用于ؓ(f)保持一个基于消息的复杂pȝ的运转所提出的需求ƈ提供工具?/SPAN><SPAN lang=EN-US>System Management</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的模式涉?qing)三个种c:(x)<SPAN style="COLOR: red">监控和控Ӟ观察和分析消息流量,试和调?/SPAN>?/SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p> </o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">监控和控?/SPAN><SPAN lang=EN-US><o:p></o:p></SPAN></B></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p> </o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">一?/SPAN><SPAN lang=EN-US style="COLOR: red">Control Bus</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">提供一个单独的控制Ҏ(gu)对一个分布式Ҏ(gu)q行监控和管理。它?yu)多个组件连接到一个中?j)管理控制台Q这里可以显C每个组件的状态ƈ且监控通过每个lg的消息流量。控制台同时也可以用于发送控制命令给lgQ比如,转变消息?/SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">我们可能惌在\由消息时d附加的步骤,比如验证或者日志。由于这些步骤可能效率降低Q所以我们可以通过</SPAN><SPAN lang=EN-US style="COLOR: red">Control Bus</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">来控制他们开兟뀂一?/SPAN><SPAN lang=EN-US style="COLOR: red">Detour</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">为我们提供这U能力?/SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p> </o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">观察和分析消息流?/SPAN><SPAN lang=EN-US><o:p></o:p></SPAN></B></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p> </o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">有时我们惌在不影响主要消息的情况下观察消息的内容。一?/SPAN><SPAN lang=EN-US style="COLOR: red">Wire Tap</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">允许我们接入到消息流中?/SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">当我们调试一个基于消息的pȝQ知道一个特定的消息在哪使很有帮助的?/SPAN><SPAN lang=EN-US style="COLOR: red">Message History</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">保留一个消息访问过的所有组件的日志Q而不需要增加组仉的依赖?/SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">然?/SPAN><SPAN lang=EN-US style="COLOR: red">Message History</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">依赖于单独的消息Q一个中?j)?/SPAN><SPAN lang=EN-US style="COLOR: red">Message Store</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">可以提供一个穿系l的每个消息的完整记录。结?/SPAN><SPAN lang=EN-US style="COLOR: red">Message History</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q?/SPAN><SPAN lang=EN-US style="COLOR: red">Message Store</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">可以分析所有消息穿q系l的可能路径?/SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="COLOR: red">Wire Tap,</SPAN><SPAN lang=EN-US> <SPAN style="COLOR: red">Message History,</SPAN> </SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">?/SPAN><SPAN lang=EN-US style="COLOR: red">Message Store</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">帮助我们分析异步的消息流。ؓ(f)?jin)跟t发送到h</SPAN><SPAN lang=EN-US>-</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">应答</SPAN><SPAN lang=EN-US>service</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的消息,我们需要在消息中插入一?/SPAN><SPAN lang=EN-US style="COLOR: red">Smart Proxy</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">?/SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p> </o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">试和调?/SPAN><SPAN lang=EN-US><o:p></o:p></SPAN></B></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p> </o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">在部|前试一个消息系l是一个非常好的注意。但是测试不应该停止在部|前。你应该有能力验证正在运行的消息pȝq行持箋的运行正常。你可以周期性的发送一?/SPAN><SPAN lang=EN-US style="COLOR: red">Test Message</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">到系l中q证结果?/SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">当一个组件失败或者运行不正常Q它可以单的l止Qƈ攑ּ一?/SPAN><SPAN lang=EN-US>channel</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">中的剩余消息。在试期间q是很有用的。一?/SPAN><SPAN lang=EN-US style="COLOR: red">Channel Purger</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">可以为我们做q些?/SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p> </o:p></SPAN></P><img src ="http://www.aygfsteel.com/flyingbug/aggbug/21170.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/flyingbug/" target="_blank">fisher</a> 2005-11-23 20:20 <a href="http://www.aygfsteel.com/flyingbug/archive/2005/11/23/21170.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>【ESB专题】之?Q?Message Endpoint?qing)其相关模?/title><link>http://www.aygfsteel.com/flyingbug/archive/2005/11/22/21036.html</link><dc:creator>fisher</dc:creator><author>fisher</author><pubDate>Tue, 22 Nov 2005 13:40:00 GMT</pubDate><guid>http://www.aygfsteel.com/flyingbug/archive/2005/11/22/21036.html</guid><wfw:comment>http://www.aygfsteel.com/flyingbug/comments/21036.html</wfw:comment><comments>http://www.aygfsteel.com/flyingbug/archive/2005/11/22/21036.html#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://www.aygfsteel.com/flyingbug/comments/commentRss/21036.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/flyingbug/services/trackbacks/21036.html</trackback:ping><description><![CDATA[<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"><BR>?/SPAN><SPAN lang=EN-US>ESB</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">中另外一个重要的N是</SPAN><SPAN lang=EN-US>Message Endpoint</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q这是关于一个应用程序如何连接到一个消息系l,q过它来发送和接收消息。如果你在面向一个消?/SPAN><SPAN lang=EN-US>API</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">~程Q则你就正在开发一?/SPAN><SPAN lang=EN-US>endpoint</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">代码。商业中间g通常都提供了(jin)q些工具?/SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p> </o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 21.0pt"><SPAN lang=EN-US style="FONT-FAMILY: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-family: Wingdings"><SPAN style="mso-list: Ignore">l<SPAN style="FONT: 7pt 'Times New Roman'">         </SPAN></SPAN></SPAN><SPAN lang=EN-US>Messaging Gateway</SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 21.0pt"><SPAN lang=EN-US style="FONT-FAMILY: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-family: Wingdings"><SPAN style="mso-list: Ignore">l<SPAN style="FONT: 7pt 'Times New Roman'">         </SPAN></SPAN></SPAN><SPAN lang=EN-US>Messaging Mapper</SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 21.0pt"><SPAN lang=EN-US style="FONT-FAMILY: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-family: Wingdings"><SPAN style="mso-list: Ignore">l<SPAN style="FONT: 7pt 'Times New Roman'">         </SPAN></SPAN></SPAN><SPAN lang=EN-US>Transactional Client</SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 21.0pt"><SPAN lang=EN-US style="FONT-FAMILY: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-family: Wingdings"><SPAN style="mso-list: Ignore">l<SPAN style="FONT: 7pt 'Times New Roman'">         </SPAN></SPAN></SPAN><SPAN lang=EN-US>Polling Consumer</SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 21.0pt"><SPAN lang=EN-US style="FONT-FAMILY: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-family: Wingdings"><SPAN style="mso-list: Ignore">l<SPAN style="FONT: 7pt 'Times New Roman'">         </SPAN></SPAN></SPAN><SPAN lang=EN-US>Event-Driven Consumer<SPAN style="mso-tab-count: 1"> </SPAN></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 21.0pt"><SPAN lang=EN-US style="FONT-FAMILY: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-family: Wingdings"><SPAN style="mso-list: Ignore">l<SPAN style="FONT: 7pt 'Times New Roman'">         </SPAN></SPAN></SPAN><SPAN lang=EN-US>Competing Consumers</SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 21.0pt"><SPAN lang=EN-US style="FONT-FAMILY: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-family: Wingdings"><SPAN style="mso-list: Ignore">l<SPAN style="FONT: 7pt 'Times New Roman'">         </SPAN></SPAN></SPAN><SPAN lang=EN-US>Message Dispatcher</SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 21.0pt"><SPAN lang=EN-US style="FONT-FAMILY: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-family: Wingdings"><SPAN style="mso-list: Ignore">l<SPAN style="FONT: 7pt 'Times New Roman'">         </SPAN></SPAN></SPAN><SPAN lang=EN-US>Selective Consumer</SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 21.0pt"><SPAN lang=EN-US style="FONT-FAMILY: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-family: Wingdings"><SPAN style="mso-list: Ignore">l<SPAN style="FONT: 7pt 'Times New Roman'">         </SPAN></SPAN></SPAN><SPAN lang=EN-US>Durable Subscriber<SPAN style="mso-tab-count: 1"> </SPAN></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 21.0pt"><SPAN lang=EN-US style="FONT-FAMILY: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-family: Wingdings"><SPAN style="mso-list: Ignore">l<SPAN style="FONT: 7pt 'Times New Roman'">         </SPAN></SPAN></SPAN><SPAN lang=EN-US>Idempotent Receiver</SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 21.0pt"><SPAN lang=EN-US style="FONT-FAMILY: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-family: Wingdings"><SPAN style="mso-list: Ignore">l<SPAN style="FONT: 7pt 'Times New Roman'">         </SPAN></SPAN></SPAN><SPAN lang=EN-US>Service Activator</SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p> </o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><B><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">发送和接收模式</SPAN><SPAN lang=EN-US><o:p></o:p></SPAN></B></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><B><SPAN lang=EN-US><o:p> </o:p></SPAN></B></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">有些</SPAN><SPAN lang=EN-US>endpoint</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">模式既可以用在发送方也可以用在接受斏V它们描qC个应用连接一个消息系l的一般情c(din)?/SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p> </o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="COLOR: red; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">包装消息代码</SPAN> <SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q?/SPAN> <SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">一个应用不应该意识到正在用消息同另外一个应用程序通讯Q大多数应用代码应该在不知道</SPAN><SPAN lang=EN-US>message</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的情况下被编写。在应用集成的地方,应该有一个薄薄的一层代码来执行应用的集成部分。当集成是由消息实现的,q层应用连接到消息pȝ的代码称Z?/SPAN><SPAN lang=EN-US style="COLOR: red">Message Gateway</SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p> </o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="COLOR: red; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">数据转换</SPAN> <SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q?/SPAN> <SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">当发送者和接受者用不同的数据格式Q或者不同的消息格式Q支持不同的发送和接收者)(j)Q在q种情况下,使用一?/SPAN><SPAN lang=EN-US style="COLOR: red">Message Mapper</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">来在应用格式和消息格式之间{换数据?/SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p> </o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="COLOR: red; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">外部控制的事?/SPAN> <SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q?/SPAN> <SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">消息pȝ在内部和外部使用事务Q默认的Q每个发送和接收Ҏ(gu)在他们自q事务中运行?/SPAN><SPAN lang=EN-US>Message</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">生者和消费者应可选的使用一?/SPAN><SPAN lang=EN-US style="COLOR: red">Transactional Client</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">来控制事务,当你需要将几个消息一起发送伙通过其他事务服务整理消息时是很有用的?/SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p> </o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><B><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">消息消费者模?/SPAN><SPAN lang=EN-US><o:p></o:p></SPAN></B></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p> </o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">其他</SPAN><SPAN lang=EN-US>endpoint</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">模式只适用于消息消费者,发送消息是单的。棘手的问题是决定一个消息应该何时发送,它应包含什么,以及(qing)怎样它送到接受?/SPAN> <SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q?/SPAN> <SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">q是Z么我们有很多消息l构模式</SPAN> <SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q?/SPAN> <SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">但是一旦消息被构徏Q发送它是很Ҏ(gu)的。另一斚wQ接收消?/SPAN> <SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q?/SPAN> <SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">很麻?ch)。因此许?/SPAN><SPAN lang=EN-US>endpoint</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">模式是关于接收消息的?/SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p> </o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">接收消息的一个最重要的主题就是流量控Ӟ(x)一个应用控Ӟ或者调节它消费消息的速度。一个潜在的问题是Q?/SPAN><SPAN lang=EN-US>server</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">都面临着大量的客L(fng)h?x)其超载。通过q程q程调用Q?/SPAN><SPAN lang=EN-US>RPI</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q,</SPAN><SPAN lang=EN-US>server</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">几乎受到客户端调用的支配。同L(fng)Q通过消息Q?/SPAN><SPAN lang=EN-US>server</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">不能控制客户端发送请求的速度</SPAN> <SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q?/SPAN> <SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">但是</SPAN><SPAN lang=EN-US>server</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">可是控制它处理这些请求的速度。应用不必像消息pȝ传送消息那么快的接收ƈ处理消息Q用一?/SPAN><SPAN lang=EN-US>Message Channel</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">可以使它在一个可接收的速率上处理消息。然而,当消息积累太多,?/SPAN><SPAN lang=EN-US>server</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">q有资源可以处理的更快,它可以用同?/SPAN><SPAN lang=EN-US>message</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">消费者来加快速度。所以用这些消息消费者模式可以让你的应用速度控制在它可以承受的范围?/SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p> </o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">许多消息消费者模式都是成对出现的Q你可以任选一个用?/SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p> </o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="COLOR: red; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">同步或异步接受?/SPAN> <SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q?/SPAN> <SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">可以使用轮询消费者或一个事仉动消费者。轮询提供最好的量控制Q因为如?/SPAN><SPAN lang=EN-US>server</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">忙,则它不再l箋轮询消息Q所?/SPAN><SPAN lang=EN-US>message</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">阻塞在队列。事仉动的消费者們֐于消息到达便触发处理Q所以有可能?x)?/SPAN><SPAN lang=EN-US>server</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">蝲Q但是每个消费者每ơ只处理一个消息,所以限制消费者的数量可以有效的控制消贚w度?/SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p> </o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="COLOR: red; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">消息分派</SPAN><SPAN lang=EN-US style="COLOR: red"> vs </SPAN><SPAN style="COLOR: red; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">消息获取</SPAN> <SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q?/SPAN> <SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">另外一个二选一的模式是一堆消费者如何处理一堆消息。如果每个消费者获得一个消息,他们可以q行的处理消息。最单的Ҏ(gu)?/SPAN><SPAN lang=EN-US style="COLOR: red">Competing Consumers</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q也是一个点对点?/SPAN><SPAN lang=EN-US>channel</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">有多个消费者。每个都可能获得M消息Q消息系l的实现军_那个消费者获得消息。如果你x制消息到消费者的匚wq程Q?/SPAN><SPAN lang=EN-US style="COLOR: red">Message Dispatcher</SPAN><SPAN style="COLOR: red; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">?/SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">q时只有一个消费者接收消息,但是委z消息到一个执行者去处理。一个应用程序可以通过限制消费者或执行者的数量来控制流量。当?dng)分派?/SPAN><SPAN lang=EN-US style="COLOR: red">Message Dispatcher</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">也可以实C个流量控制行为?/SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p> </o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="COLOR: red; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">接收所有消息或者过?/SPAN> <SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q?/SPAN> <SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">默认的,M到达一?/SPAN><SPAN lang=EN-US>Message Channel</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的消息对于监听着q个</SPAN><SPAN lang=EN-US>channel</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">?/SPAN><SPAN lang=EN-US>Message Endpoint</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">都是可用的。然而有些消费者ƈ不打处?/SPAN><SPAN lang=EN-US>channel</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">上的M消息Q而是希望只处理其中几U。这样一个识别的消费者可以用一?/SPAN><SPAN lang=EN-US style="COLOR: red">Selective Consumer</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">来描q它?yu)接收什么类型的消息。然后消息系l将只将匚w的消息对该接受者描qCؓ(f)可用?/SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p> </o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="COLOR: red; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">当断开q接的时候订阅消?/SPAN> <SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q?/SPAN> <SPAN lang=EN-US style="COLOR: red">Publish-Subscribe Channels</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">带来的问题是Q如果一个消费者感兴趣一?/SPAN><SPAN lang=EN-US>channel</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q但是现在网l是断开的怎么办?是不是一个未q接的应用将错过发布的消息,即它已l订阅过该消?/SPAN><SPAN lang=EN-US>?</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">默认的,是的Q订阅只对连接的订阅者有效,Z(jin)使应用不?x)因接而错q订阅的消息Q要使用</SPAN><SPAN lang=EN-US style="COLOR: red">Durable Subscriber</SPAN><SPAN style="COLOR: red; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">?/SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p> </o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="COLOR: red; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">{幂</SPAN> <SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q?/SPAN> <SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">有时一个消息可能被传输不只一ơ,可能因ؓ(f)消息pȝ不确定该消息是否已经被成功的传递过Q或者可能因?/SPAN><SPAN lang=EN-US style="COLOR: red">Message Channel</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">?/SPAN><SPAN lang=EN-US>QoS</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">被设|较低来提高效率。另一面的Q消息接受者认为每个消息只?x)被传输一ơ,q且当它们重复处理相同的消息Q它们会(x)出错。一?/SPAN><SPAN lang=EN-US style="COLOR: red">Idempotent Receiver</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">可以优雅的处理重复的消息Qƈ且阻止它们引h收者应用的发生错误?/SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p> </o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="COLOR: red; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">同步或异步服?/SPAN> <SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q?/SPAN> <SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">另外一个选择是一个应用应该暴露它?/SPAN><SPAN lang=EN-US>service</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">为同步(</SPAN><SPAN lang=EN-US>RPI</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q还是异步的Q?/SPAN><SPAN lang=EN-US>Messaging</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q。不同的客户端可能喜Ƣ不同的方式Q不同的环境可能需要不同的方式。既然很N择Q就一起用。一?/SPAN><SPAN lang=EN-US style="COLOR: red">Service Activator</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">q接一?/SPAN><SPAN lang=EN-US style="COLOR: red">Message Channel</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">C个应用的同步服务以便当一个消息被接收Q?/SPAN><SPAN lang=EN-US>service</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">p调用。同步客L(fng)可以单的直接调用</SPAN><SPAN lang=EN-US>service</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q异步客L(fng)可以通过发送消息调?/SPAN><SPAN lang=EN-US>service</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">?/SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p> </o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><B><SPAN lang=EN-US>Message Endpoint</SPAN></B><B><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的相关主?/SPAN></B></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p> </o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US>Message Endpoint</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的另外一个重要主题是很难同其他模式共同应?/SPAN><SPAN lang=EN-US>Transactional Client</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">?/SPAN><SPAN lang=EN-US>Event-Driven Consumer</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">通常不能适当的在外部控制事务Q?/SPAN><SPAN lang=EN-US>Message Dispatcher</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">也必d?j)的设计q个问题Q?/SPAN><SPAN lang=EN-US>Competing Consumers</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的事务也是个重大问题。最安全的?/SPAN><SPAN lang=EN-US>Transactional Client</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">是用一个单独的</SPAN><SPAN lang=EN-US>Polling Consumer</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q但是这不会(x)是一个o(h)人满意的解决Ҏ(gu)?/SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p> </o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">q里特别要提到应该会(x)保证成功?/SPAN><SPAN lang=EN-US>JMS</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">风格?/SPAN><SPAN lang=EN-US>MDB</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q?/SPAN><SPAN lang=EN-US>EJB</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的一U。一?/SPAN><SPAN lang=EN-US>MDB</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">是一个消息消费者,它即使一?/SPAN><SPAN lang=EN-US>Event-Driven Consumer</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">又是一个支?/SPAN><SPAN lang=EN-US>J2EE</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">分布式事务的</SPAN><SPAN lang=EN-US>Transactional Client</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Qƈ且它可以作ؓ(f)</SPAN><SPAN lang=EN-US>Competing Consumers</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">动态的池化Q甚至作Z?/SPAN><SPAN lang=EN-US>Publish-Subscribe Channel</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。这是在一个自q应用中实现这些是一个困难且乏味的组合,但是q个功能作ؓ(f)一?/SPAN><SPAN lang=EN-US>EJB</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">容器的内建的功能被提供。(</SPAN><SPAN lang=EN-US>MDB</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">框架如何实现的?本质上,容器通过一个动态改变大的可重用的执行者的U程池来实现?jin)一?/SPAN><SPAN lang=EN-US>Message Dispatcher</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q在那里每个执行者自׃用自q</SPAN><SPAN lang=EN-US>session</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">和事务来消费消息。)(j)</SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p> </o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">最后,紧记一个单独的</SPAN><SPAN lang=EN-US>Message Endpoint</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">可以很好l合几个不同的模式。一l?/SPAN><SPAN lang=EN-US>Competing Consumers</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">可以被作?/SPAN><SPAN lang=EN-US>Polling Consumers</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">实现Q同时也可以是一?/SPAN><SPAN lang=EN-US>Selective Consumers</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">q且可以作ؓ(f)一?/SPAN><SPAN lang=EN-US>Service Activator</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">调用一个应用的</SPAN><SPAN lang=EN-US>service</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">?/SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">一?/SPAN><SPAN lang=EN-US>Message Dispatcher</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">可以是一?/SPAN><SPAN lang=EN-US>Event-Driven Consumer</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">和一个?/SPAN><SPAN lang=EN-US>Messaging Mapper</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的一?/SPAN><SPAN lang=EN-US>Durable Subscriber</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。无Z?/SPAN><SPAN lang=EN-US>endpoint</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">实现什么模式,它L一?/SPAN><SPAN lang=EN-US>Messaging Gateway</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。所以,不要考虑使用哪种模式</SPAN> <SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q?/SPAN> <SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">而要考虑如何l合他们。这是用模式解决问题的力所在?/SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p> </o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">要实C?/SPAN><SPAN lang=EN-US>Message Endpoint</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">有很多选择?/SPAN><SPAN lang=EN-US>Message Endpoint</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">模式用于解释q些选择是什么以?qing)如何最好的使用它们?/SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p> </o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p> </o:p></SPAN></P><img src ="http://www.aygfsteel.com/flyingbug/aggbug/21036.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/flyingbug/" target="_blank">fisher</a> 2005-11-22 21:40 <a href="http://www.aygfsteel.com/flyingbug/archive/2005/11/22/21036.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>【ESB专题】之?Q?Message Transformation?qing)其相关模?/title><link>http://www.aygfsteel.com/flyingbug/archive/2005/11/21/20836.html</link><dc:creator>fisher</dc:creator><author>fisher</author><pubDate>Mon, 21 Nov 2005 13:40:00 GMT</pubDate><guid>http://www.aygfsteel.com/flyingbug/archive/2005/11/21/20836.html</guid><wfw:comment>http://www.aygfsteel.com/flyingbug/comments/20836.html</wfw:comment><comments>http://www.aygfsteel.com/flyingbug/archive/2005/11/21/20836.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.aygfsteel.com/flyingbug/comments/commentRss/20836.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/flyingbug/services/trackbacks/20836.html</trackback:ping><description><![CDATA[<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p> </o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p> </o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p> </o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">通常Q通过消息pȝ集成的应用很有同样的消息格式。比如说Q一个帐务系l同一?/SPAN><SPAN lang=EN-US>CRM</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">pȝ对客户对象是有着不同的概늚。基于这个,一个系l可能将消息存储在关p表中,另一个可能存储在文g中。集成已存在的系l通常意味着我们没有修改pȝ以便使他们更好的一起工作的自由。然而,集成Ҏ(gu)不得不协调和解决各种pȝ之间的不同?/SPAN><SPAN lang=EN-US style="COLOR: red">Message Translator</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">模式提供?jin)一个通用的解x案。这里解释几U特定的</SPAN><SPAN lang=EN-US style="COLOR: red">Message Translator</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">?/SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p> </o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US>Message Transformation</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">包含以下几种模式Q?/SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 21.0pt"><SPAN lang=EN-US style="FONT-FAMILY: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-family: Wingdings"><SPAN style="mso-list: Ignore">l<SPAN style="FONT: 7pt 'Times New Roman'">         </SPAN></SPAN></SPAN><SPAN lang=EN-US>Envelope Wrapper</SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 21.0pt"><SPAN lang=EN-US style="FONT-FAMILY: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-family: Wingdings"><SPAN style="mso-list: Ignore">l<SPAN style="FONT: 7pt 'Times New Roman'">         </SPAN></SPAN></SPAN><SPAN lang=EN-US>Content Enricher</SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 21.0pt"><SPAN lang=EN-US style="FONT-FAMILY: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-family: Wingdings"><SPAN style="mso-list: Ignore">l<SPAN style="FONT: 7pt 'Times New Roman'">         </SPAN></SPAN></SPAN><SPAN lang=EN-US>Content Filter</SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 21.0pt"><SPAN lang=EN-US style="FONT-FAMILY: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-family: Wingdings"><SPAN style="mso-list: Ignore">l<SPAN style="FONT: 7pt 'Times New Roman'">         </SPAN></SPAN></SPAN><SPAN lang=EN-US>Claim Check</SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 21.0pt"><SPAN lang=EN-US style="FONT-FAMILY: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-family: Wingdings"><SPAN style="mso-list: Ignore">l<SPAN style="FONT: 7pt 'Times New Roman'">         </SPAN></SPAN></SPAN><SPAN lang=EN-US>Normalizer</SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 21.0pt"><SPAN lang=EN-US style="FONT-FAMILY: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-family: Wingdings"><SPAN style="mso-list: Ignore">l<SPAN style="FONT: 7pt 'Times New Roman'">         </SPAN></SPAN></SPAN><SPAN lang=EN-US>Canonical Data Model</SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p> </o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">大多数消息系l放|特定的需求在消息头的格式和内容中。我们包装有效数据到一?/SPAN><SPAN lang=EN-US style="COLOR: red">Envelope Wrapper</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">中以适应消息基础设施的需求。如果消息需要穿q不同的消息基础设施Q可以结合多?/SPAN><SPAN lang=EN-US style="COLOR: red">Envelope Wrapper</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">?/SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">如果原始pȝ不能提供目标pȝ需要的数据域,可以使用一?/SPAN><SPAN lang=EN-US style="COLOR: red">Content Enricher</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。它可以查找~少的信息ƈ从已有数据中计算出它?/SPAN><SPAN lang=EN-US style="COLOR: red">Content Filter</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">正好相反Q它从消息中删除不需要的数据?/SPAN><SPAN lang=EN-US style="COLOR: red">Claim Check</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">也从消息中删除数据,但是它将存储他们以便以后取回?/SPAN><SPAN lang=EN-US style="COLOR: red">Normalizer</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">多个不同格式的消息译成统一格式?/SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p> </o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">消除依赖</SPAN><SPAN lang=EN-US><o:p></o:p></SPAN></B></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p> </o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">消息转换在集成中是一个很q话题?/SPAN><SPAN lang=EN-US style="COLOR: red">Message Channels</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">?/SPAN><SPAN lang=EN-US style="COLOR: red">Message Routers</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">可以通过消除应用必须知道另外一个应用的位置的需求从而解除应用间的基本依赖?/SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">一个应用可以发送一个消息到</SPAN><SPAN lang=EN-US style="COLOR: red">Message Channel</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">而不必担?j)谁来取出消息。然而消息格式增加了(jin)另外一U依赖。如果一个应用不得不消息格式化成另外一个应用的数据格式Q通过</SPAN><SPAN lang=EN-US style="COLOR: red">Message Channel</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">解耦的说法像一个惟뀂接收系l的M改变或切换到另外一个接收系l都需要对发送应用进行改变?/SPAN><SPAN lang=EN-US style="COLOR: red">Message Translators</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">可以帮助除去q种依赖?/SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p> </o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">元数据管?/SPAN><SPAN lang=EN-US><o:p></o:p></SPAN></B></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p> </o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">消息从一个消息格式{换到另一个格式需要操作元数据</SPAN> <SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q?/SPAN> <SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">描述数据格式的数据?/SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">元数据在两个q行pȝ之间的集成中扮演着非常重要的角艌Ӏ一个处理实际的消息数据Q另外一个处理元数据。许多用于处理消息数据的模式也同样可以管理元数据。比如说Q?/SPAN><SPAN lang=EN-US style="COLOR: red">Channel Adapter</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">不仅可以从一个系l中U进和移出消息,q可以从一个外部应用中获取元数据,q将其加载到一个元数据仓库中。用这个仓库,集成开发者可以定义应用元数据?/SPAN><SPAN lang=EN-US style="COLOR: red">Canonical Data Model.</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">之间的{换?/SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p> </o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p> </o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">元数据集?/SPAN><SPAN lang=EN-US><o:p></o:p></SPAN></B></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p> </o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><?xml:namespace prefix = v ns = "urn:schemas-microsoft-com:vml" /><v:shapetype id=_x0000_t75 stroked="f" filled="f" path="m@4@5l@4@11@9@11@9@5xe" o:preferrelative="t" o:spt="75" coordsize="21600,21600"><v:stroke joinstyle="miter"></v:stroke><v:formulas><v:f eqn="if lineDrawn pixelLineWidth 0"></v:f><v:f eqn="sum @0 1 0"></v:f><v:f eqn="sum 0 0 @1"></v:f><v:f eqn="prod @2 1 2"></v:f><v:f eqn="prod @3 21600 pixelWidth"></v:f><v:f eqn="prod @3 21600 pixelHeight"></v:f><v:f eqn="sum @0 0 1"></v:f><v:f eqn="prod @6 1 2"></v:f><v:f eqn="prod @7 21600 pixelWidth"></v:f><v:f eqn="sum @8 21600 0"></v:f><v:f eqn="prod @7 21600 pixelHeight"></v:f><v:f eqn="sum @10 21600 0"></v:f></v:formulas><v:path o:connecttype="rect" gradientshapeok="t" o:extrusionok="f"></v:path><o:lock aspectratio="t" v:ext="edit"></o:lock></v:shapetype></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"><IMG height=267 alt=o_MT1.JPG src="http://www.aygfsteel.com/images/blogjava_net/flyingbug/2501/o_MT1.JPG" width=500 border=0><BR><BR>举例来说Q上面的图描qC(jin)两个需要交换客户信息的应用的集成。每个系l的客户数据的定义稍有不同。从</SPAN><SPAN lang=EN-US>A</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">?/SPAN><SPAN lang=EN-US>B</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的消息需要{换一下才能被</SPAN><SPAN lang=EN-US>B</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">接收。如?/SPAN><SPAN lang=EN-US style="COLOR: red">Channel Adapters</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">可以抽取元数据的话,创徏一个{换将非常单。然后这个元数据可以被放入一个仓库,大大的简化了(jin)</SPAN><SPAN lang=EN-US style="COLOR: red">Message Translator</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的配|和验证。元数据可以被存储成不同的格式。通常</SPAN><SPAN lang=EN-US>XML</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">消息使用</SPAN><SPAN lang=EN-US>XSD</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">格式。其?/SPAN><SPAN lang=EN-US>EAI</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">工具实现所有元数据格式Q但是允许管理员导入或导出到其他格式?/SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p> </o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">消息pȝ外的数据转换</SPAN><SPAN lang=EN-US><o:p></o:p></SPAN></B></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p> </o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">q些转换模式l成的很多原则可以被应用于非消息集成。比如说Q?/SPAN><SPAN lang=EN-US style="COLOR: red">File Transfer</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">可以执行pȝ间的转换工作。类似的Q?/SPAN><SPAN lang=EN-US style="COLOR: red">Remote Procedure Invocation</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">必须使请求用要调用?/SPAN><SPAN lang=EN-US>service</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的格式,即应用本n的格式可能不同。典型的Q需要调用程序来执行转换。一些最成熟的{换引擎组成了(jin)</SPAN><SPAN lang=EN-US>ETL</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">工具Q比?/SPAN><SPAN lang=EN-US>Informatica</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">或?/SPAN><SPAN lang=EN-US>DataMirror</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。这些工具一般都一ơ{换大量的数据Q而不是{换单个消息?/SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US>Message System</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">应专注于几种基本?/SPAN><SPAN lang=EN-US style="COLOR: red">Message Translator</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">模式。而不应该兛_(j)实体间结构{换的l节Q不同的数据模型之间的{换,比如</SPAN><SPAN lang=EN-US>ER</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">模型不支持多对多关系而其他的支持q种Q。关于这个主题最老也使最相关的书?/SPAN><SPAN lang=EN-US>Kent</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的?/SPAN><SPAN lang=EN-US>Data and Reality</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">》?/SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p> </o:p></SPAN></P><img src ="http://www.aygfsteel.com/flyingbug/aggbug/20836.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/flyingbug/" target="_blank">fisher</a> 2005-11-21 21:40 <a href="http://www.aygfsteel.com/flyingbug/archive/2005/11/21/20836.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>【ESB专题】之?Q?Message Construction?qing)其相关模?/title><link>http://www.aygfsteel.com/flyingbug/archive/2005/11/19/20589.html</link><dc:creator>fisher</dc:creator><author>fisher</author><pubDate>Sat, 19 Nov 2005 12:31:00 GMT</pubDate><guid>http://www.aygfsteel.com/flyingbug/archive/2005/11/19/20589.html</guid><wfw:comment>http://www.aygfsteel.com/flyingbug/comments/20589.html</wfw:comment><comments>http://www.aygfsteel.com/flyingbug/archive/2005/11/19/20589.html#Feedback</comments><slash:comments>5</slash:comments><wfw:commentRss>http://www.aygfsteel.com/flyingbug/comments/commentRss/20589.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/flyingbug/services/trackbacks/20589.html</trackback:ping><description><![CDATA[<BR> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">在前面的</SPAN><SPAN lang=EN-US><A HREF="/flyingbug/archive/2005/11/16/20147.html"><SPAN lang=EN-US style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"><SPAN lang=EN-US>关键lg</SPAN></SPAN></A></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">中我们提C(jin)</SPAN><SPAN lang=EN-US>Messages</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。当两个应用惌交换数据Q他们将数据包装在一?/SPAN><SPAN lang=EN-US>message</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">中。但是一?/SPAN><SPAN lang=EN-US>Message Channel</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">不能传输原始数据Q它只能传输包含在一?/SPAN><SPAN lang=EN-US>message</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">中的数据Q即传输特定格式的数据)(j)?/SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p> </o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US>Message</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">在消息系l中处于信息载体的位|,而在</SPAN><SPAN lang=EN-US>ESB</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">中,q消息识别、序列以?qing)生存周期等职责?/SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p> </o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US>Message</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的结构涉?qing)以下几个模式?x)</SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 21.0pt"><SPAN lang=EN-US style="FONT-FAMILY: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-family: Wingdings"><SPAN style="mso-list: Ignore">l<SPAN style="FONT: 7pt 'Times New Roman'">         </SPAN></SPAN></SPAN><SPAN lang=EN-US>Command Message<SPAN style="mso-tab-count: 1">       </SPAN></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 21.0pt"><SPAN lang=EN-US style="FONT-FAMILY: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-family: Wingdings"><SPAN style="mso-list: Ignore">l<SPAN style="FONT: 7pt 'Times New Roman'">         </SPAN></SPAN></SPAN><SPAN lang=EN-US>Document Message<SPAN style="mso-tab-count: 1">       </SPAN></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 21.0pt"><SPAN lang=EN-US style="FONT-FAMILY: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-family: Wingdings"><SPAN style="mso-list: Ignore">l<SPAN style="FONT: 7pt 'Times New Roman'">         </SPAN></SPAN></SPAN><SPAN lang=EN-US>Event Message</SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 21.0pt"><SPAN lang=EN-US style="FONT-FAMILY: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-family: Wingdings"><SPAN style="mso-list: Ignore">l<SPAN style="FONT: 7pt 'Times New Roman'">         </SPAN></SPAN></SPAN><SPAN lang=EN-US>Request-Reply<SPAN style="mso-tab-count: 1"> </SPAN></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 21.0pt"><SPAN lang=EN-US style="FONT-FAMILY: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-family: Wingdings"><SPAN style="mso-list: Ignore">l<SPAN style="FONT: 7pt 'Times New Roman'">         </SPAN></SPAN></SPAN><SPAN lang=EN-US>Return Address</SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 21.0pt"><SPAN lang=EN-US style="FONT-FAMILY: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-family: Wingdings"><SPAN style="mso-list: Ignore">l<SPAN style="FONT: 7pt 'Times New Roman'">         </SPAN></SPAN></SPAN><SPAN lang=EN-US>Correlation Identifier</SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 21.0pt"><SPAN lang=EN-US style="FONT-FAMILY: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-family: Wingdings"><SPAN style="mso-list: Ignore">l<SPAN style="FONT: 7pt 'Times New Roman'">         </SPAN></SPAN></SPAN><SPAN lang=EN-US>Message Sequence<SPAN style="mso-tab-count: 1"> </SPAN></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 21.0pt"><SPAN lang=EN-US style="FONT-FAMILY: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-family: Wingdings"><SPAN style="mso-list: Ignore">l<SPAN style="FONT: 7pt 'Times New Roman'">         </SPAN></SPAN></SPAN><SPAN lang=EN-US>Message Expiration<SPAN style="mso-tab-count: 1"> </SPAN></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 21.0pt"><SPAN lang=EN-US style="FONT-FAMILY: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-family: Wingdings"><SPAN style="mso-list: Ignore">l<SPAN style="FONT: 7pt 'Times New Roman'">         </SPAN></SPAN></SPAN><SPAN lang=EN-US>Format Indicator</SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p> </o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">创徏和发送一?/SPAN><SPAN lang=EN-US>Message</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">产生以下几个问题Q?/SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p> </o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="COLOR: red; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">消息意图</SPAN> <SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q?/SPAN><SPAN lang=EN-US> Message</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">最l是Z(jin)q送一些数据,但是发送者可能有其他目的Q比如它希望接受者用消息做些事情。它可以发送一?/SPAN><SPAN lang=EN-US style="COLOR: red">Command Message</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q指定它希望调用的接受者上的函数或Ҏ(gu)。发送者告诉接受者运行那些代码。发送者可以发送一?/SPAN><SPAN lang=EN-US style="COLOR: red">Document Message</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">来传送它的数据结构到接受者。发送者发送数据到接受者,但是不指定接受者应该做什么?/SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">或者它可以发送一?/SPAN><SPAN lang=EN-US style="COLOR: red">Event Message</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q通知接受者发送者那里有一个改变。发送者不应告诉接受者应该怎样适应q个改变Q而只应提供通知?/SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p> </o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="COLOR: red; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">q回一个应{?/SPAN> <SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q?/SPAN> <SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">当一个应用发送一个消息,它通常期望得到一个回应来定消息被处理ƈ提供一个结果。这是一?/SPAN><SPAN lang=EN-US style="COLOR: red">Request-Reply</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">场景?/SPAN><SPAN lang=EN-US>Request</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">通常是一?/SPAN><SPAN lang=EN-US style="COLOR: red">Command Message</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q而应{是一个包含返回值或异常?/SPAN><SPAN lang=EN-US style="COLOR: red">Document Message</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。请求者应该在h中指定一?/SPAN><SPAN lang=EN-US style="COLOR: red">Return Address</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">来告诉应{者用哪个通道来传回应{。请求者可能在一个处理过E中发送多个请求,所以应{应该包含一?/SPAN><SPAN lang=EN-US style="COLOR: red">Correlation Identifier</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">来指个应{对应哪个请求?/SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">有两?/SPAN><SPAN lang=EN-US style="COLOR: red">Request-Reply</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">场景需要注意;它们都包含了(jin)一?/SPAN><SPAN lang=EN-US style="COLOR: red">Command Message</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">h和一个对应的</SPAN><SPAN lang=EN-US style="COLOR: red">Document Message</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">应答。在W一个场景中Q?/SPAN><SPAN lang=EN-US>Message RPC</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q请求不但要调用应答者的函数Q而且期望一个返回倹{这?/SPAN><SPAN lang=EN-US>RPC</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。另一个场景中Q?/SPAN><SPAN lang=EN-US>Message Query</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q请求者执行一个查询;应答者执行查询ƈ在应{中q回l果。这是远E查询?/SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p> </o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="COLOR: red; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">大量的数?/SPAN> <SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q?/SPAN> <SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">有时应用惌传送大量的数据l构Q放入一个单独的</SPAN><SPAN lang=EN-US>message</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">里面不是很合适。在q种情况下,他们分解成可管理的消息块ƈ他们作?/SPAN><SPAN lang=EN-US style="COLOR: red">Message Sequence</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">发送。这些消息必L序发送,以便接受者能够充_始数据结构?/SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p> </o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="COLOR: red; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">慢速消?/SPAN> <SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q?/SPAN> <SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">消息pȝ的一个问题是发送者通常不知道接受者要多久才能接受到消息。然而,消息的内容可能是旉敏感的,所以如果消息在某一旉内没有被接受Q它?yu)被忽略q取消。在q种情况下,</SPAN><SPAN lang=EN-US>sender</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">应该使用</SPAN><SPAN lang=EN-US style="COLOR: red">Message Expiration</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">来指定一个到期时间。如果消息系l在规定旉内无法传输一个消息,应该它取消q删除到</SPAN><SPAN lang=EN-US style="COLOR: red">Dead Letter Channel</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">中。同L(fng)一?/SPAN><SPAN lang=EN-US>receiver</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">接受C个超旉点的消息Q也要取消该消息?/SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p> </o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">MQ只选择使用消息是不够的。一个消息工作的其他军_性因素来自于消息所要完成的d?/SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p> </o:p></SPAN></P><img src ="http://www.aygfsteel.com/flyingbug/aggbug/20589.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/flyingbug/" target="_blank">fisher</a> 2005-11-19 20:31 <a href="http://www.aygfsteel.com/flyingbug/archive/2005/11/19/20589.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>【ESB专题】之?Q?Message Channel?qing)其相关模?/title><link>http://www.aygfsteel.com/flyingbug/archive/2005/11/17/20316.html</link><dc:creator>fisher</dc:creator><author>fisher</author><pubDate>Thu, 17 Nov 2005 14:56:00 GMT</pubDate><guid>http://www.aygfsteel.com/flyingbug/archive/2005/11/17/20316.html</guid><wfw:comment>http://www.aygfsteel.com/flyingbug/comments/20316.html</wfw:comment><comments>http://www.aygfsteel.com/flyingbug/archive/2005/11/17/20316.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.aygfsteel.com/flyingbug/comments/commentRss/20316.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/flyingbug/services/trackbacks/20316.html</trackback:ping><description><![CDATA[<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p> </o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p> </o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">在前面一个专题中Q我们列Z(jin)一?/SPAN><SPAN lang=EN-US>ESB</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">pȝ所需要关?j)的所有方面的关键lgQ这里介l其中的</SPAN><SPAN lang=EN-US>Message Channels</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">所x的问题及(qing)相关的模式?/SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p> </o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US>Message Channel</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">主题之下包含以下模式Q分别用于解?/SPAN><SPAN lang=EN-US>channel</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">中不同方面的问题Q?/SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p> </o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 21.0pt"><SPAN lang=EN-US style="FONT-FAMILY: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-family: Wingdings"><SPAN style="mso-list: Ignore">l<SPAN style="FONT: 7pt 'Times New Roman'">         </SPAN></SPAN></SPAN><SPAN lang=EN-US>Point-to-Point Channel<SPAN style="mso-tab-count: 1">   </SPAN></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 21.0pt"><SPAN lang=EN-US style="FONT-FAMILY: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-family: Wingdings"><SPAN style="mso-list: Ignore">l<SPAN style="FONT: 7pt 'Times New Roman'">         </SPAN></SPAN></SPAN><SPAN lang=EN-US>Publish-Subscribe Channel<SPAN style="mso-tab-count: 1">    </SPAN></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 21.0pt"><SPAN lang=EN-US style="FONT-FAMILY: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-family: Wingdings"><SPAN style="mso-list: Ignore">l<SPAN style="FONT: 7pt 'Times New Roman'">         </SPAN></SPAN></SPAN><SPAN lang=EN-US>Datatype Channel<SPAN style="mso-tab-count: 1">   </SPAN></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 21.0pt"><SPAN lang=EN-US style="FONT-FAMILY: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-family: Wingdings"><SPAN style="mso-list: Ignore">l<SPAN style="FONT: 7pt 'Times New Roman'">         </SPAN></SPAN></SPAN><SPAN lang=EN-US>Invalid Message Channel<SPAN style="mso-tab-count: 1">       </SPAN></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 21.0pt"><SPAN lang=EN-US style="FONT-FAMILY: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-family: Wingdings"><SPAN style="mso-list: Ignore">l<SPAN style="FONT: 7pt 'Times New Roman'">         </SPAN></SPAN></SPAN><SPAN lang=EN-US>Dead Letter Channel<SPAN style="mso-tab-count: 1">      </SPAN></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 21.0pt"><SPAN lang=EN-US style="FONT-FAMILY: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-family: Wingdings"><SPAN style="mso-list: Ignore">l<SPAN style="FONT: 7pt 'Times New Roman'">         </SPAN></SPAN></SPAN><SPAN lang=EN-US>Guaranteed Delivery<SPAN style="mso-tab-count: 1">      </SPAN></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 21.0pt"><SPAN lang=EN-US style="FONT-FAMILY: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-family: Wingdings"><SPAN style="mso-list: Ignore">l<SPAN style="FONT: 7pt 'Times New Roman'">         </SPAN></SPAN></SPAN><SPAN lang=EN-US>Channel Adapter<SPAN style="mso-tab-count: 1">     </SPAN></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 21.0pt"><SPAN lang=EN-US style="FONT-FAMILY: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-family: Wingdings"><SPAN style="mso-list: Ignore">l<SPAN style="FONT: 7pt 'Times New Roman'">         </SPAN></SPAN></SPAN><SPAN lang=EN-US>Messaging Bridge<SPAN style="mso-tab-count: 1">   </SPAN></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 21.0pt"><SPAN lang=EN-US style="FONT-FAMILY: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-family: Wingdings"><SPAN style="mso-list: Ignore">l<SPAN style="FONT: 7pt 'Times New Roman'">         </SPAN></SPAN></SPAN><SPAN lang=EN-US>Message Bus<SPAN style="mso-tab-count: 1">   </SPAN></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p> </o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p> </o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">当两个应用需要交换数据,它们通过q接两端?/SPAN><SPAN lang=EN-US>channel</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">来发送数据。发送的应用可能不知道哪个应用将接受数据。然而,通过选择特定?/SPAN><SPAN lang=EN-US>channel</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">来发送,发送者知道接受者将是守候在</SPAN><SPAN lang=EN-US>channel</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">另一端等待数据的应用之一。通过q种方式Q生产数据的应用有了(jin)一个同数据消费者通讯的途径?/SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p> </o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><B style="mso-bidi-font-weight: normal"><SPAN lang=EN-US>Message Channels</SPAN></B><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">面对的各个主要问题:(x)</SPAN><SPAN lang=EN-US><o:p></o:p></SPAN></B></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p> </o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">如果一个应用要传输或接受数据,它一定会(x)用到一?/SPAN><SPAN lang=EN-US>channel</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。问题是你的应用要知道要使用什么样?/SPAN><SPAN lang=EN-US>channel</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q以?qing)用它来做什么?/SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p> </o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="COLOR: red; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">固定?/SPAN><SPAN lang=EN-US style="COLOR: red">channel</SPAN><SPAN style="COLOR: red; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">集合</SPAN> <SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q?/SPAN> <SPAN lang=EN-US>Channel</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">中讨论的一个主题是Q一个应用可用的</SPAN><SPAN lang=EN-US>Message Channel</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">集合一般是固定的。设计一个应用时Q一个开发者必ȝ道将某种cd的数据放到哪里可以同其他应用׃n该数据,以及(qing)从什么地方可以找到其他应用的特定数据。这些通讯路径不会(x)在运行期动态的创徏和发玎ͼ它们需要在设计期间q定下来,以便应用知道它的数据从哪里来以及(qing)数据去哪里。(</SPAN> <SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">虽然大多?/SPAN><SPAN lang=EN-US>channel</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">必须被静(rn)态定义正确的,但是也有例外Q有些情况下动?/SPAN><SPAN lang=EN-US>channel</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">是很好用的。一个例外就?/SPAN><SPAN lang=EN-US style="COLOR: red">Request-Reply</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">模式中的</SPAN><SPAN lang=EN-US>reply channel</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。请求者可以创建或者获得一个应{者不知道的新?/SPAN><SPAN lang=EN-US>channel</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Qƈ在请求消息中指定?/SPAN><SPAN lang=EN-US>channel</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">?/SPAN><SPAN lang=EN-US style="COLOR: red">Return Address</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q应{者就可以使用它。另外一个例外是支持集成</SPAN><SPAN lang=EN-US>channels</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的消息系l实现。一个接受者可以订阅一个集成体pȝ?/SPAN><SPAN lang=EN-US>channel</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q然后发送者可以发布消息到一个子</SPAN><SPAN lang=EN-US>channel</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q而接受者不需要知道子</SPAN><SPAN lang=EN-US>channel</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q仍然会(x)收到消息。这些都是不常见的情况,</SPAN><SPAN lang=EN-US>channel</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">通常仍然是在部v之前被定义,q且应用被设计连接到一个已知的</SPAN><SPAN lang=EN-US>channel</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">集合</SPAN> <SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q?/SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p> </o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="COLOR: red; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">军_</SPAN><SPAN lang=EN-US style="COLOR: red">channel</SPAN><SPAN style="COLOR: red; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的集?/SPAN> <SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q?/SPAN> <SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">一个相关的主题是,谁决定那?/SPAN><SPAN lang=EN-US>Message Channel</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">是可用的</SPAN> <SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q?/SPAN><SPAN lang=EN-US> message</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">pȝq是应用E序Q换句话_(d)是由消息pȝ定一?/SPAN><SPAN lang=EN-US>channel</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q然后要求应用程序用它们?q是应用军_它们需要什?/SPAN><SPAN lang=EN-US>channel</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q然后要求消息系l提供它们?q个问题没有一个简单的{案Q设计必ȝ</SPAN><SPAN lang=EN-US>channel</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">集合是P代的。首先,应用要决定消息系l提供哪?/SPAN><SPAN lang=EN-US>channel</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。然后应用将围绕q些</SPAN><SPAN lang=EN-US>channel</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">设计它们的通讯Q但是如果这h不可行的Q它们将需要添加额外的</SPAN><SPAN lang=EN-US>channel</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。当一些应用已l用了(jin)一个确定的</SPAN><SPAN lang=EN-US>channel</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">集合Q当加入新的应用Q它们将使用已存在的</SPAN><SPAN lang=EN-US>channel</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。当为应用添加新的功能,它们需要新?/SPAN><SPAN lang=EN-US>channel</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">?/SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p> </o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="COLOR: red; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">单向</SPAN><SPAN lang=EN-US style="COLOR: red">channel</SPAN><SPAN lang=EN-US> </SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q?/SPAN> <SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">另外一个经常引h؜淆的是一?/SPAN><SPAN lang=EN-US>Message channel</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">是单向的q是双向的。技术上来说Q两者都不是Q一?/SPAN><SPAN lang=EN-US>channel</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">更像是一个桶Q一个应用放入数据,另外一个应用从中取出数据。但是由于数据是攑֜消息中从一个应用传到另一个,q?/SPAN><SPAN lang=EN-US>channel</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">h方向性,使它变成单向的。如果一?/SPAN><SPAN lang=EN-US>channel</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">是双向的Q应用将从中发送和接受数据Q虽然技术上是可行的Q但是会(x)有小的问题Q应用将有可能持l的取出自己放进ȝ希望发送给其他应用的消息。所以,Z(jin)实践性的目的Q?/SPAN><SPAN lang=EN-US>channel</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">是单向的?SPAN style="COLOR: red">作ؓ(f)l论Q两个应用如果有双向通讯Q它们需要两?/SPAN></SPAN><SPAN lang=EN-US style="COLOR: red">channel</SPAN><SPAN style="COLOR: red; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q每个方向一?/SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">?/SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p> </o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">如何使用</SPAN><SPAN lang=EN-US>Message channels</SPAN></B><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q?/SPAN><SPAN lang=EN-US><o:p></o:p></SPAN></B></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p> </o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">现在我们来讨Z下如何?/SPAN><SPAN lang=EN-US>channel</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">?/SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p> </o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="COLOR: red; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">一对一或者一对多</SPAN> <SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q?/SPAN> <SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">当你的应用共享一些数据,你希望只它׃nl一个应用还是对它感兴趣的所有应用?要传送数据到一个单独的应用Q?/SPAN><SPAN lang=EN-US style="COLOR: red">Point-to-Point Channel</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。这q不意味着发送到q个</SPAN><SPAN lang=EN-US>channel</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的每个数据都发送给同样的接受者,因ؓ(f)一?/SPAN><SPAN lang=EN-US>channel</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">可能有多个接受者。它意味着Q实际上Q保证每个数据都被同一个应用接收。如果你惌所有接收应用都能接收数据,使用</SPAN><SPAN lang=EN-US style="COLOR: red">Publish-Subscribe Channel</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。当你通过q种方式发送数据,</SPAN><SPAN lang=EN-US>channel</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">高效的复制数据到每一个接收者?/SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p> </o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="COLOR: red; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">什么类型的数据</SPAN> <SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q?/SPAN> <SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">M内存中的数据都有一个类型。另一斚wQ所有数据都是一?/SPAN><SPAN lang=EN-US>bytes</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">集合。消息系l工作同q类|消息内容必须W合某些cd以便接受者了(jin)解数据的l构?/SPAN><SPAN lang=EN-US style="COLOR: red">Datatype Channel</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">认ؓ(f)在一?/SPAN><SPAN lang=EN-US>channel</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">中的数据必须拥有同样的类型?SPAN style="COLOR: red">q也是ؓ(f)什么消息系l需要很?/SPAN></SPAN><SPAN lang=EN-US style="COLOR: red">channel</SPAN><SPAN style="COLOR: red; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的主要原?/SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q每?/SPAN><SPAN lang=EN-US>channel</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">一U格式)(j)。如果数据可以是L的格式,那么消息pȝ在两个应用之间只需要两?/SPAN><SPAN lang=EN-US>channel</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">?/SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p> </o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="COLOR: red; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">无效的和q期的消?/SPAN> <SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q?/SPAN> <SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">消息pȝ可以定消息被正的传输Q但是它不能保证接受者知道如何处理它。接收者对数据格式和意义存在期望。当它接收到一个不W合期望的消息,它什么也不能做。它们能作的Q就是将q个陌生的消息放入到一个特别设计的</SPAN><SPAN lang=EN-US style="COLOR: red">Invalid Message Channel</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">q希望某些监控这?/SPAN><SPAN lang=EN-US>channel</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的工兯够取个消息,q指如何处置它们。许多消息系l有一个类似的内徏特征Q一?/SPAN><SPAN lang=EN-US style="COLOR: red">Dead Letter Channel</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q用来存放成功送出但却无法成功投递的消息。另外,一个系l管理工具应该监?/SPAN><SPAN lang=EN-US style="COLOR: red">Dead Letter Channel</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">q且军_如何处置q些无法投递的消息?/SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p> </o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="COLOR: red; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">故障(g)?/SPAN> <SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q?/SPAN> <SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">如果一个消息系l发生故障或停机l护Q它的消息会(x)怎样Q当它重启ƈ重新q行Q它的消息能否还在它?/SPAN><SPAN lang=EN-US>channel</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">中?默认的:(x)不会(x)Q?/SPAN><SPAN lang=EN-US>channel</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">消息存储在内存中。然而,</SPAN><SPAN lang=EN-US style="COLOR: red">Guaranteed Delivery</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">?/SPAN><SPAN lang=EN-US>channel</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">持久化以便将它们的消息存储到盘上。这?x)?jing)响效率,但会(x)使消息更加可靠,即消息pȝ是不可靠的?/SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p> </o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="COLOR: red; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">非消息客L(fng)</SPAN> <SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q?/SPAN> <SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">如果一个应用不能连接到一个消息系l但是仍然想要参与消息怎么办?通常它只能自认倒霉?jin),但是如果消息pȝ可以通过某种方式q接到应用系l?/SPAN> <SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q?/SPAN> <SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">通过它的用户界面Q它?/SPAN><SPAN lang=EN-US>service API</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q它的数据库Q或者一?/SPAN><SPAN lang=EN-US>TCP/IP</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">?/SPAN><SPAN lang=EN-US>HTTP</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">q样的网l连?/SPAN> <SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q?/SPAN> <SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">那么消息pȝ可以使用一?/SPAN><SPAN lang=EN-US style="COLOR: red">Channel Adapter</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。这允许你连接到一个或多个q接到应用的</SPAN><SPAN lang=EN-US>channel</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">而不必改变应用或者可能也不需要一个同应用q行在同一个机器上的消息客L(fng)。有时‘非消息客户端’真的是一个消息客L(fng)Q但是只有连接的是其他消息系l的时候?/SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p> </o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="COLOR: red; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">通讯中枢</SPAN> <SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q?/SPAN> <SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">随着来多的企业应用系l连接到消息pȝ以便通过消息暴露他们的功能,消息pȝ变成?jin)企业中一站式功能的集散地。一个应用只需单的知道用哪?/SPAN><SPAN lang=EN-US>channel</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">来请求功能,以及(qing)从哪个监听结果。消息系l本质上变成一个消息ȝQ一个提供所有企业应用甚臛_化中的应用和功能的中枢。你可以更快速的集成?/SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p> </o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">如你所见,使用消息构徏应用不仅仅是他们连接到消息pȝq发送消息。消息必M?/SPAN><SPAN lang=EN-US>Message Channel</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">来发送?/SPAN><SPAN lang=EN-US>Channel</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">必须被设计ؓ(f)某个目的服务Q比如基于被׃n的数据类型,׃n数据的应用类型,和接收数据的应用?/SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p> </o:p></SPAN></P><img src ="http://www.aygfsteel.com/flyingbug/aggbug/20316.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/flyingbug/" target="_blank">fisher</a> 2005-11-17 22:56 <a href="http://www.aygfsteel.com/flyingbug/archive/2005/11/17/20316.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>【ESB专题】-面向消息的EAI的关键组?/title><link>http://www.aygfsteel.com/flyingbug/archive/2005/11/16/20147.html</link><dc:creator>fisher</dc:creator><author>fisher</author><pubDate>Wed, 16 Nov 2005 12:56:00 GMT</pubDate><guid>http://www.aygfsteel.com/flyingbug/archive/2005/11/16/20147.html</guid><wfw:comment>http://www.aygfsteel.com/flyingbug/comments/20147.html</wfw:comment><comments>http://www.aygfsteel.com/flyingbug/archive/2005/11/16/20147.html#Feedback</comments><slash:comments>5</slash:comments><wfw:commentRss>http://www.aygfsteel.com/flyingbug/comments/commentRss/20147.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/flyingbug/services/trackbacks/20147.html</trackback:ping><description><![CDATA[<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p> </o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">企业集成有很多种模式Q随着技术的发展Q实时的、面向消息的企业集成来成Z,面向消息的企业集成的E_性和兼容性要求其基础Ӟ也就?/SPAN><SPAN lang=EN-US>message</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">pȝ必须提供_强壮和可扩展的设计,下面几种是作为面向消息的企业集成的基件所必须提供的几个关键性组件?/SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p> </o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">消息集成使得</SPAN><SPAN lang=EN-US>message</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">pȝ负责转换两个应用之间的数据格式,从而得应用可以专注于他们需要共享什么数据而不是如何共享它们?/SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p> <BR></o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p>以下q些lgQ在著名的ESBpȝMule中都可以见到Q有兴趣的同学可以去看看Mule的源代码Q虽然Mule对ESB的实现有很多不成熟的地方Q以至于让我不敢在生产系l中使用Q唉...可恨的MuleQ,但是毕竟是一个大而全的系l,值得借鉴一下?BR> </o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="COLOR: red">Channels </SPAN><SPAN lang=EN-US>?Messaging</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">应用通过一?/SPAN><SPAN lang=EN-US>Message Channel</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">传送数据,一?/SPAN><SPAN lang=EN-US>sender</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">?/SPAN><SPAN lang=EN-US>receiver</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的虚拟管道。一个新安装的消息系l默认不包含M</SPAN><SPAN lang=EN-US>channel</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q你必须知道你的应用需要怎样通讯Q然后才能徏?/SPAN><SPAN lang=EN-US>channel</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">来完成它?/SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p> </o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="COLOR: red">Messages </SPAN><SPAN lang=EN-US>?Message</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">是在</SPAN><SPAN lang=EN-US>channel</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">上传输的不可分割的包。因此,Z(jin)传输数据Q应用必d数据打包成一个或多个</SPAN><SPAN lang=EN-US>packets</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q将每个</SPAN><SPAN lang=EN-US>packet</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">包装成一?/SPAN><SPAN lang=EN-US>message</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q然后将其传输到一?/SPAN><SPAN lang=EN-US>channel</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。同L(fng)Q一?/SPAN><SPAN lang=EN-US>receiver</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">应用在接受到</SPAN><SPAN lang=EN-US>message</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">后必M</SPAN><SPAN lang=EN-US>message</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">中提取出数据才能使用?/SPAN><SPAN lang=EN-US style="COLOR: red">Message</SPAN><SPAN style="COLOR: red; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">pȝ应该能重复的传输</SPAN><SPAN lang=EN-US style="COLOR: red">message</SPAN><SPAN style="COLOR: red; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q直到它成功为止?/SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p> </o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="COLOR: red">Pipes and Filters </SPAN><SPAN lang=EN-US>?</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">最单的情况下,</SPAN><SPAN lang=EN-US>message</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">pȝ一个消息直接从</SPAN><SPAN lang=EN-US>sender</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">计算Z送到</SPAN><SPAN lang=EN-US>receiver</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">计算机。然而,通常在消息从</SPAN><SPAN lang=EN-US>sender</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">中发出后Q?/SPAN><SPAN lang=EN-US>receiver</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">接受C前,有一些动作需要对</SPAN><SPAN lang=EN-US>message</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">执行。D例来_(d)</SPAN><SPAN lang=EN-US>message</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">也许需要验证或者{换?/SPAN><SPAN lang=EN-US>Pipes and Filters</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">架构使用</SPAN><SPAN lang=EN-US>channel</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">多个处理步骤连接v来?/SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p> </o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="COLOR: red">Routing </SPAN><SPAN lang=EN-US>?</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">在一个大型的、拥有许多不同的应用?/SPAN><SPAN lang=EN-US>channel</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">q接的企业应用中Q一?/SPAN><SPAN lang=EN-US>message</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">可能需要穿q多?/SPAN><SPAN lang=EN-US>channel</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">才能到达最l目的地?/SPAN><SPAN lang=EN-US>Message</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的\由如此复杂以至于最初的发送者无法知道那?/SPAN><SPAN lang=EN-US>channel</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">能将</SPAN><SPAN lang=EN-US>message</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">传送给最l的</SPAN><SPAN lang=EN-US>receiver</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。因此,最初的发送者将</SPAN><SPAN lang=EN-US>message</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">发送给一?/SPAN><SPAN lang=EN-US>Message Router</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q一个以</SPAN><SPAN lang=EN-US>Pipes and Filters</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">架构中的</SPAN><SPAN lang=EN-US>filter</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">形式存在的应用组件?/SPAN><SPAN lang=EN-US>Router</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">决定如何将</SPAN><SPAN lang=EN-US>message</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">发送到最l?/SPAN><SPAN lang=EN-US>receiver</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">或者至是下一?/SPAN><SPAN lang=EN-US>Router</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">?/SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p> </o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="COLOR: red">Transformation </SPAN><SPAN lang=EN-US>?</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">不同的应用的数据格式可能不同。ؓ(f)?jin)调?/SPAN><SPAN lang=EN-US>sender</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">?/SPAN><SPAN lang=EN-US>receiver</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">之间的数据格式不同的问题Q?/SPAN><SPAN lang=EN-US>message</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">必须l过一个中介的</SPAN><SPAN lang=EN-US>filter</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q一?/SPAN><SPAN lang=EN-US>Message Translator</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q它?yu)?/SPAN><SPAN lang=EN-US>message</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">从一个格式{换成另外一个格式,或{换成一个公q格式?/SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p> </o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="COLOR: red">Endpoints </SPAN><SPAN lang=EN-US>?</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">大多数的应用E序没有内徏的能力来同一?/SPAN><SPAN lang=EN-US>message</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">pȝ交互。因此他们必d含一个中间层Q它知道应用pȝ如何工作Q也知道</SPAN><SPAN lang=EN-US>message</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">pȝ如何工作Qƈ桥接两个pȝ。这个系l是一lƈ列的</SPAN><SPAN lang=EN-US>Message Endpoints</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q它能够使得应用发送和接受</SPAN><SPAN lang=EN-US>message</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">?/SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p> </o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="COLOR: red">System manager </SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q?/SPAN> <SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">作ؓ(f)一个大型的消息集成pȝQ其面向消息的、异步、低耦合的本质得系l更加难以调试,q行期的状态也难以跟踪Q所以,我们必须有强有力的手D进行系l的q行期管理和监控Q同时最好能够在q行q行动态更斎ͼ以保障系l的强壮性?BR><BR><BR>企业应用集成是一个巨大而复杂的pȝQ作为其基础件ESBpȝQ必能够提供对其完全的支撑以及(qing)_强壮的系l,q正是ESBpȝ的难度所在?/SPAN></P><img src ="http://www.aygfsteel.com/flyingbug/aggbug/20147.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/flyingbug/" target="_blank">fisher</a> 2005-11-16 20:56 <a href="http://www.aygfsteel.com/flyingbug/archive/2005/11/16/20147.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>在webwork中用自定义的Result生成动态验证图?/title><link>http://www.aygfsteel.com/flyingbug/archive/2005/11/15/19960.html</link><dc:creator>fisher</dc:creator><author>fisher</author><pubDate>Tue, 15 Nov 2005 13:14:00 GMT</pubDate><guid>http://www.aygfsteel.com/flyingbug/archive/2005/11/15/19960.html</guid><wfw:comment>http://www.aygfsteel.com/flyingbug/comments/19960.html</wfw:comment><comments>http://www.aygfsteel.com/flyingbug/archive/2005/11/15/19960.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.aygfsteel.com/flyingbug/comments/commentRss/19960.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/flyingbug/services/trackbacks/19960.html</trackback:ping><description><![CDATA[<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">q个动态图片的实现原理是在servlet的response中写入一个ImageOutputStreamQƈ由servlet容器其转成囄Q在非webwork的实CQ可以直接操作responseQ但是在webwork中,要想直接操作response的output则必M用不需要对response操作的resultcd<BR><BR>实现一?/SPAN><SPAN lang=EN-US>Result</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q?/SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p> </o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">不可以用普通的</SPAN><SPAN lang=EN-US>dispatcherResult</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">?/SPAN><SPAN lang=EN-US>response</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">?/SPAN><SPAN lang=EN-US>outputStream</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">中写入东西,否则覆盖所有的</SPAN><SPAN lang=EN-US>dispatcher</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">?/SPAN><SPAN lang=EN-US>jsp</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">面<BR></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p><FONT color=#ff0000>上次的代码忘记加上response的设|不~存?jin),q样即使用IE的回退也会(x)h囄</FONT> <BR></P> <DIV style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><SPAN style="COLOR: #000000">    </SPAN><SPAN style="COLOR: #0000ff">private</SPAN><SPAN style="COLOR: #000000"> HttpSession            session;<BR><BR>    </SPAN><SPAN style="COLOR: #008000">/**</SPAN><SPAN style="COLOR: #008000"><BR>     * </SPAN><SPAN style="COLOR: #808080">@see</SPAN><SPAN style="COLOR: #008000"> com.opensymphony.webwork.dispatcher.WebWorkResultSupport#doExecute(java.lang.String,<BR>     *      com.opensymphony.xwork.ActionInvocation)<BR>     </SPAN><SPAN style="COLOR: #008000">*/</SPAN><SPAN style="COLOR: #000000"><BR>    @Override<BR>    </SPAN><SPAN style="COLOR: #0000ff">protected</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">void</SPAN><SPAN style="COLOR: #000000"> doExecute(String finalLocation, ActionInvocation invocation) </SPAN><SPAN style="COLOR: #0000ff">throws</SPAN><SPAN style="COLOR: #000000"> Exception<BR>    {<BR>        HttpServletRequest request </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> (HttpServletRequest) invocation.getInvocationContext().get(<BR>                ServletActionContext.HTTP_REQUEST);<BR>        HttpServletResponse response </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> (HttpServletResponse) invocation.getInvocationContext().get(<BR>                ServletActionContext.HTTP_RESPONSE);<BR>        response.setHeader(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">Pragma</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">, </SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">No-cache</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">);<BR>        response.setHeader(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">Cache-Control</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">, </SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">no-cache</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">);<BR>        response.setDateHeader(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">Expires</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">, </SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">);<BR>        VerifyImage verify </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000"> VerifyImage();<BR>        OutputStream os </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> response.getOutputStream();<BR>        String str </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> verify.GetImage(os);<BR>        session </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> request.getSession(</SPAN><SPAN style="COLOR: #0000ff">true</SPAN><SPAN style="COLOR: #000000">);<BR>        session.setAttribute(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">rand</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">, str);<BR>    }</SPAN></DIV> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><BR></o:p></SPAN><SPAN lang=EN-US><o:p> </o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">?/SPAN><SPAN lang=EN-US>xwork.xml</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">中配|?/SPAN><SPAN lang=EN-US>result-type</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q?/SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: black; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: white"><SPAN style="mso-spacerun: yes">        </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: #000096; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: white"><result-types></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: black; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: white"><SPAN style="mso-spacerun: yes">            </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: #000096; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: white"><result-type</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: #f5844c; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: white"> name</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: #ff8040; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: white">=</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: #993300; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: white">"image"</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: #f5844c; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: white"> <o:p></o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: #f5844c; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: white"><SPAN style="mso-tab-count: 4">              </SPAN>class</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: #ff8040; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: white">=</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: #993300; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: white">"com.bnt.afp.action.verify.ImageResult"</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: #000096; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: white">/></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: black; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: white"><SPAN style="mso-spacerun: yes">        </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: #000096; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: white"></result-types></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: #000096; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: #000096; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt"><o:p> </o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">d一个生成图片的</SPAN><SPAN lang=EN-US>action</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q?/SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: black; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: white"><SPAN style="mso-spacerun: yes">        </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: #000096; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: white"><action</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: #f5844c; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: white"> name</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: #ff8040; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: white">=</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: #993300; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: white">"imageAction"</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: #f5844c; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: white"><o:p></o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 63pt; TEXT-INDENT: 21pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: #f5844c; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: white">class</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: #ff8040; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: white">=</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: #993300; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: white">"com.bnt.afp.action.verify.ImageAction"</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: #000096; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: white">></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align=left><SPAN lang=EN-US style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: black; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: white"><SPAN style="mso-spacerun: yes">            </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: #000096; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: white"><result</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: #f5844c; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: white"> name</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: #ff8040; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: white">=</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: #993300; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: white">"success"</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: #f5844c; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: white"> type</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: #ff8040; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: white">=</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: #993300; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: white">"image"/</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: #000096; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: white">></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: black; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: white"><SPAN style="mso-spacerun: yes">        </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: #000096; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: white"></action></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: #000096; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p> </o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">在需要生成验证图片的地方q样调用Q?/SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><img border=0 src="imageAction.action"><BR></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p><BR> ImageAction里只要简单的q回SUCCESS可以了(jin)<BR></o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US></P> <DIV style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><SPAN style="COLOR: #000000">    </SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000"> String execute() </SPAN><SPAN style="COLOR: #0000ff">throws</SPAN><SPAN style="COLOR: #000000"> IOException<BR>    {<BR>        </SPAN><SPAN style="COLOR: #0000ff">return</SPAN><SPAN style="COLOR: #000000"> SUCCESS;<BR>    }</SPAN></DIV> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><BR><BR>VerifyImage</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">中生成图片的Ҏ(gu)Q(来自|上一?/SPAN><SPAN lang=EN-US>JSP</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">生成动态验证图片的实例Q?BR><BR></P> <DIV style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><SPAN style="COLOR: #000000">       </SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">获取生成的图?q回生成的验证码QƈImageOutputStream写入</SPAN><SPAN style="COLOR: #008000"><BR></SPAN><SPAN style="COLOR: #000000"><BR>       </SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000"> String GetImage(OutputStream outputStream){<BR><BR>              <BR><BR>              </SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000"> width</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">60</SPAN><SPAN style="COLOR: #000000">, height</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">20</SPAN><SPAN style="COLOR: #000000">;<BR><BR>              BufferedImage image </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000"> BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);<BR><BR>              Graphics g </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> image.getGraphics();<BR><BR>              Random random </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000"> Random();<BR><BR>              g.setColor(getRandColor(</SPAN><SPAN style="COLOR: #000000">200</SPAN><SPAN style="COLOR: #000000">,</SPAN><SPAN style="COLOR: #000000">250</SPAN><SPAN style="COLOR: #000000">));<BR><BR>              g.fillRect(</SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">, </SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">, width, height);<BR><BR>              g.setFont(</SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000"> Font(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">Times New Roman</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">,Font.PLAIN,</SPAN><SPAN style="COLOR: #000000">18</SPAN><SPAN style="COLOR: #000000">));<BR><BR>              <BR><BR>              g.setColor(getRandColor(</SPAN><SPAN style="COLOR: #000000">160</SPAN><SPAN style="COLOR: #000000">,</SPAN><SPAN style="COLOR: #000000">200</SPAN><SPAN style="COLOR: #000000">));<BR><BR>              </SPAN><SPAN style="COLOR: #0000ff">for</SPAN><SPAN style="COLOR: #000000"> (</SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000"> i</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">;i</SPAN><SPAN style="COLOR: #000000"><</SPAN><SPAN style="COLOR: #000000">155</SPAN><SPAN style="COLOR: #000000">;i</SPAN><SPAN style="COLOR: #000000">++</SPAN><SPAN style="COLOR: #000000">)<BR><BR>              {<BR><BR>                     </SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000"> x </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> random.nextInt(width);<BR><BR>                     </SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000"> y </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> random.nextInt(height);<BR><BR>                     </SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000"> xl </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> random.nextInt(</SPAN><SPAN style="COLOR: #000000">12</SPAN><SPAN style="COLOR: #000000">);<BR><BR>                     </SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000"> yl </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> random.nextInt(</SPAN><SPAN style="COLOR: #000000">12</SPAN><SPAN style="COLOR: #000000">);<BR><BR>                     g.drawLine(x,y,x</SPAN><SPAN style="COLOR: #000000">+</SPAN><SPAN style="COLOR: #000000">xl,y</SPAN><SPAN style="COLOR: #000000">+</SPAN><SPAN style="COLOR: #000000">yl);<BR><BR>              }<BR><BR>              String sRand</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">""</SPAN><SPAN style="COLOR: #000000">;<BR><BR>              </SPAN><SPAN style="COLOR: #0000ff">for</SPAN><SPAN style="COLOR: #000000"> (</SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000"> i</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">;i</SPAN><SPAN style="COLOR: #000000"><</SPAN><SPAN style="COLOR: #000000">4</SPAN><SPAN style="COLOR: #000000">;i</SPAN><SPAN style="COLOR: #000000">++</SPAN><SPAN style="COLOR: #000000">){<BR><BR>                  String rand</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">String.valueOf(random.nextInt(</SPAN><SPAN style="COLOR: #000000">10</SPAN><SPAN style="COLOR: #000000">));<BR><BR>                  sRand</SPAN><SPAN style="COLOR: #000000">+=</SPAN><SPAN style="COLOR: #000000">rand;<BR><BR>                  g.setColor(</SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000"> Color(</SPAN><SPAN style="COLOR: #000000">20</SPAN><SPAN style="COLOR: #000000">+</SPAN><SPAN style="COLOR: #000000">random.nextInt(</SPAN><SPAN style="COLOR: #000000">110</SPAN><SPAN style="COLOR: #000000">),</SPAN><SPAN style="COLOR: #000000">20</SPAN><SPAN style="COLOR: #000000">+</SPAN><SPAN style="COLOR: #000000">random.nextInt(</SPAN><SPAN style="COLOR: #000000">110</SPAN><SPAN style="COLOR: #000000">),</SPAN><SPAN style="COLOR: #000000">20</SPAN><SPAN style="COLOR: #000000">+</SPAN><SPAN style="COLOR: #000000">random.nextInt(</SPAN><SPAN style="COLOR: #000000">110</SPAN><SPAN style="COLOR: #000000">)));<BR><BR>g.drawString(rand,</SPAN><SPAN style="COLOR: #000000">13</SPAN><SPAN style="COLOR: #000000">*</SPAN><SPAN style="COLOR: #000000">i</SPAN><SPAN style="COLOR: #000000">+</SPAN><SPAN style="COLOR: #000000">6</SPAN><SPAN style="COLOR: #000000">,</SPAN><SPAN style="COLOR: #000000">16</SPAN><SPAN style="COLOR: #000000">);<BR><BR>              }<BR><BR>              g.dispose();<BR><BR>              </SPAN><SPAN style="COLOR: #0000ff">try</SPAN><SPAN style="COLOR: #000000"> {<BR><BR>                     ImageIO.write(image, </SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">JPEG</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">, outputStream);<BR><BR>                     outputStream.flush();<BR><BR>                     </SPAN><SPAN style="COLOR: #0000ff">return</SPAN><SPAN style="COLOR: #000000"> sRand;<BR><BR>              } </SPAN><SPAN style="COLOR: #0000ff">catch</SPAN><SPAN style="COLOR: #000000"> (IOException e) {<BR><BR>                     e.printStackTrace();<BR><BR>                     </SPAN><SPAN style="COLOR: #0000ff">return</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">fail</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">;<BR><BR>              }<BR><BR>       }<BR><BR> <BR><BR>       </SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000"> Color getRandColor(</SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000"> fc,</SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000"> bc){<BR><BR>              Random random </SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000"> Random();<BR><BR>        </SPAN><SPAN style="COLOR: #0000ff">if</SPAN><SPAN style="COLOR: #000000">(fc</SPAN><SPAN style="COLOR: #000000">></SPAN><SPAN style="COLOR: #000000">255</SPAN><SPAN style="COLOR: #000000">) fc</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">255</SPAN><SPAN style="COLOR: #000000">;<BR><BR>        </SPAN><SPAN style="COLOR: #0000ff">if</SPAN><SPAN style="COLOR: #000000">(bc</SPAN><SPAN style="COLOR: #000000">></SPAN><SPAN style="COLOR: #000000">255</SPAN><SPAN style="COLOR: #000000">) bc</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">255</SPAN><SPAN style="COLOR: #000000">;<BR><BR>        </SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000"> r</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">fc</SPAN><SPAN style="COLOR: #000000">+</SPAN><SPAN style="COLOR: #000000">random.nextInt(bc</SPAN><SPAN style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #000000">fc);<BR><BR>        </SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000"> g</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">fc</SPAN><SPAN style="COLOR: #000000">+</SPAN><SPAN style="COLOR: #000000">random.nextInt(bc</SPAN><SPAN style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #000000">fc);<BR><BR>        </SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000"> b</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">fc</SPAN><SPAN style="COLOR: #000000">+</SPAN><SPAN style="COLOR: #000000">random.nextInt(bc</SPAN><SPAN style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #000000">fc);<BR><BR>        </SPAN><SPAN style="COLOR: #0000ff">return</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000"> Color(r,g,b);<BR><BR>       }<BR></SPAN></DIV></SPAN><BR><BR><FONT color=#ff0000>                                                                                                                                 转蝲h明作者和来源.</FONT> <img src ="http://www.aygfsteel.com/flyingbug/aggbug/19960.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/flyingbug/" target="_blank">fisher</a> 2005-11-15 21:14 <a href="http://www.aygfsteel.com/flyingbug/archive/2005/11/15/19960.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>WebWork2.2集成Spring作ؓ(f)正式IoC容器http://www.aygfsteel.com/flyingbug/archive/2005/09/26/14109.htmlfisherfisherMon, 26 Sep 2005 06:52:00 GMThttp://www.aygfsteel.com/flyingbug/archive/2005/09/26/14109.htmlhttp://www.aygfsteel.com/flyingbug/comments/14109.htmlhttp://www.aygfsteel.com/flyingbug/archive/2005/09/26/14109.html#Feedback0http://www.aygfsteel.com/flyingbug/comments/commentRss/14109.htmlhttp://www.aygfsteel.com/flyingbug/services/trackbacks/14109.htmladopted Spring as the official IoC container. WebWork's own IoC container is deprecated as of version 2.2 beta 2.
WebWork的Ioc容器停摆?BR>http://blogs.opensymphony.com/webwork/2005/09/spring_and_webwork_together.html
新的集成Ҏ(gu)使得Spring的applicationContext.xml中的Action的配|更加简?BR>http://wiki.opensymphony.com/display/WW/Spring

在Spring的网站首上也报道了(jin)该事?BR>http://www.springframework.org

fisher 2005-09-26 14:52 发表评论
]]>
重新带J2EE目Q兼谈架构模式的影响http://www.aygfsteel.com/flyingbug/archive/2005/09/21/13660.htmlfisherfisherWed, 21 Sep 2005 09:47:00 GMThttp://www.aygfsteel.com/flyingbug/archive/2005/09/21/13660.htmlhttp://www.aygfsteel.com/flyingbug/comments/13660.htmlhttp://www.aygfsteel.com/flyingbug/archive/2005/09/21/13660.html#Feedback2http://www.aygfsteel.com/flyingbug/comments/commentRss/13660.htmlhttp://www.aygfsteel.com/flyingbug/services/trackbacks/13660.html 

写了(jin)几个月的通讯中间Ӟ再次带领一个J2EE目Q用WebWork、Spring、HibernateQ感觉写J2EE目像在休假,要考虑的事情少之又,无论是效率、异常处理、线E调度、架构模式,一切都不再那么重要Q无需考虑那么多,只要语义清晰Q沟通流畅就好了(jin)?BR>惌v一周前跟Jerry聊天Q说起因为Unixware下JDK1.3的notify语义的不E_问题而一天内重新~写?jin)三ơ通讯框架Q最后采用了(jin)完全非框架的q程化写法,Jerry说应该先写出一个实玎ͼ然后在之上重构,像爬山一P不可能一下子攀d峰Q当时虽然心(j)里感觉不是这P但竟一时语塞,不知从何说vQ再ơ回到J2EE开发,才恍然明白那天的感觉Q框架开发和业务开发的不同在于,很难重构Q尤其是通讯框架Q架构通常军_?jin)它的几个重要指标?/P>

架构模式不同于设计模式,设计模式的问题可以通过重构解决Q而架构模式几乎只能重新做Q当然也有例外)(j)Q架构一旦确定,很多东西无法再加入Q所以ؓ(f)什么很多开源的J2EE框架在大版本升后不得不抛弃向后兼容。这也是Z么国产通讯框架Cindy的作者想在其中加入FilterChainQ而最l放弃的原因Q因对基库的改动实在太大?/P>

而MINA的架构就_灉|Q它屏蔽?jin)不同通讯方式和通讯底层事g机制的差异,像在如同Cindy和Netty2q种ZNIO的reactor模式之上的框Ӟ要想重构到BIOQ就几乎要全部重写,不过Netty2要好一些,毕竟有Netty1作ؓ(f)铺垫Q所以在NIO的reactor的\上走的不是很q(NIO的reactor实现真是的不咋个Q,而MINA则只需要在SocketIoProcessor中用Helf Sync/Helf Async模式替换掉reactor之上的事件处理即可,当然Q最好还要提供线E池以便q行overload shieldQ在向Apache LDAP团队提交?jin)MINA的JDK1.3核心(j)库时也曾x赯问题Q可惜后太忙Q忘C(jin)。不q我想以Trustin的聪明,一定会(x)惛_q个问题?/P>

fisher 2005-09-21 17:47 发表评论
]]>
[BIRT]-如何使用web service作ؓ(f)数据?/title><link>http://www.aygfsteel.com/flyingbug/archive/2005/08/27/11282.html</link><dc:creator>fisher</dc:creator><author>fisher</author><pubDate>Sat, 27 Aug 2005 02:41:00 GMT</pubDate><guid>http://www.aygfsteel.com/flyingbug/archive/2005/08/27/11282.html</guid><wfw:comment>http://www.aygfsteel.com/flyingbug/comments/11282.html</wfw:comment><comments>http://www.aygfsteel.com/flyingbug/archive/2005/08/27/11282.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/flyingbug/comments/commentRss/11282.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/flyingbug/services/trackbacks/11282.html</trackback:ping><description><![CDATA[今天跟好友在|上聊天Q被问到如何使用web serivce作ؓ(f)数据源来制作BIRT报表QBIRT的例子里都是Z数据库表来构建报表的Q所以生了(jin)q个疑问Q本惛_一step by step的文章来详细介绍一下,可是最q实在太忙了(jin)Q只好在q里介绍一下思\?BR><BR>q个问题Q可以用ScriptDataSource和ScripteDataSet来解冻IScripteDataSource后台Zjava beanQ可以在bean里连接自q数据源,无论是用web serviceq是用socket取数据源都应该没什么问题,另外q可以ؓ(f)BIRT报表提供数据库连接池Q因为本来的报表设计文g是自己去q数据库的,所以难免会(x)比较?BR><BR>另外一个问题是Z属性拖拽的问题Q这个问题我没有具体试验qScriptDataSet中的属性拖拽是否可用,但我x然基于表的可以,ZBean的对于BIRT的开发组来说也没什么难度,毕竟属性都已经l定到DataSet里了(jin)Q拖拽一下又有何?IMG height=19 src="http://www.aygfsteel.com/Emoticons/regular_smile.gif" width=19 border=0><img src ="http://www.aygfsteel.com/flyingbug/aggbug/11282.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/flyingbug/" target="_blank">fisher</a> 2005-08-27 10:41 <a href="http://www.aygfsteel.com/flyingbug/archive/2005/08/27/11282.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>[BIRT]-印象http://www.aygfsteel.com/flyingbug/archive/2005/08/22/10746.htmlfisherfisherMon, 22 Aug 2005 15:31:00 GMThttp://www.aygfsteel.com/flyingbug/archive/2005/08/22/10746.htmlhttp://www.aygfsteel.com/flyingbug/comments/10746.htmlhttp://www.aygfsteel.com/flyingbug/archive/2005/08/22/10746.html#Feedback2http://www.aygfsteel.com/flyingbug/comments/commentRss/10746.htmlhttp://www.aygfsteel.com/flyingbug/services/trackbacks/10746.htmljava在报表方面要惌到PB那样单易用还是比较难Q对于BIRT来说Q首先是高查询报表的实玎ͼ必须依靠ScriptedDataSource和ScriptedDataSetQ而BIRT在这个事情上则只起到?jin)一个界面生成的工具的作用,Z(jin)生成Excel的报表,则必自己制作一个report engine嵌入到BIRT的framework中去Q另外让我不解的一个问题是BIRT竟然插入到报表中的囄以二q制源文件的形式存储在XML格式?SPAN lang=EN style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: Arial; mso-fareast-font-family: 宋体; mso-ansi-language: EN; mso-font-kerning: 1.0pt; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">.rptdesign文g中,而web报表的参C递全部采用http的get方式Qwhy not postQ?
M在BIRT中制作初U报表以?qing)固定查询条件组合的报表q是比较方便的,几乎都是自动生成?jin),q算比较合用Q虽然有时候会(x)有点BugQ而且速度也不快。但是在高条gl合查询斚wq稍显不I只有自己写数据库讉KcL解决q个问题Q不q有q样的开源工L(fng)Q也是很幸了(jin)^_^

fisher 2005-08-22 23:31 发表评论
]]>
[BIRT]-使用Java对象自定义数据源和数据集http://www.aygfsteel.com/flyingbug/archive/2005/08/22/10745.htmlfisherfisherMon, 22 Aug 2005 15:20:00 GMThttp://www.aygfsteel.com/flyingbug/archive/2005/08/22/10745.htmlhttp://www.aygfsteel.com/flyingbug/comments/10745.htmlhttp://www.aygfsteel.com/flyingbug/archive/2005/08/22/10745.html#Feedback0http://www.aygfsteel.com/flyingbug/comments/commentRss/10745.htmlhttp://www.aygfsteel.com/flyingbug/services/trackbacks/10745.htmll         使用DataSet的?/SPAN>open’方法来执行初始化Q务:(x)叛_DataSet选择‘编辑代码’,然后在其中选择?/SPAN>open’方法,q里初始化一?/SPAN>java对象来完成数据访问功?/SPAN>

l         OpenҎ(gu)

a)         ?/SPAN>script中引用的包含java对象?/SPAN>class文g?/SPAN>jar文gQ必d含在<ECLIPSE_INSTALL>\plugins\org.eclipse.birt.report.viewer\birt\WEB-INF\lib.目录?/SPAN>

b)        引入一?/SPAN>packageQ?/SPAN>importPackage(Packages.com.yourCompany.yourApplication); 引入通常?/SPAN>openҎ(gu)的第一行?/SPAN>

c)        创徏一?/SPAN>java对象的实例:(x)var myList = MyListFactory.getList();

d)        ?/SPAN>java对象中获取数据的典型方式是从该对象中获得一个包含数据的IteratorQ?/SPAN>
var iterator = myList.getIterator();

l         FatchҎ(gu)Q?/SPAN>fatchҎ(gu)?/SPAN>Open中创建的java实例中获得数据,q赋值给行)(j)

a)         FatchҎ(gu)的第一步是判断Iterator中是否有数据Q?/SPAN>
if(iterator.hasNext() == false ){
  return null;
}

b)        然后是从iterator中得C个行对象node以便得到该行中每列的数据Q?/SPAN>
var node = iterator.next( );
row[1] = node.getFirstCol( );
row[2] = node.getSecondCol( );
row[3] = node.getThirdCol( );

c)        最后,是返?/SPAN>trueQ?/SPAN>return true;

l         CloseҎ(gu)Q?/SPAN>

a)         最后,?/SPAN>CloseҎ(gu)中清理所有创建的对象Q?/SPAN>
myList = null;
iterator = null;
node = null;



fisher 2005-08-22 23:20 发表评论
]]>
[BIRT]-创徏一个report enginehttp://www.aygfsteel.com/flyingbug/archive/2005/08/22/10744.htmlfisherfisherMon, 22 Aug 2005 15:19:00 GMThttp://www.aygfsteel.com/flyingbug/archive/2005/08/22/10744.htmlhttp://www.aygfsteel.com/flyingbug/comments/10744.htmlhttp://www.aygfsteel.com/flyingbug/archive/2005/08/22/10744.html#Feedback0http://www.aygfsteel.com/flyingbug/comments/commentRss/10744.htmlhttp://www.aygfsteel.com/flyingbug/services/trackbacks/10744.htmll         每个应用只需创徏一?/SPAN>ReportEngine的实?/SPAN>

l         ReportEngine的构造函数要传入一?/SPAN>EngineConfig作ؓ(f)参数Q如果参Cؓ(f)nullQ则一个默认值的ReportEngine被创建?/SPAN>

l         退出时Q应用应该调?/SPAN>destroy()来卸载外挂以?qing)删除?f)时文?/SPAN>

l         使用report engine有以下几个主要步骤:(x)

a)         创徏一?/SPAN>EngineConfig来设|?/SPAN>report engine的选项

b)        创徏一?/SPAN>ReportEnginecȝ实例

c)        你可以用q个对象去进行多UQ?/SPAN>

d)        使用ReportEngine的一?/SPAN>openReport( )Ҏ(gu)来打开一?/SPAN>report design文g

e)         使用IgetParameterDefinitionTask来获?/SPAN>report参数的信?/SPAN>

f)         使用IrunAndRenderReportTaskq行q{换一?/SPAN>reportC个输出格?/SPAN>

g)        调用你的report engine?/SPAN>destroy( )Ҏ(gu)

l         EngineConfigQ?/SPAN>The EngineConfig class wraps configuration settings for a report engine. It allows a developer to specify where to look for engine plug-ins and data drivers, and to add an application-wide scriptable object.

l         IReportRunnableQؓ(f)?jin)?/SPAN>report engineQ你必须首先调用openDesign( )Ҏ(gu)来打开report设计文gQ这些方法返回一?/SPAN>IreportRunnable实例来代?/SPAN>report设计文g?/SPAN>engine’s view。?/SPAN>IreportRunnable做以下Q务:(x)

a)         Get parameter data

b)        Get report title

c)        Get report author.

d)        Get images embedded within the report design

e)         Run the report

l         IEngineTaskQ该cL供一个管理脚本上下文以及(qing)report locales的框Ӟ它从ReportEngine的工厂方法中创徏Q需要参敎ͼ(x)IreportRunnable对象?/SPAN>a scripting context, and a locale?/SPAN>



fisher 2005-08-22 23:19 发表评论
]]>
[BIRT]-理解report engine APIhttp://www.aygfsteel.com/flyingbug/archive/2005/08/22/10743.htmlfisherfisherMon, 22 Aug 2005 15:18:00 GMThttp://www.aygfsteel.com/flyingbug/archive/2005/08/22/10743.htmlhttp://www.aygfsteel.com/flyingbug/comments/10743.htmlhttp://www.aygfsteel.com/flyingbug/archive/2005/08/22/10743.html#Feedback0http://www.aygfsteel.com/flyingbug/comments/commentRss/10743.htmlhttp://www.aygfsteel.com/flyingbug/services/trackbacks/10743.htmll         应用开发者只需要了(jin)解公用的APIQ这?/SPAN>API包含在以下的几个包内Q?/SPAN>

a)         org.eclipse.birt.report.model.apiQ这个包内包含了(jin)93?/SPAN>classQ两个接口和一?/SPAN>exceptionQ这个包是ؓ(f)那些惌定制report designer的开发者用的

b)        org.eclipse.birt.report.engine.apiQ?/SPAN>q个包包含了(jin)一个类Q?/SPAN>17个接口和四个exceptionQ是l那些想要定制一?/SPAN>report generator的开发者用的

c)        org.eclipse.birt.chart hierarchyQ这个包是给惛_制一?/SPAN>chart generator的开发者用的

l         BIRT report engine在几个环境提供了(jin)报表生成和翻译服务,包含以下lgQ?/SPAN>

a)         Stand-alone engineQ这?/SPAN>engine可以让开发者用一个命令行E序来从一?/SPAN>report design文g(.rptdesign)中得?/SPAN>Html?/SPAN>PDF格式?/SPAN>report

b)        BIRT report viewerQ?/SPAN>BIRT Report Designer使用它来预览report。这个程序是一?/SPAN>webE序Q它q行在一?/SPAN>Eclipse内嵌?/SPAN>Tomcat中,q个Tomcat中有一个内嵌的report engine

c)        Custom report designer with an embedded engineQ一个定制的桌面报表应用集成BIRT report engine来预览报?/SPAN>

d)        Web application that embeds the engineQ一个类gBIRT report viewer?/SPAN>WebE序Q可以生基?/SPAN>web的报表?/SPAN>

l         Report engine的核?/SPAN>engineq行q实施报表,而将其他的环境相关的d留给q行该引擎的应用E序Q比如:(x)URL construction, image storage, and design file caching

l         BIRT report engine?/SPAN>API可以做以下几件事情:(x)

a)         发现一lؓ(f)报表定义的参?/SPAN>

b)        获得参数的默认?/SPAN>

c)        q行报表产生HTML?/SPAN>PDF格式的输?/SPAN>

d)        为报表生图片或chart



fisher 2005-08-22 23:18 发表评论
]]>
[BIRT]-使用:qo(h)数据?/title><link>http://www.aygfsteel.com/flyingbug/archive/2005/08/22/10742.html</link><dc:creator>fisher</dc:creator><author>fisher</author><pubDate>Mon, 22 Aug 2005 15:17:00 GMT</pubDate><guid>http://www.aygfsteel.com/flyingbug/archive/2005/08/22/10742.html</guid><wfw:comment>http://www.aygfsteel.com/flyingbug/comments/10742.html</wfw:comment><comments>http://www.aygfsteel.com/flyingbug/archive/2005/08/22/10742.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/flyingbug/comments/commentRss/10742.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/flyingbug/services/trackbacks/10742.html</trackback:ping><description><![CDATA[<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 42pt; TEXT-INDENT: -21pt; mso-list: l0 level2 lfo1; tab-stops: list 42.0pt"><SPAN lang=EN-US style="FONT-FAMILY: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-family: Wingdings"><SPAN style="mso-list: Ignore">l<SPAN style="FONT: 7pt 'Times New Roman'">         </SPAN></SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">你可以用以下几U技术来qo(h)数据集:(x)</SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 63pt; TEXT-INDENT: -21pt; mso-list: l0 level3 lfo1; tab-stops: list 63.0pt"><SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"><SPAN style="mso-list: Ignore">a)<SPAN style="FONT: 7pt 'Times New Roman'">         </SPAN></SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">在查询时指定qo(h)Q以便在数据库或其他数据源中qo(h)数据Q要量使用q种方式来过滤数据,可以通过两种方式来指?/SPAN><SPAN lang=EN-US>SQL SELECT</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">声明Q?/SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 84pt; TEXT-INDENT: -21pt; mso-list: l0 level4 lfo1; tab-stops: list 84.0pt"><SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"><SPAN style="mso-list: Ignore">1.<SPAN style="FONT: 7pt 'Times New Roman'">         </SPAN></SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">在设计期间的</SPAN><SPAN lang=EN-US>SQL Select</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">中以</SPAN><SPAN lang=EN-US>WHERE</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的方式指定,q在数据库中执行?/SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 84pt; TEXT-INDENT: -21pt; mso-list: l0 level4 lfo1; tab-stops: list 84.0pt"><SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"><SPAN style="mso-list: Ignore">2.<SPAN style="FONT: 7pt 'Times New Roman'">         </SPAN></SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">创徏</SPAN><SPAN lang=EN-US>report</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">参数来让用户指定Q在</SPAN><SPAN lang=EN-US>SQL SELECT</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">?/SPAN><SPAN lang=EN-US>WHERE</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">处用参数来指定条gQ用这U方式,</SPAN><SPAN lang=EN-US>WHERE</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的参数在q行期指定,q在数据库中执行?/SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 63pt; TEXT-INDENT: -21pt; mso-list: l0 level3 lfo1; tab-stops: list 63.0pt"><SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"><SPAN style="mso-list: Ignore">b)<SPAN style="FONT: 7pt 'Times New Roman'">        </SPAN></SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">?/SPAN><SPAN lang=EN style="mso-ansi-language: EN">BIRT Report Designer</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-ansi-language: EN">中过滤数据,使用</SPAN><SPAN lang=EN style="mso-ansi-language: EN">javascript</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-ansi-language: EN">或者数据不是在一个数据库中从而不能执?/SPAN><SPAN lang=EN style="mso-ansi-language: EN">SQL</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-ansi-language: EN">语句的情况下Q可以用以下两种方式来执行这U过滤:(x)</SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 84pt; TEXT-INDENT: -21pt; mso-list: l0 level4 lfo1; tab-stops: list 84.0pt"><SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"><SPAN style="mso-list: Ignore">1.<SPAN style="FONT: 7pt 'Times New Roman'">         </SPAN></SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">~辑数据集来指定</SPAN><SPAN lang=EN-US>filter</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">Q用这U技术,查询获得你的</SPAN><SPAN lang=EN-US>SELECT</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">zd的全部数据,然后</SPAN><SPAN lang=EN style="mso-ansi-language: EN">BIRT Report Designer</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-ansi-language: EN">qo(h)数据以便获得W合你指定的条g的数据,׃数据集只能有一个,所以这U技术只能用一U?/SPAN><SPAN lang=EN style="mso-ansi-language: EN">table</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-ansi-language: EN">或者所有的</SPAN><SPAN lang=EN style="mso-ansi-language: EN">report</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-ansi-language: EN">都显C相同的?/SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 84pt; TEXT-INDENT: -21pt; mso-list: l0 level4 lfo1; tab-stops: list 84.0pt"><SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"><SPAN style="mso-list: Ignore">2.<SPAN style="FONT: 7pt 'Times New Roman'">         </SPAN></SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">~辑</SPAN><SPAN lang=EN-US>report </SPAN><SPAN lang=EN style="mso-ansi-language: EN">element filter properties</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-ansi-language: EN">来指定要昄的行Q用这U技术,</SPAN><SPAN lang=EN style="mso-ansi-language: EN">BIRT Report Designer</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-ansi-language: EN">处理q个q程Q如果有多个</SPAN><SPAN lang=EN style="mso-ansi-language: EN">table</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-ansi-language: EN">?/SPAN><SPAN lang=EN style="mso-ansi-language: EN">list</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-ansi-language: EN">?/SPAN><SPAN lang=EN style="mso-ansi-language: EN">chart</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-ansi-language: EN">使用同一个数据集Q而且要显CZ同的行,则就需要用这U技?/SPAN></P><img src ="http://www.aygfsteel.com/flyingbug/aggbug/10742.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/flyingbug/" target="_blank">fisher</a> 2005-08-22 23:17 <a href="http://www.aygfsteel.com/flyingbug/archive/2005/08/22/10742.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>WTP是一个很牛X的工?/title><link>http://www.aygfsteel.com/flyingbug/archive/2005/08/06/9469.html</link><dc:creator>fisher</dc:creator><author>fisher</author><pubDate>Sat, 06 Aug 2005 03:58:00 GMT</pubDate><guid>http://www.aygfsteel.com/flyingbug/archive/2005/08/06/9469.html</guid><wfw:comment>http://www.aygfsteel.com/flyingbug/comments/9469.html</wfw:comment><comments>http://www.aygfsteel.com/flyingbug/archive/2005/08/06/9469.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/flyingbug/comments/commentRss/9469.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/flyingbug/services/trackbacks/9469.html</trackback:ping><description><![CDATA[WTP对于J2EE开发者来说是新的音<BR>其是在开发Web Serivce的时候,直太方便?BR>q有对于XML、XSD、WSDD文g的编?BR><BR>WTP目l放出的教程也很全面Q如下:(x)<BR><A >http://www.eclipse.org/webtools/community/community.html#tutorials</A><BR>只不q这套教E的版本有点老,是基于M4的,所以有些界面有点变?BR><BR>另外Q根据WTP的数据库览子项目RDB开展的DTP目也已启动<BR>计划明年三月Eclipseq会(x)之前ReleaseQ据U可以支持Oracle的PL/SQL开?BR>大家期待吧!<img src ="http://www.aygfsteel.com/flyingbug/aggbug/9469.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/flyingbug/" target="_blank">fisher</a> 2005-08-06 11:58 <a href="http://www.aygfsteel.com/flyingbug/archive/2005/08/06/9469.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>MINA手册中文?/title><link>http://www.aygfsteel.com/flyingbug/archive/2005/08/06/9464.html</link><dc:creator>fisher</dc:creator><author>fisher</author><pubDate>Sat, 06 Aug 2005 02:00:00 GMT</pubDate><guid>http://www.aygfsteel.com/flyingbug/archive/2005/08/06/9464.html</guid><wfw:comment>http://www.aygfsteel.com/flyingbug/comments/9464.html</wfw:comment><comments>http://www.aygfsteel.com/flyingbug/archive/2005/08/06/9464.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/flyingbug/comments/commentRss/9464.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/flyingbug/services/trackbacks/9464.html</trackback:ping><description><![CDATA[<P>Z(jin)l新q的同事培训Q将MINA Tutorial译成了(jin)中文版,在征?A title="Click to do a full-text search for this title" >TrustinLee</A>同意后将其发C(jin)apache的wiki?BR><BR>地址Q?A >http://wiki.apache.org/directory/MinaTutorialInChinese</A></P><img src ="http://www.aygfsteel.com/flyingbug/aggbug/9464.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/flyingbug/" target="_blank">fisher</a> 2005-08-06 10:00 <a href="http://www.aygfsteel.com/flyingbug/archive/2005/08/06/9464.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>CallBack-DI-Template区别http://www.aygfsteel.com/flyingbug/archive/2005/07/16/7805.htmlfisherfisherFri, 15 Jul 2005 16:18:00 GMThttp://www.aygfsteel.com/flyingbug/archive/2005/07/16/7805.htmlhttp://www.aygfsteel.com/flyingbug/comments/7805.htmlhttp://www.aygfsteel.com/flyingbug/archive/2005/07/16/7805.html#Feedback0http://www.aygfsteel.com/flyingbug/comments/commentRss/7805.htmlhttp://www.aygfsteel.com/flyingbug/services/trackbacks/7805.htmlq三个名词能在一P是因为IoC的特?BR>在UI框架中尤其明昄体现
但CallBack只获得了(jin)部分控制权的反{

实际上callbackq种方式是一U过E化Ҏ(gu)学中的实?BR>而在面向对象领域中的替代物则是DI或模板方法模?BR>QIoC的具体表玎ͼ(j)
DI和模板方法模式的区别在于
DI用于解除创徏依赖
模板Ҏ(gu)用于解除行ؓ(f)依赖

回到callback和IoC
从它们出现的理由上来看,目的是ؓ(f)?jin)消除耦合
但它们确实都是对程的控?BR>在过E化callback它的控制将沿着调用的方向不断g伸,而不在乎是否?x)返?BR>但面向对象的Ҏ(gu)中,努力的方向是对象+消息的程序结?BR>Q所以在OO中我们不_(d)(x)调用某个对象Q而说Q象某个对象发送消息)(j)
所以,
IoC是期待回应的Q然后l?‘注入组件?的流E?BR>而传入callback是不期待回应的,它只是告?‘被注入lg?下一步的方向Q而没有说一定要回调 ‘注入组件?或接口,它可以l将控制程传递下去,到底E序在什么地斚w出,'注入lg' 有可能不知道Q所以说它只获得?jin)部分的控制?img src ="http://www.aygfsteel.com/flyingbug/aggbug/7805.html" width = "1" height = "1" />

fisher 2005-07-16 00:18 发表评论
]]>
MINA is a good framworkhttp://www.aygfsteel.com/flyingbug/archive/2005/06/22/6542.htmlfisherfisherWed, 22 Jun 2005 07:48:00 GMThttp://www.aygfsteel.com/flyingbug/archive/2005/06/22/6542.htmlhttp://www.aygfsteel.com/flyingbug/comments/6542.htmlhttp://www.aygfsteel.com/flyingbug/archive/2005/06/22/6542.html#Feedback4http://www.aygfsteel.com/flyingbug/comments/commentRss/6542.htmlhttp://www.aygfsteel.com/flyingbug/services/trackbacks/6542.htmlNetty2的作?SPAN lang=EN style="FONT-SIZE: 12pt; COLOR: black; FONT-FAMILY: Arial; mso-fareast-font-family: 宋体; mso-ansi-language: EN; mso-fareast-language: ZH; mso-bidi-language: AR-SA">TrustinLee在ؓ(f)Apache LDAP目所作的通讯基础框架MINA中显CZ(jin)在通讯框架斚w雄厚的实力,MINA是迄今ؓ(f)止我见过在java领域最好的通讯基础Ӟ看得出,他通过Netty2的经验积累加上对ACE{传l大型框架的理解之后Q在制作MINA的一开始就定?jin)一个近g完美的架构,同时Q我在RoadMap中看到MINA与Spring、JMX和OSGI的结合计划,虽然不知道什么时候能够完成,但光看这个RoadMap已经很让人激动了(jin)?BR>在MINA的服务绑定上Q一开始就使用?jin)serviceRegistryc这U中控型的注册绑定方式,看得Z对OSGI有一定研Iƈ已决意向光拢?BR>而借鉴于ACE的Accepter和Connectorl构使得Session的用更加方便,同时分ؓ(f)IO层和Protocol两层的通讯基础件也是得用变得很方便?BR>最后要提一下的是作者用的FilterChain式结构来加蝲FilterQ得很多非通讯核心(j)问题得以从基件中剥离出来Q甚臌U程池模式都可以使用Filter来指定,虽然自己制作的线E池要想l合到MINA中需要一些额外的努力Q但是仍然极大的增加?jin)框架的灉|性?BR>



fisher 2005-06-22 15:48 发表评论
]]>
Eclipse3.1RC1 feels good!http://www.aygfsteel.com/flyingbug/archive/2005/06/03/5541.htmlfisherfisherFri, 03 Jun 2005 14:31:00 GMThttp://www.aygfsteel.com/flyingbug/archive/2005/06/03/5541.htmlhttp://www.aygfsteel.com/flyingbug/comments/5541.htmlhttp://www.aygfsteel.com/flyingbug/archive/2005/06/03/5541.html#Feedback0http://www.aygfsteel.com/flyingbug/comments/commentRss/5541.htmlhttp://www.aygfsteel.com/flyingbug/services/trackbacks/5541.html
启动时还?x)对加蝲的plugin的过E显C度条
而且׃subString问题的解冻I其他操作Q如searchQ也相应快了(jin)很多

不过从M7开始代码折叠的按钮从三角变成了(jin)加号Q看h有点不太?fn)?BR>从M7开始连启动界面也比M6昑־气?BR>不过比v速度的提升来_(d)q些都是?......?......问题了(jin)^_^

fisher 2005-06-03 22:31 发表评论
]]>
J2SE5.0对Network部分的增?/title><link>http://www.aygfsteel.com/flyingbug/archive/2005/05/26/5224.html</link><dc:creator>fisher</dc:creator><author>fisher</author><pubDate>Thu, 26 May 2005 03:56:00 GMT</pubDate><guid>http://www.aygfsteel.com/flyingbug/archive/2005/05/26/5224.html</guid><wfw:comment>http://www.aygfsteel.com/flyingbug/comments/5224.html</wfw:comment><comments>http://www.aygfsteel.com/flyingbug/archive/2005/05/26/5224.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/flyingbug/comments/commentRss/5224.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/flyingbug/services/trackbacks/5224.html</trackback:ping><description><![CDATA[<UL type=disc> <li id="wmqeeuq" class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan; mso-list: l0 level1 lfo1; tab-stops: list 36.0pt"><SPAN lang=EN-US style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">Complete support for IPv6 on Windows XP (SP1) and 2003 server has been provided in this release. (4608529) <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></LI> <li id="wmqeeuq" class=MsoNormal style="MARGIN: 0cm 0cm 0pt; COLOR: red; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan; mso-list: l0 level1 lfo1; tab-stops: list 36.0pt"><SPAN lang=EN-US style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">The networking API now provides a way of setting timeouts on connect and read operations for protocol handlers. This will benefit any HTTP client application that must behave robustly in the event of server failure. (4700777) <o:p></o:p></SPAN></LI> <li id="wmqeeuq" class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan; mso-list: l0 level1 lfo1; tab-stops: list 36.0pt"><SPAN lang=EN-US style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">A new API provides a mean for Java applications, which includes RMI applications, to be launched via inetd. (4295885, 4673940) <o:p></o:p></SPAN></LI> <li id="wmqeeuq" class=MsoNormal style="MARGIN: 0cm 0cm 0pt; COLOR: red; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan; mso-list: l0 level1 lfo1; tab-stops: list 36.0pt"><SPAN lang=EN-US style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">The InetAddress class now provides an API to allow testing for the reachability of a host. This features provides a ping-like capability in Java. (4639861) <o:p></o:p></SPAN></LI> <li id="wmqeeuq" class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan; mso-list: l0 level1 lfo1; tab-stops: list 36.0pt"><SPAN lang=EN-US style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">Cookie support has been improved. Applications and web containers can provide Cookie management by implementing the new CookieHandler API. (4696506) <o:p></o:p></SPAN></LI> <li id="wmqeeuq" class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan; mso-list: l0 level1 lfo1; tab-stops: list 36.0pt"><SPAN lang=EN-US style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">Proxy server configuration has been improved. It can now be dynamic and controlable by web containers and applications through the ProxySelector API, which can also handle failures to connect to the proxy. (4696512) <o:p></o:p></SPAN></LI> <li id="wmqeeuq" class=MsoNormal style="MARGIN: 0cm 0cm 0pt; COLOR: red; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan; mso-list: l0 level1 lfo1; tab-stops: list 36.0pt"><SPAN lang=EN-US style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">A new framework provides a way for protocol handlers to access a file caching mechanism implemented by the platform or by a third party. (4837267) <o:p></o:p></SPAN></LI> <li id="wmqeeuq" class=MsoNormal style="MARGIN: 0cm 0cm 0pt; COLOR: red; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan; mso-list: l0 level1 lfo1; tab-stops: list 36.0pt"><SPAN lang=EN-US style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">The specification of the URL class now mandates a minimum set of URL protocol handlers that are guaranteed to be present in J2SE. They are http, https, file, jar and ftp. (4180636) <o:p></o:p></SPAN></LI> <li id="wmqeeuq" class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-pagination: widow-orphan; mso-list: l0 level1 lfo1; tab-stops: list 36.0pt"><SPAN lang=EN-US style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">There have been a number of enhancements for JSSE (SSL/TLS). For more information, please see: <A >Security Enhancements</A> <o:p></o:p></SPAN></LI></UL><img src ="http://www.aygfsteel.com/flyingbug/aggbug/5224.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/flyingbug/" target="_blank">fisher</a> 2005-05-26 11:56 <a href="http://www.aygfsteel.com/flyingbug/archive/2005/05/26/5224.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>SOA-好大一块饼http://www.aygfsteel.com/flyingbug/archive/2005/05/25/5169.htmlfisherfisherWed, 25 May 2005 03:27:00 GMThttp://www.aygfsteel.com/flyingbug/archive/2005/05/25/5169.htmlhttp://www.aygfsteel.com/flyingbug/comments/5169.htmlhttp://www.aygfsteel.com/flyingbug/archive/2005/05/25/5169.html#Feedback0http://www.aygfsteel.com/flyingbug/comments/commentRss/5169.htmlhttp://www.aygfsteel.com/flyingbug/services/trackbacks/5169.html最q被各大厂商Ҏ(gu)到天上的SOAQ再ơ让我感觉到什么叫做新瓶装旧酒Q不q厂商ؓ(f)?jin)盈利所采取的营销{略是可以理解的

但是作ؓ(f)技术h员,我们要拨开SOA的华丽外衣,看看它到底是什么?BR>

SOA的演变过E:(x)

web Service-->以CorbaZ表的DOC-->Zlg服务器的N-Tier-->Zweb服务器的T-Tier-->C/Sl构

其根本的通讯方式Q几q来未曾变化Q只不过是多I了(jin)几g马甲而已Q从技术角度讲Q如果对|络中间件的架构熟?zhn)的话Q从最底层的TCP/IP通讯开始自己构Z个webService的实Cq什么难事,作ؓ(f)技术h员,我更惛_注一些目前可以带来实际好处的技术,如:(x)AOP/脚本语言/IF/微内核的体系l构Q甚x镜花水月的MDA

但是Q如前面所说这是从技术的角度来看待SOA的发展,而实际上Q每一ơ穿上新的马Ԍ都得应用的基础架构更进一步接q业务,所以,看待SOA也不能仅仅从技术的角度Q从整个企业的架构来考虑Q虽然不太愿意接受大厂商的SOA宣传的轮番蘪炸(它们l常aq其实)(j)Q但是我仍然不得不说SOA的思想和发展思\实不错。有Z(x)试试看,也许真的很不错?/P>

fisher 2005-05-25 11:27 发表评论
]]>
վ֩ģ壺 Ϻӿ| п| | | ĵ| | | | | | ĵ| ³| | Ϸ| | | | | «| ڶ| | Ͻ| | | | | | ӱʡ| ֣| | | Ԫ| | | ˮ| ƽ| ʯ| | | | |