﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>语源科技BlogJava-放松人生，追求完美</title><link>http://www.blogjava.net/hx9111/</link><description>生如夏花，死如秋叶 
生如夏花之绚烂，死如秋叶之静美</description><language>zh-cn</language><lastBuildDate>Thu, 30 Apr 2026 11:45:26 GMT</lastBuildDate><pubDate>Thu, 30 Apr 2026 11:45:26 GMT</pubDate><ttl>60</ttl><item><title>SCA与OSGi真的具有可比性吗？</title><link>http://www.blogjava.net/hx9111/archive/2006/11/10/OSGi-SCA.html</link><dc:creator>我爱夏花,更爱秋叶</dc:creator><author>我爱夏花,更爱秋叶</author><pubDate>Fri, 10 Nov 2006 09:20:00 GMT</pubDate><guid>http://www.blogjava.net/hx9111/archive/2006/11/10/OSGi-SCA.html</guid><wfw:comment>http://www.blogjava.net/hx9111/comments/80449.html</wfw:comment><comments>http://www.blogjava.net/hx9111/archive/2006/11/10/OSGi-SCA.html#Feedback</comments><slash:comments>3</slash:comments><wfw:commentRss>http://www.blogjava.net/hx9111/comments/commentRss/80449.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/hx9111/services/trackbacks/80449.html</trackback:ping><description><![CDATA[
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">这段时间看了不少的文章都是关于</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">SCA</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">与</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">OSGi</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">之间比较的。且不论他们之间到底有没有关系，我们来看看他们的定义</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">
						<?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" style="FONT-SIZE: 9pt">SCA<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US" style="FONT-SIZE: 9pt; COLOR: #666666; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial">
						<span style="mso-tab-count: 1">       </span>
				</span>
				<span style="FONT-SIZE: 9pt; COLOR: #666666; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: Arial">服务构件架构</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt; COLOR: #666666; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial">(Service Component Architecture)</span>
				<span style="FONT-SIZE: 9pt; COLOR: #666666; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: Arial">是一套规范，它描述了采用面向服务的体系结构来搭建应用和系统时的模型。</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt; COLOR: #666666; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial">SCA</span>
				<span style="FONT-SIZE: 9pt; COLOR: #666666; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: Arial">扩展并完善了以前实现服务的方法，并且</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt; COLOR: #666666; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial">SCA</span>
				<span style="FONT-SIZE: 9pt; COLOR: #666666; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: Arial">构建在开放的标准之上，</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt; COLOR: #666666; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial">
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span style="FONT-SIZE: 9pt; COLOR: #666666; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: Arial">例如：</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt; COLOR: #666666; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial">Web Service<o:p></o:p></span>
		</p>
		<p style="LINE-HEIGHT: 15pt">
				<span style="FONT-SIZE: 9pt; COLOR: #666666; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: Arial">
						<font face="宋体">服务构件架构</font>
				</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt; COLOR: #666666; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial">SCA</span>
				<span style="FONT-SIZE: 9pt; COLOR: #666666; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: Arial">
						<font face="宋体">（</font>
				</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt; COLOR: #666666; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial">Service Component Architecture </span>
				<span style="FONT-SIZE: 9pt; COLOR: #666666; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: Arial">
						<font face="宋体">）为建设基于面向服务的体系结构的应用和系统提供了一种编程模型。这基于一种观点，即业务功能以一系列服务的形式被对外提供出来，然后它们被组合在一起去实现满足特定业务需求的解决方案。这些复合的应用，可以包含专门为此应用程序创建的新服务，也可以包含来自已有的系统和应用程序的业务功能，重复利用就像其中的一部分一样。</font>
				</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt; COLOR: #666666; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial">SCA</span>
				<span style="FONT-SIZE: 9pt; COLOR: #666666; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: Arial">
						<font face="宋体">即为组合服务提供了模型，也为服务构件的创建，包括在</font>
				</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt; COLOR: #666666; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial">SCA</span>
				<font face="宋体">
						<span style="FONT-SIZE: 9pt; COLOR: #666666; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: Arial">组装中重用已有应用系统的功能提供了模型。</span>
						<span lang="EN-US" style="FONT-SIZE: 9pt; COLOR: #666666; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial">
								<o:p>
								</o:p>
						</span>
				</font>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US" style="FONT-SIZE: 9pt; COLOR: #666666; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial">
						<o:p> </o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US" style="FONT-SIZE: 9pt">OSGi<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US" style="FONT-SIZE: 9pt; COLOR: #666666; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial">
						<span style="mso-tab-count: 1">       </span>OSGi</span>
				<span style="FONT-SIZE: 9pt; COLOR: #666666; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: Arial">是什么，</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt; COLOR: #666666; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial">OSGi</span>
				<span style="FONT-SIZE: 9pt; COLOR: #666666; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: Arial">是一种服务运行平台。通过实现能够提供服务的符合</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt; COLOR: #666666; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial">OSGi</span>
				<span style="FONT-SIZE: 9pt; COLOR: #666666; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: Arial">规范的组件，用户可以将其组件发布到</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt; COLOR: #666666; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial">OSGi</span>
				<span style="FONT-SIZE: 9pt; COLOR: #666666; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: Arial">运行平台，供用户和其他组件使用。</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt; COLOR: #666666; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial">OSGi</span>
				<span style="FONT-SIZE: 9pt; COLOR: #666666; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: Arial">组件提供的服务具有两个层面的含义：系统层面，即一个组件为其他组件提供服务，这些服务体现为</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt; COLOR: #666666; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial">Java</span>
				<span style="FONT-SIZE: 9pt; COLOR: #666666; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: Arial">接口的实现；业务层面，即一个组件为外部系统或用户提供某种业务服务实现。</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt; COLOR: #666666; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial">
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US" style="FONT-SIZE: 9pt; COLOR: #666666; FONT-FAMILY: Verdana; mso-bidi-font-family: Arial">
						<o:p> </o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">从概念看我们可以很快发现他们的相同点和不同点。</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US" style="FONT-SIZE: 9pt">
						<span style="mso-tab-count: 1">         </span>
				</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">他们都是一种组件模型，而且是面向服务的编成模型，都对服务组件模型作了相应的定义。在两种模型中都有“模块”，“组件”，“服务”这</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">3</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">种共同的概念。我们分别从这三种感念来看看他们之间的差别</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">模块：</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US" style="FONT-SIZE: 9pt">
						<span style="mso-tab-count: 1">         </span>
				</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">可能</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">OSGi</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">对于模块的概念定义的更完善一点，支持模块的动态更新和依赖，而</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">SCA</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">对于模块的概念中没有涉及动态更新的概念</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">(</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">实际如果把</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">SCA</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">中的模块映射到</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">JEE</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">中的</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">EAR</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">块就可以做到了</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">)</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，对于模块间依赖关系的定义也没有</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">OSGi</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">中</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">Export/import</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">定义的完美，对于一个包的引用，要存在</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">2</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">个不同的副本，至少</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">WPS </span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">（</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">IBM</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">中</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">SCA</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的实现）中是这样。所以说模块的定义</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">OSGi</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">要比</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">SCA</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">要完善，实际上这样是两种模型出发点是完全不同的，</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">OSGi</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">设计之初主要是面向网络设备的，最后被</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">Eclipse</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">所采用才为大家所知的，而</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">SCA</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">从一开始就是面向企业级应用的，所以这方面没有</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">OSGi</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">定义的完善。模块的定义</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">OSGi</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">是在</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">MANIFEST.MF</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">文件中通过元数据定义的，而</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">SCA</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">是在</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">sca.module</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">文件中定义的</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">xml</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">格式。从这点上我们就可以看出来，</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">OSGi</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">只能是在</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">java</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">平台上（他的规范中说明也是只适合</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">java</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">平台的，规范的</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">0layer</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">定义了它的最小</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">runtime</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">），而</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">SCA</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">是一种跨平台的规范，它不依赖于平台，你可以是</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">Java</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">环境也可以</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">C++</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">环境。</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US" style="FONT-SIZE: 9pt">
						<o:p> </o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US" style="FONT-SIZE: 9pt">
						<span style="mso-tab-count: 1">         </span>
				</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">对于组件的概念，个人感觉</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">OSGi</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">是在</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">DS</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">（</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">OSGI R4</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">Declarative Services</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">）出来以后才有了比较定性的定义，而</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">SCA</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">从一开始就非常强调组件的定义，对于</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">SCA</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">组件可以是一个</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">webservice</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，一个</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">java</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">对象，一个有限状态机中的规则对象，也可以是一个</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">BPEL</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">流程对象，还可以一个人工干预的工作流对象，更可以是许多组件的组合对象，这一点</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">OSGi</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">组件是做不到，也不要想</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">OSGi</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">能够做到，因为他们的设计出发点根本是不同的，不要把企业级应用的东西强加到</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">OSGi</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">中来，在</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">OSGi</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">中的组件可以发布</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">/</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">查找服务，</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">SCA</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">也可以这么做，对于服务的引用，</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">OSGi</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">只能是在</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">single JVM</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">中，不要怪</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">OSGi</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">要知道他当初设计的目标就是网络设备，不用考虑企业级应用中的分布式，服务质量什么的。但是组件概念上</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">SCA</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">有一点还是弱于</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">OSGi</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">OSGi</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">对服务的引用可以做到动态更新，一个服务改变了，它可以动态的或者是静态的更新应用它服务的组件对象，这一点在网络设备中是非常重要的，但是在</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">SCA</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">这种企业级应用中到底需不许多要我们还需要考虑，毕竟如果我们是面向接口编成，而不用关心细节是什么，你的服务再怎么更新，只要我们的接口不变就不会用什么问题。</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">
						<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: 9pt">
						<span style="mso-tab-count: 1">         </span>
				</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">而服务，最大的差别可能就是</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">OSGi</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">是在</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">single JVM</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">内的所以对于服务的引用永远都是直接的内存引用吧，而</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">SCA</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">在服务的引用上附加了</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">Binding</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的概念也就多了一个协议的选择层，很象</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">jmx</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">中</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">distributed layer</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">SCA</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">对于服务的</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">Export/Import</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">都需要</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">Binding</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">一个具体的实现，你的服务可以通过</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">WebService</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">来发布，也可以通过</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">RMI</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">JMS</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">等等来发布。这一点是</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">SCA</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的设计出发点来决定的（面向企业级的应用开发）。对于服务的调用，不仅仅是必须在环境内的调用，也可以在环境外进行调用，比如你在一个</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">JSP</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">页面想要调用</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">SCAExport</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">出来的服务，你就可以通过</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">SCA</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">提供的</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">Tools</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">直接调用，</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">OSGi</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">是不支持环境外调用的。</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">
						<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: 9pt">
						<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: 9pt">
						<span style="mso-tab-count: 1">         </span>
				</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">从以上来看</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">OSGi</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">和</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">SCA</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">除了基于同样的设计方法，其他的不具什么可以比较性，因为他们设计的根本意图上是不同的，一个是用在单一个的</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">JVM</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">中的面向网络设备或者像</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">Eclipse</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">这种应用，不需要考虑服务质量，服务的可靠性，分布式，等等。而</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">SCA</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">从诞生之初就为了解决</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">SOA</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">应用中的规范性，而且与他同级别的还有</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">SDO</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">来定义服务的数据对象，这一点也是</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">OSGi</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">中没有定义的。</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">
						<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: 9pt">
						<span style="mso-tab-count: 1">         </span>
				</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">有人会说</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">OSGi</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">最近正在定义在企业级应用的规范（</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">EEG</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">），</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">Eclipse</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">RSP</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">也在做相应的努力。但是如果是在</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">SCA</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">之外另开辟出一个新的模型空间，个人觉得不太可能，毕竟</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">SCA</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">是</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">IBM</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">BEA</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">Oracle</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">Sap</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">这些厂商在认识到许多现有技术的不足之后总结出来的设计模型，是这些厂商经验的积累，就像</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">OSGi</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">是</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">OSGi</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">组织在网络设备应用中的积累的一样，这两种技术只能出现互补性，再说</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">SCA</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">模型的定义充分体现的软件界一贯的规则“重用”，不管是</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">IBM</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">WPS</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，还是</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">Apache</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">Tuscany</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">都是以现有平台为出发点设计的，是把</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">SCA</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">这种模型与现实技术做一定的映射，例如，如何实现异步调用就可以以借助</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">JEE</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">环境中的消息或者</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">Corba</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">中消息机制。</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">
						<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: 9pt">
						<span style="mso-tab-count: 1">         </span>
				</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">真希望看到</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">OSGi</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">EEG</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">组织和</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">SCA</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">规范定制组织合作的场景。这样不仅可以让组件服务思想得到升华，还能为企业级开发开辟一个新的天地。</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">
						<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: 9pt">
						<span style="mso-tab-count: 1">         </span>
				</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">以上观点纯属个人感触，不代表任何特别的言论，其实最近正打算吧原有的平台迁移到</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">OSGi</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">平台上，在研究过程中发现了许多有趣的地方。</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">
						<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: 9pt">
						<span style="mso-tab-count: 1">         </span>
				</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">欢迎大家一起讨论</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">OSGi</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">和</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">SCA</span>
				<span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">技术。</span>
				<span lang="EN-US" style="FONT-SIZE: 9pt">
						<o:p>
						</o:p>
				</span>
		</p>
<img src ="http://www.blogjava.net/hx9111/aggbug/80449.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/hx9111/" target="_blank">我爱夏花,更爱秋叶</a> 2006-11-10 17:20 <a href="http://www.blogjava.net/hx9111/archive/2006/11/10/OSGi-SCA.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>读Rod Johnson的Without EJB 有感 （1）</title><link>http://www.blogjava.net/hx9111/archive/2006/05/31/49367.html</link><dc:creator>我爱夏花,更爱秋叶</dc:creator><author>我爱夏花,更爱秋叶</author><pubDate>Wed, 31 May 2006 15:18:00 GMT</pubDate><guid>http://www.blogjava.net/hx9111/archive/2006/05/31/49367.html</guid><wfw:comment>http://www.blogjava.net/hx9111/comments/49367.html</wfw:comment><comments>http://www.blogjava.net/hx9111/archive/2006/05/31/49367.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/hx9111/comments/commentRss/49367.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/hx9111/services/trackbacks/49367.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'; mso-bidi-font-weight: bold">这几天总算有点时间，可以看看手头的书了。</span>
				<span style="mso-bidi-font-weight: bold">
				</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'; mso-bidi-font-weight: bold">手头一直有本书从买来就没有翻一下——《</span>
				<span lang="EN-US" style="mso-bidi-font-weight: bold">expert one-on-one J2EE Development without EJB</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">》，这几天没事翻了一下。觉得大师就是大师一上来就把我们的苦衷说的清清楚楚，还是实践出真理阿。</span>
				<span lang="EN-US" style="mso-bidi-font-weight: bold">
						<?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'; mso-bidi-font-weight: bold">最让我记忆犹新的是这几句话：</span>
				<span lang="EN-US" style="mso-bidi-font-weight: bold">
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US" style="mso-bidi-font-weight: bold">
						<o:p> </o:p>
				</span>
		</p>
		<table class="MsoTableGrid" style="BORDER-RIGHT: medium none; BORDER-TOP: medium none; BACKGROUND: #e6e6e6; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none; BORDER-COLLAPSE: collapse; mso-border-alt: dash-small-gap #FF6600 .5pt; mso-yfti-tbllook: 480; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt" cellspacing="0" cellpadding="0" border="1">
				<tbody>
						<tr style="HEIGHT: 145.85pt; mso-yfti-irow: 0; mso-yfti-firstrow: yes; mso-yfti-lastrow: yes">
								<td style="BORDER-RIGHT: #ff6600 1pt dashed; PADDING-RIGHT: 5.4pt; BORDER-TOP: #ff6600 1pt dashed; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: #ff6600 1pt dashed; WIDTH: 426.1pt; PADDING-TOP: 0cm; BORDER-BOTTOM: #ff6600 1pt dashed; HEIGHT: 145.85pt; BACKGROUND-COLOR: transparent; mso-border-alt: dash-small-gap #FF6600 .5pt" valign="top" width="568">
										<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
												<span lang="EN-US" style="mso-bidi-font-weight: bold">
														<span style="mso-tab-count: 1">       </span>
												</span>
												<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">检验一个体系结构是否合理，判断一种实现选择是否合适，都要看他是否符合这一主旋律。</span>
												<span lang="EN-US" style="mso-bidi-font-weight: bold">
														<o:p>
														</o:p>
												</span>
										</p>
										<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
												<span lang="EN-US" style="mso-bidi-font-weight: bold">
														<span style="mso-tab-count: 1">       </span>
												</span>
												<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">主旋律是：</span>
												<span lang="EN-US" style="mso-bidi-font-weight: bold">
														<o:p>
														</o:p>
												</span>
										</p>
										<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 62.85pt; TEXT-INDENT: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 62.85pt">
												<span lang="EN-US" style="FONT-FAMILY: Wingdings; mso-bidi-font-weight: bold; mso-fareast-font-family: Wingdings; mso-bidi-font-family: Wingdings">
														<span style="mso-list: Ignore">²<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'; mso-bidi-font-weight: bold">简单</span>
												<span lang="EN-US" style="mso-bidi-font-weight: bold">
														<o:p>
														</o:p>
												</span>
										</p>
										<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 62.85pt; TEXT-INDENT: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 62.85pt">
												<span lang="EN-US" style="FONT-FAMILY: Wingdings; mso-bidi-font-weight: bold; mso-fareast-font-family: Wingdings; mso-bidi-font-family: Wingdings">
														<span style="mso-list: Ignore">²<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'; mso-bidi-font-weight: bold">高产</span>
												<span lang="EN-US" style="mso-bidi-font-weight: bold">
														<o:p>
														</o:p>
												</span>
										</p>
										<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 62.85pt; TEXT-INDENT: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 62.85pt">
												<span lang="EN-US" style="FONT-FAMILY: Wingdings; mso-bidi-font-weight: bold; mso-fareast-font-family: Wingdings; mso-bidi-font-family: Wingdings">
														<span style="mso-list: Ignore">²<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'; mso-bidi-font-weight: bold">面向对象为本</span>
												<span lang="EN-US" style="mso-bidi-font-weight: bold">
														<o:p>
														</o:p>
												</span>
										</p>
										<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 62.85pt; TEXT-INDENT: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 62.85pt">
												<span lang="EN-US" style="FONT-FAMILY: Wingdings; mso-bidi-font-weight: bold; mso-fareast-font-family: Wingdings; mso-bidi-font-family: Wingdings">
														<span style="mso-list: Ignore">²<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'; mso-bidi-font-weight: bold">业务需求至上</span>
												<span lang="EN-US" style="mso-bidi-font-weight: bold">
														<o:p>
														</o:p>
												</span>
										</p>
										<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 62.85pt; TEXT-INDENT: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 62.85pt">
												<span lang="EN-US" style="FONT-FAMILY: Wingdings; mso-bidi-font-weight: bold; mso-fareast-font-family: Wingdings; mso-bidi-font-family: Wingdings">
														<span style="mso-list: Ignore">²<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'; mso-bidi-font-weight: bold">重视检验过程</span>
												<span lang="EN-US" style="mso-bidi-font-weight: bold">
														<o:p>
														</o:p>
												</span>
										</p>
										<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 62.85pt; TEXT-INDENT: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 62.85pt">
												<span lang="EN-US" style="FONT-FAMILY: Wingdings; mso-bidi-font-weight: bold; mso-fareast-font-family: Wingdings; mso-bidi-font-family: Wingdings">
														<span style="mso-list: Ignore">²<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'; mso-bidi-font-weight: bold">重视可测试性</span>
												<span lang="EN-US" style="mso-bidi-font-weight: bold">
														<o:p>
														</o:p>
												</span>
										</p>
								</td>
						</tr>
				</tbody>
		</table>
		<br />
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt">
				<font face="Times New Roman">
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">所谓的主旋律，个人理解就是一种审美观点，就像大家看到漂亮的</span>
						<span lang="EN-US" style="mso-bidi-font-weight: bold">MM</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">一样，为什么</span>
						<span lang="EN-US" style="mso-bidi-font-weight: bold">MM</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">这么漂亮，因为他符合人们对漂亮的机电看法<br />——</span>
						<font size="3">
								<font size="3">
										<font size="3">
												<span style="FONT-SIZE: 10pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">国色天香</span>
												<span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">
												</span>
												<span style="FONT-SIZE: 10pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">倾城倾国</span>
												<span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">
												</span>
												<span style="FONT-SIZE: 10pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">沉鱼落雁</span>
												<span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">
												</span>
												<span style="FONT-SIZE: 10pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">闭月羞花</span>
												<span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">
												</span>
												<span style="FONT-SIZE: 10pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">如花似玉</span>
												<span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">
												</span>
												<span style="FONT-SIZE: 10pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">花容月貌</span>
												<span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">
												</span>
												<span style="FONT-SIZE: 10pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">美若天仙</span>
										</font>
										<span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">
										</span>
								</font>
								<span style="FONT-SIZE: 10pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">
										<font size="3">艳如桃李。。。反正就是美。</font>
										<br />
										<br />
								</span>
								<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">
										<o:p>
										</o:p>
								</span>
						</font>
				</font>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt">
				<font face="Times New Roman">
						<font size="3">
								<span style="FONT-SIZE: 10pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">从设计模式角度说明主旋律，就是设计中常常遵守的几点原则——可维护性，可扩展性，可复用性，要面向接口去设计，等等。</span>
								<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">
										<o:p>
										</o:p>
								</span>
						</font>
				</font>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt">
				<font face="Times New Roman">
						<font size="3">
								<span style="FONT-SIZE: 10pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">以上这些都是从理论角度出发考虑的，而</span>
								<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Rod Johnson</span>
								<span style="FONT-SIZE: 10pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">是从实践的角度来考虑问题，大学学了点哲学原理都运用在这里了。以前在设计第一个框架的时候没有太多的考虑到程序员的实用型，只是为了设计而设计，最后把框架设计的及其复杂，最后的结果只有进行重新设计，进行框架的重构。而在设计中遇到的问题很多是</span>
								<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Rod </span>
								<span style="FONT-SIZE: 10pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">在书中描述的场景，真是深有感触阿。</span>
								<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">
										<o:p>
										</o:p>
								</span>
						</font>
				</font>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 45pt; TEXT-INDENT: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 45.0pt">
				<font face="Times New Roman">
						<span lang="EN-US" style="FONT-FAMILY: Wingdings; mso-bidi-font-weight: bold; mso-fareast-font-family: Wingdings; mso-bidi-font-family: Wingdings">
								<span style="mso-list: Ignore">²<span style="FONT: 7pt 'Times New Roman'"><font size="3">        </font></span></span>
						</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">简单</span>
						<span lang="EN-US" style="mso-bidi-font-weight: bold">
								<o:p>
								</o:p>
						</span>
				</font>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 42pt; TEXT-INDENT: 21pt">
				<font face="Times New Roman">
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">设计中常常应该遵守</span>
						<span lang="EN-US" style="mso-bidi-font-weight: bold">2/8</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">原则，系统中</span>
						<span lang="EN-US" style="mso-bidi-font-weight: bold">80%</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">是最长用的，应该以这</span>
						<span lang="EN-US" style="mso-bidi-font-weight: bold">80%</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">为重点去设计，如果只是为了设计中的完美而过多地考虑其他的</span>
						<span lang="EN-US" style="mso-bidi-font-weight: bold">20%</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">就会陷入复杂的漩涡。就拿我们现在设计的</span>
						<span lang="EN-US" style="mso-bidi-font-weight: bold">JBrain</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">（我们的框架代号）框架中的元数据系统来说把，本来是为了对系统中的所有元素的一个建模过程，涉及到显示模型建模，业务模型建模，数据模型建模，工作流模型建模，（这个就好比在基础框架基础上又抽象出一层），我们在建模中就是考虑到那</span>
						<span lang="EN-US" style="mso-bidi-font-weight: bold">80%</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">常见的情况，对模型系统进行设计，但是每一个业务都会涉及到报表系统，这就是那</span>
						<span lang="EN-US" style="mso-bidi-font-weight: bold">20%</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">的情况，如果我们再花精力去研究报表系统的建模，就会把自己带入无比复杂的深渊中，所以我们决定用这</span>
						<span lang="EN-US" style="mso-bidi-font-weight: bold">80%</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">的模型建模来描述这</span>
						<span lang="EN-US" style="mso-bidi-font-weight: bold">20%</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">的报表建模，这样问题就简单多了，对于报表的设计来说，虽然有点麻烦，但是我们的设计可以适应大多数的情况。实际只要我们作一些辅助的工具就可以简化报表模型的建模，这是我们在框架开发的后期发现的，经过实践证明我们当初的想法是真确的。</span>
						<span lang="EN-US" style="mso-bidi-font-weight: bold">
								<o:p>
								</o:p>
						</span>
				</font>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 42pt; TEXT-INDENT: 21pt">
				<font face="Times New Roman">
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">这种情况还出现在我们当初在做一个业务系统的时的框架选择上，当时我们为了框架能够承受更大的负载度，而考虑使用</span>
						<span lang="EN-US" style="mso-bidi-font-weight: bold">EJB</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">的多层开发（幸运的是没有用实体</span>
						<span lang="EN-US" style="mso-bidi-font-weight: bold">Bean</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">），这使我们的开发量整整增加的一倍，还在不考虑测试的情况下。项目结束了上线使用，用户根本没有当初设想的并发量，我们当时真的还考虑了</span>
						<span lang="EN-US" style="mso-bidi-font-weight: bold">Rod </span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">所说的是否能够在客户端支持</span>
						<span lang="EN-US" style="mso-bidi-font-weight: bold">Swing</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">程序，幸亏后来被否定了。有时候我们在设计中总是追寻完美，为了设计而设计，这种做法正如</span>
						<span lang="EN-US" style="mso-bidi-font-weight: bold">Rod</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">所说的是不科学的。</span>
						<span lang="EN-US" style="mso-bidi-font-weight: bold">
								<o:p>
								</o:p>
						</span>
				</font>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 42pt">
				<font face="Times New Roman">
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">简单才是美，因为简单出现了</span>
						<span lang="EN-US" style="mso-bidi-font-weight: bold">POJO</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">对象，因为简单出现了</span>
						<span lang="EN-US" style="mso-bidi-font-weight: bold">Hibernater</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">，因为简单出现了</span>
						<span lang="EN-US" style="mso-bidi-font-weight: bold">Annotation</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">，因为简单出现了</span>
						<span lang="EN-US" style="mso-bidi-font-weight: bold">EJB3.0</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">。因为简单才是</span>
						<span lang="EN-US" style="mso-bidi-font-weight: bold">java</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">的开源社区如火如荼，人声鼎沸。</span>
						<span lang="EN-US" style="mso-bidi-font-weight: bold">
								<o:p>
								</o:p>
						</span>
				</font>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 42pt">
				<span lang="EN-US" style="mso-bidi-font-weight: bold">
						<o:p> </o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 45pt; TEXT-INDENT: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 45.0pt">
				<font face="Times New Roman">
						<span lang="EN-US" style="FONT-FAMILY: Wingdings; mso-bidi-font-weight: bold; mso-fareast-font-family: Wingdings; mso-bidi-font-family: Wingdings">
								<span style="mso-list: Ignore">²<span style="FONT: 7pt 'Times New Roman'"><font size="3">        </font></span></span>
						</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">高产</span>
						<span lang="EN-US" style="mso-bidi-font-weight: bold">
								<o:p>
								</o:p>
						</span>
				</font>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: 21pt">
				<font face="Times New Roman">
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">有时候，设计者注重的是设计，这也是我们设计中常常存在的一种习惯，程序员总是追求完美，追求</span>
						<span lang="EN-US" style="mso-bidi-font-weight: bold">perfect</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">，而一个企业在完成项目中要的是生成率，要的是质量，一个功能用那种完美的框架需要</span>
						<span lang="EN-US" style="mso-bidi-font-weight: bold">2</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">周的时间才能开发完，而使用简单的框架只需要</span>
						<span lang="EN-US" style="mso-bidi-font-weight: bold">3</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">天的时间就可以完成了，你说我们应该使用那种框架。</span>
						<span lang="EN-US" style="mso-bidi-font-weight: bold">
								<o:p>
								</o:p>
						</span>
				</font>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: 21pt">
				<font face="Times New Roman">
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">去年在开发一个项目的时候，因为我们是和其他部门一起合作开发，在项目开始的调研当中，我们极力推荐使用我们的</span>
						<span lang="EN-US" style="mso-bidi-font-weight: bold">JBrain</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">元数据框架，而另为一个部门却强调使用</span>
						<span lang="EN-US" style="mso-bidi-font-weight: bold">JSF</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">所建立的框架（</span>
						<span lang="EN-US" style="mso-bidi-font-weight: bold">JSF</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">刚出来，而且那个部门的人员还没有太多的理解</span>
						<span lang="EN-US" style="mso-bidi-font-weight: bold">JSF</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">的深刻含义，他们觉得</span>
						<span lang="EN-US" style="mso-bidi-font-weight: bold">JSF</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">非常好，非常的完美），最后因为我们的框架是黑盒的，客户不想把他们的项目绑死在我们的框架上，所以最后决定使用</span>
						<span lang="EN-US" style="mso-bidi-font-weight: bold">JSF</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">来设计框架（不说开发一个企业级框架所需要的时间），这里我不是说</span>
						<span lang="EN-US" style="mso-bidi-font-weight: bold">JSF</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">不好，我研究过</span>
						<span lang="EN-US" style="mso-bidi-font-weight: bold">JSF</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">，觉得他的设计哲学真的很好，尤其他的组件树和生命周期设计的非常完美，尤其他的</span>
						<span lang="EN-US" style="mso-bidi-font-weight: bold">Render</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">机制，真的就是我们以前在使用</span>
						<span lang="EN-US" style="mso-bidi-font-weight: bold">jsp Tag</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">的时候一直想要又没有的功能（我们框架中的显示模型有很多思想是从他的组件数概念而来的），但是如果用</span>
						<span lang="EN-US" style="mso-bidi-font-weight: bold">jsf</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">开发企业级程序，而且是在国内这种客户要求非常苛刻的情况下是非常不足的。因为我们的</span>
						<span lang="EN-US" style="mso-bidi-font-weight: bold">JSF</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">框架是在</span>
						<span lang="EN-US" style="mso-bidi-font-weight: bold">Apache </span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">的</span>
						<span lang="EN-US" style="mso-bidi-font-weight: bold">MyFace</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">基础上开发的，实际上后来他的标签我们没有用多少，大部分都是我们自己在他的基础上重新开发的。后来框架设计出来了，生产率太低，完成一个工作需要做很多很多的事，我实在看不下去了，看着我周边的同事一边又一边的叹气（而且项目结束前几乎是天天加班到</span>
						<span lang="EN-US" style="mso-bidi-font-weight: bold">9</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">点），根据我们原有框架的元数据原理，写了一个</span>
						<span lang="EN-US" style="mso-bidi-font-weight: bold">JSF</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">框架的代码生成机，这才把生产率稍微提上了一点。</span>
						<span lang="EN-US" style="mso-bidi-font-weight: bold">
								<o:p>
								</o:p>
						</span>
				</font>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: 21pt">
				<font face="Times New Roman">
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">实际有时候我们设计框架的时候不必要考虑过多，一定要从开发和实用的角度去考虑，多考虑一下程序员的工作方式。</span>
						<span lang="EN-US" style="mso-bidi-font-weight: bold">
								<o:p>
								</o:p>
						</span>
				</font>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: 21pt">
				<span lang="EN-US" style="mso-bidi-font-weight: bold">
						<o:p> </o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US" style="mso-bidi-font-weight: bold">
						<span style="mso-tab-count: 1">       </span>
				</span>
				<font face="Times New Roman">
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">今天就写到这里，可能是和</span>
						<span lang="EN-US" style="mso-bidi-font-weight: bold">Rod</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">的</span>
						<span lang="EN-US" style="mso-bidi-font-weight: bold">Without EJB</span>
						<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">中的想法产生了共鸣才有了这么多费话，其他的感触将在后续的随笔中写到。写这篇文章也是为了提醒自己开发的时候一定要从实际出发，一切的灵感都是来源于实践的。</span>
						<span lang="EN-US" style="mso-bidi-font-weight: bold">
								<o:p>
								</o:p>
						</span>
				</font>
		</p>
<img src ="http://www.blogjava.net/hx9111/aggbug/49367.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/hx9111/" target="_blank">我爱夏花,更爱秋叶</a> 2006-05-31 23:18 <a href="http://www.blogjava.net/hx9111/archive/2006/05/31/49367.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>XML和O/R mapping 的讨论!</title><link>http://www.blogjava.net/hx9111/archive/2006/05/10/45512.html</link><dc:creator>我爱夏花,更爱秋叶</dc:creator><author>我爱夏花,更爱秋叶</author><pubDate>Wed, 10 May 2006 09:37:00 GMT</pubDate><guid>http://www.blogjava.net/hx9111/archive/2006/05/10/45512.html</guid><wfw:comment>http://www.blogjava.net/hx9111/comments/45512.html</wfw:comment><comments>http://www.blogjava.net/hx9111/archive/2006/05/10/45512.html#Feedback</comments><slash:comments>3</slash:comments><wfw:commentRss>http://www.blogjava.net/hx9111/comments/commentRss/45512.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/hx9111/services/trackbacks/45512.html</trackback:ping><description><![CDATA[ 
<p style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: SimSun; mso-outline-level: 1">在现在的应用系统中几乎都能看到xml和database的身影,与这两个东西正交的是OO.</p><ul><li><div style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: SimSun; mso-outline-level: 1">XML &lt;==&gt; OO 影射的东西有很多,一般都是使用marshaller架构.</div></li></ul><p style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: SimSun; mso-outline-level: 1"> </p><p style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: SimSun; mso-outline-level: 1">(这里不说用于xml解析的dom和sax模型,只是说xml与pojo的影射关系:)其实再怎么影射也是通过dom或者sax接口的实现进行解析的,还是通过新的javaSE规范Streaming API for XML (StAX), xml和OO的影射只不过进行了抽象封装,把xml到pojo之间的解析部分透明化了,我们这里实际说的其实是JavaEE5.0中一个新的规范Java Architecture for XML Binding (JAXB))</p><p style="FONT-SIZE: 10pt; MARGIN: 0in 0in 0in 0.5in; FONT-FAMILY: SimSun; mso-outline-level: 2">比较有名的框架有:</p><p style="FONT-SIZE: 10pt; MARGIN: 0in 0in 0in 0.5in; FONT-FAMILY: SimSun; mso-outline-level: 2">+ castor 比较有名的一个O/X影射框架,可以根据xsd生成解析框架.(个人比较喜欢使用她)<br /></p><p style="FONT-SIZE: 10pt; MARGIN: 0in 0in 0in 0.5in; FONT-FAMILY: SimSun; mso-outline-level: 2">+ apache 的xmlbean和Commons-Digester(不知道为什么会存在两个同样领域的东西,可能是digester相对来说比较简单,因而它被许多的apache的开源项目使用);<br /></p><p style="FONT-SIZE: 10pt; MARGIN: 0in 0in 0in 0.5in; FONT-FAMILY: SimSun; mso-outline-level: 2">+ JAXB 是JAVAEE中的对于xml和OO对象Binding定制的新的规范(标准阿!);<br /><br /></p><p style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: SimSun; mso-outline-level: 1">实际要研究xml和OO的影射框架,大家不妨看看现有的web service框架就会了解很多了,建议看Codehaus的 XFire 他是一个比较轻量级的WS框架,AXIS2也不错.</p><p style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: SimSun; mso-outline-level: 1">我了解的XML Binding框架就这么多,如果谁知道更好用的可以告诉我,相您请教.</p><ul><li><div style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: SimSun; mso-outline-level: 1">对于O/R mapping 就不用太说了,大家了解的可能都比我多,个人只用过一下几个:</div></li></ul><p style="FONT-SIZE: 10pt; MARGIN: 0in 0in 0in 0.5in; FONT-FAMILY: SimSun; mso-outline-level: 2">+ hibernate ,ibatis ,jdo ,castor jdo(期待EJB3.0种的Persistence规范JPA)对于这几种框架的介绍就不说明了,google一下会出来无数.</p><p style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: SimSun; mso-outline-level: 1"> </p><p style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: SimSun; mso-outline-level: 1">?这里不是想讨论两种技术,而是想听大家对XML到database的影射有什么更好的办法,因为O/X,O/R都有很好的框架了,是否有X/R的好的框架.</p><p style="FONT-SIZE: 10pt; MARGIN: 0in; FONT-FAMILY: SimSun; mso-outline-level: 1">这里我只知道castor 中对从xml到database有一定的支持,但支持的还是不够,hibernate3.0种好象对xml到database进行了支持,但是也是一些简单的支持.<br /><br />不断整理中。。。</p><img src ="http://www.blogjava.net/hx9111/aggbug/45512.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/hx9111/" target="_blank">我爱夏花,更爱秋叶</a> 2006-05-10 17:37 <a href="http://www.blogjava.net/hx9111/archive/2006/05/10/45512.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>这段时间比较忙！可能没时间维护Blog了：（</title><link>http://www.blogjava.net/hx9111/archive/2005/06/25/6705.html</link><dc:creator>我爱夏花,更爱秋叶</dc:creator><author>我爱夏花,更爱秋叶</author><pubDate>Sat, 25 Jun 2005 04:31:00 GMT</pubDate><guid>http://www.blogjava.net/hx9111/archive/2005/06/25/6705.html</guid><wfw:comment>http://www.blogjava.net/hx9111/comments/6705.html</wfw:comment><comments>http://www.blogjava.net/hx9111/archive/2005/06/25/6705.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/hx9111/comments/commentRss/6705.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/hx9111/services/trackbacks/6705.html</trackback:ping><description><![CDATA[<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT size=2><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">&nbsp;&nbsp;&nbsp;这几天在研究框架架高层次的抽象问题，还有框架的一些集成问题，可能要没时间维护</SPAN><SPAN lang=EN-US style="mso-bidi-font-weight: bold">Blog</SPAN></FONT><FONT size=2><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">；框架的初期版本已经开发完毕了，在几次初期的使用中，反映还是不错的，真是高兴。但是还有很多不足的地方，下一阶段对框架的开发，主要就是在调试和测试方面。<BR><BR></SPAN><SPAN lang=EN-US style="mso-bidi-font-weight: bold"><?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT size=2><SPAN lang=EN-US style="mso-bidi-font-weight: bold"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>JBrain</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">框架的设计的初期目的就是要提供一个基本的企业级运行环境，就好比</SPAN><SPAN lang=EN-US style="mso-bidi-font-weight: bold">JVM</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">一样。而下一期开发的目标就是在</SPAN><SPAN lang=EN-US style="mso-bidi-font-weight: bold">JBrain</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">框架的这一个运行环境的基础上，开发一套建模语言，而</SPAN><SPAN lang=EN-US style="mso-bidi-font-weight: bold">JBrain</SPAN></FONT><FONT size=2><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">框架就是这种模型语言的运行环境。<BR><BR></SPAN><SPAN lang=EN-US style="mso-bidi-font-weight: bold"><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT size=2><SPAN lang=EN-US style="mso-bidi-font-weight: bold"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">我们为了这个目标都在研究</SPAN><SPAN lang=EN-US style="mso-bidi-font-weight: bold">MDA</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">，个人觉得</SPAN><SPAN lang=EN-US style="mso-bidi-font-weight: bold">MDA</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">的思想是</SPAN><SPAN style="mso-bidi-font-weight: bold"> </SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">“</SPAN><SPAN style="mso-bidi-font-weight: bold"> <SPAN lang=EN-US>Perfection</SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">”，但是实现他谈何容易，我们研究它只是研究它的思想，通过这种思想，能够给我们以启发。<BR>&nbsp;&nbsp;&nbsp;</SPAN></FONT></P><img src ="http://www.blogjava.net/hx9111/aggbug/6705.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/hx9111/" target="_blank">我爱夏花,更爱秋叶</a> 2005-06-25 12:31 <a href="http://www.blogjava.net/hx9111/archive/2005/06/25/6705.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>白话自己心中的设计模式</title><link>http://www.blogjava.net/hx9111/archive/2005/06/16/6238.html</link><dc:creator>我爱夏花,更爱秋叶</dc:creator><author>我爱夏花,更爱秋叶</author><pubDate>Thu, 16 Jun 2005 14:07:00 GMT</pubDate><guid>http://www.blogjava.net/hx9111/archive/2005/06/16/6238.html</guid><wfw:comment>http://www.blogjava.net/hx9111/comments/6238.html</wfw:comment><comments>http://www.blogjava.net/hx9111/archive/2005/06/16/6238.html#Feedback</comments><slash:comments>3</slash:comments><wfw:commentRss>http://www.blogjava.net/hx9111/comments/commentRss/6238.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/hx9111/services/trackbacks/6238.html</trackback:ping><description><![CDATA[<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT color=#000000><FONT size=2><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">&nbsp;&nbsp;&nbsp;再一次的看设计模式的时候，感觉自己对设计模式，有了一个进一步的理解（自我感觉的</SPAN><SPAN lang=EN-US style="FONT-FAMILY: Wingdings; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold; mso-char-type: symbol; mso-symbol-font-family: Wingdings"><SPAN style="mso-char-type: symbol; mso-symbol-font-family: Wingdings">J</SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">）</SPAN><SPAN lang=EN-US style="mso-bidi-font-weight: bold">.<BR><BR><?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></FONT></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT color=#000000><FONT size=2><SPAN lang=EN-US style="mso-bidi-font-weight: bold"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">在数学计算中我们要求</SPAN><SPAN lang=EN-US style="mso-bidi-font-weight: bold">A</SPAN><SPAN lang=EN-US style="FONT-FAMILY: Wingdings; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold; mso-char-type: symbol; mso-symbol-font-family: Wingdings"><SPAN style="mso-char-type: symbol; mso-symbol-font-family: Wingdings">à</SPAN></SPAN><SPAN lang=EN-US style="mso-bidi-font-weight: bold">B</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">点的最短路径，可能从</SPAN><SPAN lang=EN-US style="mso-bidi-font-weight: bold">A</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">点到</SPAN><SPAN lang=EN-US style="mso-bidi-font-weight: bold">B</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">点有很多种走法，但是追求完美的我们（尤其是程序员），总是希望找到一条最短的路径。设计模式也是相同，在设计中我们想要找到设计中的最短路径，也就是设计的永恒之道（就是设计模式中常说的无名的质），说白了，就是如何设计才能使系统更容易扩张，更灵活，更稳定。模式追求的是一种最佳的解决方案，在这个方案的指导下，我们能够跟好的去实现我们所想要实现的东西。<BR><BR></SPAN><SPAN lang=EN-US style="mso-bidi-font-weight: bold"><o:p></o:p></SPAN></FONT></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT color=#000000><FONT size=2><SPAN lang=EN-US style="mso-bidi-font-weight: bold"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">数学计算的时候有一定的法则，软件设计的时候也是有一定的法则的，而这些法则，都是在追求软件设计的守恒定律时形成的——什么开</SPAN><SPAN lang=EN-US style="mso-bidi-font-weight: bold">/</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">闭原则，面向接口原则，依赖倒置原则等等，但是软件设计中的原则也是可变的，而且是时刻发展的，要不然就不会出现，今天的</SPAN><SPAN lang=EN-US style="mso-bidi-font-weight: bold">spring</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">非常火的场面，</SPAN><SPAN lang=EN-US style="mso-bidi-font-weight: bold">Ioc</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">原则。<BR><BR></SPAN><SPAN lang=EN-US style="mso-bidi-font-weight: bold"><o:p></o:p></SPAN></FONT></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT color=#000000><FONT size=2><SPAN lang=EN-US style="mso-bidi-font-weight: bold"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">数学计算是通过许多的公式推倒出结果的，但是我们求解的时候，会出现这种情况，</SPAN><SPAN lang=EN-US style="mso-bidi-font-weight: bold">C</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">结果，是通过</SPAN><SPAN lang=EN-US style="mso-bidi-font-weight: bold">A</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">和</SPAN><SPAN lang=EN-US style="mso-bidi-font-weight: bold">B</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">两个公式推导出来的，模式也是一样，有一些较小的模式，而这些较小的模式是一些较大的模式的基础。<BR><BR></SPAN><SPAN lang=EN-US style="mso-bidi-font-weight: bold"><o:p></o:p></SPAN></FONT></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT color=#000000><FONT size=2><SPAN lang=EN-US style="mso-bidi-font-weight: bold"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">在理解模式的时候我们可以从对象的生命周期来理解。<BR><BR></SPAN><SPAN lang=EN-US style="mso-bidi-font-weight: bold"><o:p></o:p></SPAN></FONT></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT color=#000000><FONT size=2><SPAN lang=EN-US style="mso-bidi-font-weight: bold"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">对象产生的时候需要描述对象的属性，它的存在形式，创建模式就是用来描述这个的；而这个对象存在就会和其他对象发生联系，就会和其他对象发生作用，如何描述他们之间的联系和作用就是结构模式要做的事了；前面这些都是静态的，对象的存在，不可能永远静止不动的，它会根据自己的需要，完成一些动作，语言中还有动词，名词，形容词之分呢！模式就跟语言一样需要有动词来描述对象，行为模式就是用来描述对象的行动的；<BR><BR></SPAN><SPAN lang=EN-US style="mso-bidi-font-weight: bold"><o:p></o:p></SPAN></FONT></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT color=#000000><FONT size=2><SPAN lang=EN-US style="mso-bidi-font-weight: bold"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">设计模式，实际就是一种设计中的语言，很多的最基本的模式，就是组成这种语言的基础，我们在理解模式的时候不能只是背模式，而应该灵活的运用他们，让他们有机的结合在一起，形成一个生动的句子。这个就好比我们学英语，不是光背一些单词，就能写出一篇好文章的，还需要我们有语感，理解了以后才能写出来。<BR><BR></SPAN><SPAN lang=EN-US style="mso-bidi-font-weight: bold"><o:p></o:p></SPAN></FONT></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT color=#000000><FONT size=2><SPAN lang=EN-US style="mso-bidi-font-weight: bold"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">这个只是我对模式的一点点个人的理解，不代表所有人的观点！：）</SPAN></FONT></FONT><SPAN lang=EN-US style="mso-bidi-font-weight: bold"><o:p></o:p></SPAN></P><img src ="http://www.blogjava.net/hx9111/aggbug/6238.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/hx9111/" target="_blank">我爱夏花,更爱秋叶</a> 2005-06-16 22:07 <a href="http://www.blogjava.net/hx9111/archive/2005/06/16/6238.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>事务的理解和jotm，xapool的使用 （1）</title><link>http://www.blogjava.net/hx9111/archive/2005/06/11/5917.html</link><dc:creator>我爱夏花,更爱秋叶</dc:creator><author>我爱夏花,更爱秋叶</author><pubDate>Sat, 11 Jun 2005 10:13:00 GMT</pubDate><guid>http://www.blogjava.net/hx9111/archive/2005/06/11/5917.html</guid><wfw:comment>http://www.blogjava.net/hx9111/comments/5917.html</wfw:comment><comments>http://www.blogjava.net/hx9111/archive/2005/06/11/5917.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/hx9111/comments/commentRss/5917.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/hx9111/services/trackbacks/5917.html</trackback:ping><description><![CDATA[<SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"></SPAN><SPAN lang=EN-US><?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"><FONT size=2><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">对于中小型的应用</SPAN><SPAN lang=EN-US>tomcat</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">作为服务器就足够了，但是，在我把框架往</SPAN><SPAN lang=EN-US>tomcat</SPAN></FONT><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"><FONT size=2>上转移的时候有了一个问题，工作流引擎的数据库是独立的，如何保证他和业务的数据库事务上的统一性，这里就涉及到分布式事务的概念。<BR><BR></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"><FONT size=2><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">像</SPAN><SPAN lang=EN-US>weblogic</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，</SPAN><SPAN lang=EN-US>websphere</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，这种企业级服务器，他们有自己的事务管理器，你可以配置多个</SPAN><SPAN lang=EN-US>datasource</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，这些</SPAN><SPAN lang=EN-US>datasource</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">可以指向不同的资源（数据库，消息服务），事务管理器就是这些资源的管理中心，当一个事务开始的时候（</SPAN><SPAN lang=EN-US>begin</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">），事务管理器会记录并监视这个事务涉及的所有可管理资源，当一个事务结束的时候（</SPAN><SPAN lang=EN-US>commit</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">），他会把所有的资源提交，而当程序出现异常的时候，他会把所有的资源回滚（</SPAN><SPAN lang=EN-US>rollback</SPAN></FONT><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"><FONT size=2>）。在事务边界以内，所有的可管理资源实际都是没有提交的，处于一种等待状态，只有当事务提交的时候，事务管理器才负责把它所管理的所有资源提交。事务管理器就是一个全局事务管理中心，它负责把许多可管理（可以控制事务）的资源的事务统一起来。<BR><BR></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"><FONT size=2><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">出于这种这种考虑，我在管理全局性事务的时候，选择了</SPAN><SPAN lang=EN-US>jtom</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">和</SPAN><SPAN lang=EN-US>xapool</SPAN></FONT><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"><FONT size=2>。<BR><BR></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"><FONT size=2><SPAN lang=EN-US>Jotm</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">是一个开源的</SPAN><SPAN lang=EN-US>JTA</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">实现，是由</SPAN><SPAN lang=EN-US>ObjectWeb</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">组织开发的，实际就是实现了事务管理器的功能，而且他还支持分布式事务，如果把</SPAN><SPAN lang=EN-US>jotm</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="mso-bidi-font-weight: bold">JORAM </SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">（也是由</SPAN><SPAN lang=EN-US>ObjectWeb</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">组织开发的</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 style="mso-bidi-font-weight: bold">）使用，就可以实现</SPAN></SPAN><SPAN lang=EN-US style="mso-bidi-font-weight: bold">JMS</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">的事务管理。（这里我在想，</SPAN><SPAN lang=EN-US style="mso-bidi-font-weight: bold">JBossCache</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">是支持事务的</SPAN><SPAN lang=EN-US style="mso-bidi-font-weight: bold">cache</SPAN></FONT><FONT size=2><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">，如果把它们结合在一起，是不是就可以对缓存进行事务控制了：））<BR><BR></SPAN><SPAN lang=EN-US style="mso-bidi-font-weight: bold"><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"><FONT size=2><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">对于</SPAN><SPAN lang=EN-US style="mso-bidi-font-weight: bold">jotm</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">的使用，你只要记住这个应用中只有一个</SPAN><SPAN lang=EN-US style="mso-bidi-font-weight: bold">Jotm</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">对象就</SPAN><SPAN lang=EN-US style="mso-bidi-font-weight: bold">OK</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">了，对于分布式事务也是一样，如何保证一个应用中只用一个</SPAN><SPAN lang=EN-US style="mso-bidi-font-weight: bold">Jotm</SPAN></FONT><FONT size=2><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">实例呢？<BR><BR></SPAN><SPAN lang=EN-US style="mso-bidi-font-weight: bold"><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 42pt; mso-char-indent-count: 4.0"><SPAN lang=EN-US style="mso-bidi-font-weight: bold"><FONT size=2><FONT color=#a52a2a>jotmCurrent = Current.getCurrent();</FONT><BR><BR><o:p></o:p></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT size=2><SPAN lang=EN-US style="mso-bidi-font-weight: bold"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">使用上面的方法，如果</SPAN><SPAN lang=EN-US style="mso-bidi-font-weight: bold">jotmCurrent </SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">等于</SPAN><SPAN lang=EN-US style="mso-bidi-font-weight: bold">null</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">，说明现在的</SPAN><SPAN lang=EN-US style="mso-bidi-font-weight: bold">jvm</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">中没有没有</SPAN><SPAN lang=EN-US style="mso-bidi-font-weight: bold">jotm</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">实例，当需要分布式的时候就不能这么判断了，你必须把</SPAN><SPAN lang=EN-US style="mso-bidi-font-weight: bold">jotm</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">对象放到</SPAN><SPAN lang=EN-US style="mso-bidi-font-weight: bold">jndi</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">上，以后使用的时候从</SPAN><SPAN lang=EN-US style="mso-bidi-font-weight: bold">jndi</SPAN></FONT><FONT size=2><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">上取就可以了。<BR><BR></SPAN><SPAN lang=EN-US style="mso-bidi-font-weight: bold"><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT size=2><SPAN lang=EN-US style="mso-bidi-font-weight: bold"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">如果</SPAN><SPAN lang=EN-US style="mso-bidi-font-weight: bold">jotmCurrent</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">不等于空，说明</SPAN><SPAN lang=EN-US style="mso-bidi-font-weight: bold">jvm</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">中已经有</SPAN><SPAN lang=EN-US style="mso-bidi-font-weight: bold">jotm</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">实例了，而如何得到这个实例了，如果从这个角度去考虑，是不行的，你可以看一下</SPAN><SPAN lang=EN-US style="mso-bidi-font-weight: bold">Jotm</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">的</SPAN><SPAN lang=EN-US style="mso-bidi-font-weight: bold">API</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">，看一下</SPAN><SPAN lang=EN-US style="mso-bidi-font-weight: bold">Current</SPAN></FONT><FONT size=2><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">的类说明：<BR><BR></SPAN><SPAN lang=EN-US style="mso-bidi-font-weight: bold"><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="mso-bidi-font-weight: bold"><SPAN style="mso-spacerun: yes"><FONT size=2>&nbsp;<FONT color=#0000ff>&nbsp; </FONT></FONT></SPAN><A href="http://jotm.objectweb.org/current/jotm/jdoc/"><FONT color=#0000ff size=2>http://jotm.objectweb.org/current/jotm/jdoc/</FONT></A><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="mso-bidi-font-weight: bold"><o:p><FONT size=2>&nbsp;</FONT></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT size=2><SPAN lang=EN-US style="mso-bidi-font-weight: bold"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN lang=EN-US>public class <B>Current</B> </SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 31.5pt; mso-char-indent-count: 3.0"><SPAN lang=EN-US><FONT size=2>extends </FONT><A href="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html"><FONT color=#0000ff size=2>Object</FONT></A><FONT size=2> </FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 36.75pt; mso-char-indent-count: 3.5"><SPAN lang=EN-US><FONT size=2>implements </FONT><A href="http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/transaction/UserTransaction.html"><FONT color=#0000ff size=2>UserTransaction</FONT></A><FONT color=#0000ff size=2>, </FONT><A href="http://jotm.objectweb.org/current/jotm/jdoc/org/objectweb/transaction/jta/TransactionManager.html"><FONT color=#0000ff size=2>TransactionManager</FONT></A><FONT color=#0000ff size=2>, </FONT><A href="http://java.sun.com/j2se/1.3/docs/api/javax/naming/Referenceable.html"><FONT color=#0000ff size=2>Referenceable</FONT></A><FONT color=#0000ff size=2>, </FONT><A href="http://java.sun.com/j2se/1.3/docs/api/java/io/Serializable.html"><FONT color=#0000ff size=2>Serializable</FONT></A><FONT size=2> <BR><BR></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT size=2><SPAN lang=EN-US style="mso-bidi-font-weight: bold">Current </SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">对象实际就是一个事务管理器，哈哈，我们使用</SPAN><SPAN lang=EN-US style="mso-bidi-font-weight: bold">jotm</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">，不就是为了这个吗，</SPAN><SPAN lang=EN-US style="mso-bidi-font-weight: bold">ok</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">，</SPAN><SPAN lang=EN-US style="mso-bidi-font-weight: bold">you got it</SPAN></FONT><FONT size=2><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">！<BR><BR></SPAN><SPAN lang=EN-US style="mso-bidi-font-weight: bold"><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT size=2><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">我对</SPAN><SPAN lang=EN-US style="mso-bidi-font-weight: bold">jotm</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">和事务的研究还不够深入，以上都是个人理解，有不对的地方还请大家指出！</SPAN><SPAN lang=EN-US style="mso-bidi-font-weight: bold"><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT size=2><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">下面的文章，我重点对</SPAN><SPAN lang=EN-US style="mso-bidi-font-weight: bold">xapool</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-weight: bold">进行说明（使用他的时候问题特别多：））</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt"></o:p></SPAN>&nbsp;</P><img src ="http://www.blogjava.net/hx9111/aggbug/5917.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/hx9111/" target="_blank">我爱夏花,更爱秋叶</a> 2005-06-11 18:13 <a href="http://www.blogjava.net/hx9111/archive/2005/06/11/5917.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>