﻿<?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-java的足迹-随笔分类-开源软件</title><link>http://www.blogjava.net/pesome/category/3246.html</link><description /><language>zh-cn</language><lastBuildDate>Mon, 12 Mar 2007 05:23:00 GMT</lastBuildDate><pubDate>Mon, 12 Mar 2007 05:23:00 GMT</pubDate><ttl>60</ttl><item><title>sitemesh的问题及解决</title><link>http://www.blogjava.net/pesome/archive/2007/03/11/103175.html</link><dc:creator>pesome</dc:creator><author>pesome</author><pubDate>Sun, 11 Mar 2007 14:54:00 GMT</pubDate><guid>http://www.blogjava.net/pesome/archive/2007/03/11/103175.html</guid><wfw:comment>http://www.blogjava.net/pesome/comments/103175.html</wfw:comment><comments>http://www.blogjava.net/pesome/archive/2007/03/11/103175.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/pesome/comments/commentRss/103175.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/pesome/services/trackbacks/103175.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'">再说</span>
				<span lang="EN-US">sitemesh</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的问题，同样是做</span>
				<span lang="EN-US">openfans</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">网摘功能出现的。做好了</span>
				<span lang="EN-US">IE</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">插件，有</span>
				<span lang="EN-US">fans</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">反馈说弹出页面太大，这也难怪，用了</span>
				<span lang="EN-US">sitemesh</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，</span>
				<span lang="EN-US">head</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">和</span>
				<span lang="EN-US">footer</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">都在页面上，想缩小页面，肯定得把</span>
				<span lang="EN-US">head</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">和</span>
				<span lang="EN-US">footer</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">都去掉，做个干净点的。既然用了</span>
				<span lang="EN-US">sitemesh</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">肯定是希望最方便的搞定这个，而不用动任何逻辑（包括页面逻辑）。这个好办，文档里有说，通过在</span>
				<span lang="EN-US">sitemesh.xml</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">中增加</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align="left">
				<span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: teal; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">
				</span>
		</p>
		<div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee">
				<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
				<span style="COLOR: #000000">&lt;</span>
				<span style="COLOR: #000000">mapper<br /><img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />           </span>
				<span style="COLOR: #0000ff">class</span>
				<span style="COLOR: #000000">=</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">com.opensymphony.module.sitemesh.mapper.ParameterDecoratorMapper</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">&gt;</span>
				<span style="COLOR: #000000">
						<br />
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
						<br />
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />           </span>
				<span style="COLOR: #000000">&lt;</span>
				<span style="COLOR: #000000">param name</span>
				<span style="COLOR: #000000">=</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">decorator.parameter</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000"> value</span>
				<span style="COLOR: #000000">=</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">decorator</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #000000">/&gt;</span>
				<span style="COLOR: #000000">
						<br />
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
						<br />
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />           </span>
				<span style="COLOR: #000000">&lt;</span>
				<span style="COLOR: #000000">param name</span>
				<span style="COLOR: #000000">=</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">parameter.name</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000"> value</span>
				<span style="COLOR: #000000">=</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">confirm</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #000000">/&gt;</span>
				<span style="COLOR: #000000">
						<br />
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
						<br />
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />           </span>
				<span style="COLOR: #000000">&lt;</span>
				<span style="COLOR: #000000">param name</span>
				<span style="COLOR: #000000">=</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">parameter.value</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000"> value</span>
				<span style="COLOR: #000000">=</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">true</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000"> </span>
				<span style="COLOR: #000000">/&gt;</span>
				<span style="COLOR: #000000">
						<br />
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
						<br />
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />       </span>
				<span style="COLOR: #000000">&lt;/</span>
				<span style="COLOR: #000000">mapper</span>
				<span style="COLOR: #000000">&gt;</span>
				<span style="COLOR: #000000">
						<br />
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
				</span>
		</div>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align="left">
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align="left">
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">就能搞定，这样只需要使用参数如</span>
				<span lang="EN-US">saveSnippet.html?decorator=simple&amp;confirm=true</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，就能让它使用指定的</span>
				<span lang="EN-US">decorator</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。然后做一个去掉</span>
				<span lang="EN-US">head</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">和</span>
				<span lang="EN-US">footer</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">只保留必要的</span>
				<span lang="EN-US">js</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">和</span>
				<span lang="EN-US">css</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">引用的</span>
				<span lang="EN-US">simple.jsp</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">页面，同时在</span>
				<span lang="EN-US">decorator.xml</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">中配</span>
		</p>
		<div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee">
				<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
				<span style="COLOR: #000000">&lt;</span>
				<span style="COLOR: #000000">decorator name</span>
				<span style="COLOR: #000000">=</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">simple</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000"> page</span>
				<span style="COLOR: #000000">=</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">simple.jsp</span>
				<span style="COLOR: #000000">"</span>
				<span style="COLOR: #000000">&gt;&lt;/</span>
				<span style="COLOR: #000000">decorator</span>
				<span style="COLOR: #000000">&gt;</span>
		</div>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align="left">
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">就应该可以搞定。</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align="left">
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">但怎么测，就是不使用这个</span>
				<span lang="EN-US">simple decorator</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。没办法，只好跟进</span>
				<span lang="EN-US">sitemesh</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">源码中去调试，进入</span>
				<span lang="EN-US">ParameterDecoratorMapper</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">类，它继承了</span>
				<span lang="EN-US">AbstractDecoratorMapper</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">类，然后有一个</span>
				<span lang="EN-US">init</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">方法一个</span>
				<span lang="EN-US">getDecorator</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">方法。各打一个断点，</span>
				<span lang="EN-US">init</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>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">启动就会执行，也正常初始化了，</span>
				<span lang="EN-US">getDecorator</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">方法却始终不调用，一时想不出办法。看到篇文章说不自己写</span>
				<span lang="EN-US">sitemesh.xml</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">而使用自带的</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: #2a00ff; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">com/opensymphony/module/sitemesh/factory/sitemesh-default.xml</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">也可以，于是备份并删除我写的</span>
				<span lang="EN-US">sitemesh.xml</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，居然成功了。为什么我写的就不行呢？差别一是我的简化了很多，只有</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align="left">
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align="left">
				<span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: teal; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">
						<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /?>
						<o:p>
						</o:p>
				</span>
		</p>
		<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">
				<p>
				</p>
				<div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
						<span style="COLOR: #0000ff">&lt;</span>
						<span style="COLOR: #800000">mapper<br /><img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />    </span>
						<span style="COLOR: #ff0000">class</span>
						<span style="COLOR: #0000ff">="com.opensymphony.module.sitemesh.mapper.ConfigDecoratorMapper"</span>
						<span style="COLOR: #0000ff">&gt;</span>
						<span style="COLOR: #000000">
								<br />
								<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
								<br />
								<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />           </span>
						<span style="COLOR: #0000ff">&lt;</span>
						<span style="COLOR: #800000">param </span>
						<span style="COLOR: #ff0000">name</span>
						<span style="COLOR: #0000ff">="config"</span>
						<span style="COLOR: #ff0000"> value</span>
						<span style="COLOR: #0000ff">="${decorators-file}"</span>
						<span style="COLOR: #ff0000"> </span>
						<span style="COLOR: #0000ff">/&gt;</span>
						<span style="COLOR: #000000">
								<br />
								<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
								<br />
								<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />       </span>
						<span style="COLOR: #0000ff">&lt;/</span>
						<span style="COLOR: #800000">mapper</span>
						<span style="COLOR: #0000ff">&gt;</span>
						<span style="COLOR: #000000">
								<br />
								<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
						</span>
				</div>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align="left">和刚加的</p>
		</span>
		<span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: #2a00ff; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">ParameterDecoratorMapper</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="FONT-SIZE: 10pt; COLOR: #2a00ff; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">ParameterDecoratorMapper</span>
		<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">放在了</span>
		<span lang="EN-US">ConfigDecoratorMapper</span>
		<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">后面，会不会是顺序原因呢，调换一下，果然成功了。问题是解决了，原理呢？再花点时间跟一下代码了解下原理，原来使用了</span>
		<span lang="EN-US">Factory</span>
		<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，它会调用各个配置的</span>
		<span lang="EN-US">Mapper</span>
		<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的</span>
		<span lang="EN-US">init</span>
		<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">方法，并放入</span>
		<span lang="EN-US">map</span>
		<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">中，然后到时选择一个</span>
		<span lang="EN-US">Mapper</span>
		<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，如果符合条件就使用，否则继续往下找。这里就有了顺序的问题，因为我在</span>
		<span lang="EN-US">decorator.xml</span>
		<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">中使用了<div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" /><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">decorator </span><span style="COLOR: #ff0000">name</span><span style="COLOR: #0000ff">="default"</span><span style="COLOR: #ff0000"> page</span><span style="COLOR: #0000ff">="default.jsp"</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #000000"><br /><img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />        </span><span style="COLOR: #0000ff">&lt;</span><span style="COLOR: #800000">pattern</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #000000">/*.html</span><span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">pattern</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #000000"><br /><img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" /><br /><img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />    </span><span style="COLOR: #0000ff">&lt;/</span><span style="COLOR: #800000">decorator</span><span style="COLOR: #0000ff">&gt;</span><span style="COLOR: #000000"><br /><img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" /></span></div><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align="left"></p></span>
		<span style="FONT-SIZE: 10pt; COLOR: teal; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">，这样如果</span>
		<span lang="EN-US">ConfigDecoratorMapper</span>
		<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">放在前面，他就先找这个</span>
		<span lang="EN-US">Mapper</span>
		<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，一看</span>
		<span lang="EN-US">saveSnippet.html?decorator=simple&amp;confirm=true</span>
		<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，符合</span>
		<span lang="EN-US">pattern</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="FONT-SIZE: 10pt; COLOR: #2a00ff; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">ParameterDecoratorMapper</span>
		<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">根本得不到机会，所以也进不了它的</span>
		<span lang="EN-US">getDecorator</span>
		<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">方法。换了顺序就是它先进去，所以执行，其它的</span>
		<span lang="EN-US">url</span>
		<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">也是先找它，但不匹配，就又交给</span>
		<span lang="EN-US">ConfigDecoratorMapper</span>
		<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">了。呵呵，问题也解决了，对</span>
		<span lang="EN-US">sitemesh</span>
		<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的认识又进了一步。</span>
<img src ="http://www.blogjava.net/pesome/aggbug/103175.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/pesome/" target="_blank">pesome</a> 2007-03-11 22:54 <a href="http://www.blogjava.net/pesome/archive/2007/03/11/103175.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>中文问题的解决</title><link>http://www.blogjava.net/pesome/archive/2007/03/11/103174.html</link><dc:creator>pesome</dc:creator><author>pesome</author><pubDate>Sun, 11 Mar 2007 14:51:00 GMT</pubDate><guid>http://www.blogjava.net/pesome/archive/2007/03/11/103174.html</guid><wfw:comment>http://www.blogjava.net/pesome/comments/103174.html</wfw:comment><comments>http://www.blogjava.net/pesome/archive/2007/03/11/103174.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/pesome/comments/commentRss/103174.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/pesome/services/trackbacks/103174.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'">这次给</span>
				<span lang="EN-US">openfans</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">做网摘功能，主体程序倒是很快就写完了，另外要做个</span>
				<span lang="EN-US">IE</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">插件，却碰到了不少问题。</span>
				<span lang="EN-US">IE</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">插件其实很简单，就是用</span>
				<span lang="EN-US">js</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">获得页面的标题、</span>
				<span lang="EN-US">url</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">和选择的内容，然后通过弹出窗口，将其送到服务器。这里就有中文的问题了，开始使用</span>
				<span lang="EN-US">escape</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，如</span>
				<span lang="EN-US">escape(title)</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">形式，</span>
				<span lang="EN-US">request.getParameter</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">碰到中文就为</span>
				<span lang="EN-US">null</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，网上搜了一通，说是可以通过</span>
				<span lang="EN-US">java</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">编码搞定，但拿到就为</span>
				<span lang="EN-US">null</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">了，还怎么换编码？忙活了好几个小时，又是</span>
				<span lang="EN-US">alert</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，又是</span>
				<span lang="EN-US">document.write</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，看上去也没什么问题。不</span>
				<span lang="EN-US">escape</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，直接在浏览器中输入带中文的</span>
				<span lang="EN-US">url</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，拿到的不为</span>
				<span lang="EN-US">null</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">了，拿到后，通过</span>
				<span lang="EN-US">new String(str.getBytes("ISO-8859-1"), "UTF-8");</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">还真显示正常了。但用</span>
				<span lang="EN-US">window.open</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">又出乱码了。看到文章说还有</span>
				<span lang="EN-US">encodeURIComponent</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">方法可用，就试了下，把</span>
				<span lang="EN-US">escape</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">换成</span>
				<span lang="EN-US">encodeURIComponent</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">居然搞定了，服务端还是得用</span>
				<span lang="EN-US">new String(str.getBytes("ISO-8859-1"), "UTF-8")</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>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，它的默认编码就是</span>
				<span lang="EN-US">"ISO-8859-1"</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，如果改了编码程序也得做相应的改动了。</span>
		</p>
<img src ="http://www.blogjava.net/pesome/aggbug/103174.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/pesome/" target="_blank">pesome</a> 2007-03-11 22:51 <a href="http://www.blogjava.net/pesome/archive/2007/03/11/103174.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>hibernate native sql的小技巧</title><link>http://www.blogjava.net/pesome/archive/2007/03/02/101402.html</link><dc:creator>pesome</dc:creator><author>pesome</author><pubDate>Fri, 02 Mar 2007 02:52:00 GMT</pubDate><guid>http://www.blogjava.net/pesome/archive/2007/03/02/101402.html</guid><wfw:comment>http://www.blogjava.net/pesome/comments/101402.html</wfw:comment><comments>http://www.blogjava.net/pesome/archive/2007/03/02/101402.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/pesome/comments/commentRss/101402.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/pesome/services/trackbacks/101402.html</trackback:ping><description><![CDATA[
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span style="COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">为了性能考虑，使用了</span>
				<span lang="EN-US" style="COLOR: black">native sql</span>
				<span style="COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。因为需要分页，需要</span>
				<span lang="EN-US" style="COLOR: black">2</span>
				<span style="COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">个</span>
				<span lang="EN-US" style="COLOR: black">sql</span>
				<span style="COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，一个获取</span>
				<span lang="EN-US" style="COLOR: black">list</span>
				<span style="COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">一个取得总数。获取</span>
				<span lang="EN-US" style="COLOR: black">list</span>
				<span style="COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">很好写：</span>
				<span lang="EN-US" style="COLOR: black">
						<br />
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"> </p>
		<div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee">
				<span style="COLOR: #008080"> 1</span>
				<img id="Codehighlighter1_67_356_Open_Image" onclick="this.style.display='none'; Codehighlighter1_67_356_Open_Text.style.display='none'; Codehighlighter1_67_356_Closed_Image.style.display='inline'; Codehighlighter1_67_356_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" />
				<img id="Codehighlighter1_67_356_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_67_356_Closed_Text.style.display='none'; Codehighlighter1_67_356_Open_Image.style.display='inline'; Codehighlighter1_67_356_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedBlock.gif" align="top" />
				<span style="COLOR: #0000ff">private</span>
				<span style="COLOR: #000000"> List getListByNativeSQL(</span>
				<span style="COLOR: #0000ff">final</span>
				<span style="COLOR: #000000"> Class cls, </span>
				<span style="COLOR: #0000ff">final</span>
				<span style="COLOR: #000000"> String sql) </span>
				<span id="Codehighlighter1_67_356_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
						<img src="http://www.blogjava.net/images/dot.gif" />
				</span>
				<span id="Codehighlighter1_67_356_Open_Text">
						<span style="COLOR: #000000">{<br /></span>
						<span style="COLOR: #008080"> 2</span>
						<span style="COLOR: #000000">
								<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />
								<br />
						</span>
						<span style="COLOR: #008080"> 3</span>
						<span style="COLOR: #000000">
								<img id="Codehighlighter1_146_347_Open_Image" onclick="this.style.display='none'; Codehighlighter1_146_347_Open_Text.style.display='none'; Codehighlighter1_146_347_Closed_Image.style.display='inline'; Codehighlighter1_146_347_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" />
								<img id="Codehighlighter1_146_347_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_146_347_Closed_Text.style.display='none'; Codehighlighter1_146_347_Open_Image.style.display='inline'; Codehighlighter1_146_347_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />       </span>
						<span style="COLOR: #0000ff">return</span>
						<span style="COLOR: #000000"> (List) getHibernateTemplate().execute(</span>
						<span style="COLOR: #0000ff">new</span>
						<span style="COLOR: #000000"> HibernateCallback() </span>
						<span id="Codehighlighter1_146_347_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
								<img src="http://www.blogjava.net/images/dot.gif" />
						</span>
						<span id="Codehighlighter1_146_347_Open_Text">
								<span style="COLOR: #000000">{<br /></span>
								<span style="COLOR: #008080"> 4</span>
								<span style="COLOR: #000000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />
										<br />
								</span>
								<span style="COLOR: #008080"> 5</span>
								<span style="COLOR: #000000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />           </span>
								<span style="COLOR: #0000ff">public</span>
								<span style="COLOR: #000000"> Object doInHibernate(Session session)<br /></span>
								<span style="COLOR: #008080"> 6</span>
								<span style="COLOR: #000000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />
										<br />
								</span>
								<span style="COLOR: #008080"> 7</span>
								<span style="COLOR: #000000">
										<img id="Codehighlighter1_250_337_Open_Image" onclick="this.style.display='none'; Codehighlighter1_250_337_Open_Text.style.display='none'; Codehighlighter1_250_337_Closed_Image.style.display='inline'; Codehighlighter1_250_337_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" />
										<img id="Codehighlighter1_250_337_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_250_337_Closed_Text.style.display='none'; Codehighlighter1_250_337_Open_Image.style.display='inline'; Codehighlighter1_250_337_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />                  </span>
								<span style="COLOR: #0000ff">throws</span>
								<span style="COLOR: #000000"> HibernateException </span>
								<span id="Codehighlighter1_250_337_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
										<img src="http://www.blogjava.net/images/dot.gif" />
								</span>
								<span id="Codehighlighter1_250_337_Open_Text">
										<span style="COLOR: #000000">{<br /></span>
										<span style="COLOR: #008080"> 8</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />
												<br />
										</span>
										<span style="COLOR: #008080"> 9</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />              </span>
										<span style="COLOR: #0000ff">return</span>
										<span style="COLOR: #000000"> session.createSQLQuery(sql).addEntity(cls).list();<br /></span>
										<span style="COLOR: #008080">10</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />
												<br />
										</span>
										<span style="COLOR: #008080">11</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />           }</span>
								</span>
								<span style="COLOR: #000000">
										<br />
								</span>
								<span style="COLOR: #008080">12</span>
								<span style="COLOR: #000000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />
										<br />
								</span>
								<span style="COLOR: #008080">13</span>
								<span style="COLOR: #000000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />       }</span>
						</span>
						<span style="COLOR: #000000">);<br /></span>
						<span style="COLOR: #008080">14</span>
						<span style="COLOR: #000000">
								<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />
								<br />
						</span>
						<span style="COLOR: #008080">15</span>
						<span style="COLOR: #000000">
								<img src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />    }</span>
				</span>
				<span style="COLOR: #000000">
						<br />
				</span>
				<span style="COLOR: #008080">16</span>
				<span style="COLOR: #000000">
						<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
				</span>
		</div>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"> </p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">获取总数查了下</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">hibernate</span>
				<span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">的</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">reference,</span>
				<span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">试了几次才明白用法</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">:<?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; TEXT-ALIGN: left; mso-layout-grid-align: none" align="left">
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">
						<o:p>
						</o:p>
				</span>
		</p>
		<span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">
				<div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee">
						<span style="COLOR: #008080"> 1</span>
						<img id="Codehighlighter1_57_411_Open_Image" onclick="this.style.display='none'; Codehighlighter1_57_411_Open_Text.style.display='none'; Codehighlighter1_57_411_Closed_Image.style.display='inline'; Codehighlighter1_57_411_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" />
						<img id="Codehighlighter1_57_411_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_57_411_Closed_Text.style.display='none'; Codehighlighter1_57_411_Open_Image.style.display='inline'; Codehighlighter1_57_411_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedBlock.gif" align="top" />
						<span style="COLOR: #0000ff">private</span>
						<span style="COLOR: #000000"> BigInteger getCountByNativeSQL(</span>
						<span style="COLOR: #0000ff">final</span>
						<span style="COLOR: #000000"> String sql) </span>
						<span id="Codehighlighter1_57_411_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
								<img src="http://www.blogjava.net/images/dot.gif" />
						</span>
						<span id="Codehighlighter1_57_411_Open_Text">
								<span style="COLOR: #000000">{<br /></span>
								<span style="COLOR: #008080"> 2</span>
								<span style="COLOR: #000000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />
										<br />
								</span>
								<span style="COLOR: #008080"> 3</span>
								<span style="COLOR: #000000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />       </span>
								<span style="COLOR: #0000ff">return</span>
								<span style="COLOR: #000000"> (BigInteger) getHibernateTemplate().execute(<br /></span>
								<span style="COLOR: #008080"> 4</span>
								<span style="COLOR: #000000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />
										<br />
								</span>
								<span style="COLOR: #008080"> 5</span>
								<span style="COLOR: #000000">
										<img id="Codehighlighter1_158_402_Open_Image" onclick="this.style.display='none'; Codehighlighter1_158_402_Open_Text.style.display='none'; Codehighlighter1_158_402_Closed_Image.style.display='inline'; Codehighlighter1_158_402_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" />
										<img id="Codehighlighter1_158_402_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_158_402_Closed_Text.style.display='none'; Codehighlighter1_158_402_Open_Image.style.display='inline'; Codehighlighter1_158_402_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />              </span>
								<span style="COLOR: #0000ff">new</span>
								<span style="COLOR: #000000"> HibernateCallback() </span>
								<span id="Codehighlighter1_158_402_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
										<img src="http://www.blogjava.net/images/dot.gif" />
								</span>
								<span id="Codehighlighter1_158_402_Open_Text">
										<span style="COLOR: #000000">{<br /></span>
										<span style="COLOR: #008080"> 6</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />
												<br />
										</span>
										<span style="COLOR: #008080"> 7</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />                  </span>
										<span style="COLOR: #0000ff">public</span>
										<span style="COLOR: #000000"> Object doInHibernate(Session session)<br /></span>
										<span style="COLOR: #008080"> 8</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />
												<br />
										</span>
										<span style="COLOR: #008080"> 9</span>
										<span style="COLOR: #000000">
												<img id="Codehighlighter1_276_385_Open_Image" onclick="this.style.display='none'; Codehighlighter1_276_385_Open_Text.style.display='none'; Codehighlighter1_276_385_Closed_Image.style.display='inline'; Codehighlighter1_276_385_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" />
												<img id="Codehighlighter1_276_385_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_276_385_Closed_Text.style.display='none'; Codehighlighter1_276_385_Open_Image.style.display='inline'; Codehighlighter1_276_385_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />                         </span>
										<span style="COLOR: #0000ff">throws</span>
										<span style="COLOR: #000000"> HibernateException </span>
										<span id="Codehighlighter1_276_385_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
												<img src="http://www.blogjava.net/images/dot.gif" />
										</span>
										<span id="Codehighlighter1_276_385_Open_Text">
												<span style="COLOR: #000000">{<br /></span>
												<span style="COLOR: #008080">10</span>
												<span style="COLOR: #000000">
														<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />
														<br />
												</span>
												<span style="COLOR: #008080">11</span>
												<span style="COLOR: #000000">
														<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />                     </span>
												<span style="COLOR: #0000ff">return</span>
												<span style="COLOR: #000000"> (BigInteger) (session.createSQLQuery(sql).uniqueResult());<br /></span>
												<span style="COLOR: #008080">12</span>
												<span style="COLOR: #000000">
														<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />
														<br />
												</span>
												<span style="COLOR: #008080">13</span>
												<span style="COLOR: #000000">
														<img src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />                  }</span>
										</span>
										<span style="COLOR: #000000">
												<br />
										</span>
										<span style="COLOR: #008080">14</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />
												<br />
										</span>
										<span style="COLOR: #008080">15</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />              }</span>
								</span>
								<span style="COLOR: #000000">);<br /></span>
								<span style="COLOR: #008080">16</span>
								<span style="COLOR: #000000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />
										<br />
								</span>
								<span style="COLOR: #008080">17</span>
								<span style="COLOR: #000000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />    }</span>
						</span>
						<span style="COLOR: #000000">
								<br />
						</span>
						<span style="COLOR: #008080">18</span>
						<span style="COLOR: #000000">
								<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
						</span>
				</div>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align="left">这里的</p>
		</span>
		<span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">sql</span>
		<span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">是“</span>
		<span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">select count(*)</span>
		<span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">开头的”。这里大家可能要问，为什么要使用</span>
		<span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">BigInteger</span>
		<span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">，因为如果用</span>
		<span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">uniqueResult()</span>
		<span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">默认就返回</span>
		<span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">BigInteger</span>
		<span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">，而</span>
		<span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">BigInteger cast</span>
		<span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">成</span>
		<span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">Integer</span>
		<span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">会出错。那么如果我就是要返回</span>
		<span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">Integer</span>
		<span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">呢，可以通过下面的办法实现：</span>
		<span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">
				<o:p>
				</o:p>
		</span>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align="left">
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">
						<o:p>
						</o:p>
				</span>
		</p>
		<span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">
				<div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee">
						<span style="COLOR: #008080"> 1</span>
						<img id="Codehighlighter1_54_440_Open_Image" onclick="this.style.display='none'; Codehighlighter1_54_440_Open_Text.style.display='none'; Codehighlighter1_54_440_Closed_Image.style.display='inline'; Codehighlighter1_54_440_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" />
						<img id="Codehighlighter1_54_440_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_54_440_Closed_Text.style.display='none'; Codehighlighter1_54_440_Open_Image.style.display='inline'; Codehighlighter1_54_440_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedBlock.gif" align="top" />
						<span style="COLOR: #0000ff">private</span>
						<span style="COLOR: #000000"> Integer getCountByNativeSQL(</span>
						<span style="COLOR: #0000ff">final</span>
						<span style="COLOR: #000000"> String sql) </span>
						<span id="Codehighlighter1_54_440_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
								<img src="http://www.blogjava.net/images/dot.gif" />
						</span>
						<span id="Codehighlighter1_54_440_Open_Text">
								<span style="COLOR: #000000">{<br /></span>
								<span style="COLOR: #008080"> 2</span>
								<span style="COLOR: #000000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />
										<br />
								</span>
								<span style="COLOR: #008080"> 3</span>
								<span style="COLOR: #000000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />       </span>
								<span style="COLOR: #0000ff">return</span>
								<span style="COLOR: #000000"> (Integer) getHibernateTemplate().execute(<br /></span>
								<span style="COLOR: #008080"> 4</span>
								<span style="COLOR: #000000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />
										<br />
								</span>
								<span style="COLOR: #008080"> 5</span>
								<span style="COLOR: #000000">
										<img id="Codehighlighter1_152_431_Open_Image" onclick="this.style.display='none'; Codehighlighter1_152_431_Open_Text.style.display='none'; Codehighlighter1_152_431_Closed_Image.style.display='inline'; Codehighlighter1_152_431_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" />
										<img id="Codehighlighter1_152_431_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_152_431_Closed_Text.style.display='none'; Codehighlighter1_152_431_Open_Image.style.display='inline'; Codehighlighter1_152_431_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />              </span>
								<span style="COLOR: #0000ff">new</span>
								<span style="COLOR: #000000"> HibernateCallback() </span>
								<span id="Codehighlighter1_152_431_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
										<img src="http://www.blogjava.net/images/dot.gif" />
								</span>
								<span id="Codehighlighter1_152_431_Open_Text">
										<span style="COLOR: #000000">{<br /></span>
										<span style="COLOR: #008080"> 6</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />
												<br />
										</span>
										<span style="COLOR: #008080"> 7</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />                  </span>
										<span style="COLOR: #0000ff">public</span>
										<span style="COLOR: #000000"> Object doInHibernate(Session session)<br /></span>
										<span style="COLOR: #008080"> 8</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />
												<br />
										</span>
										<span style="COLOR: #008080"> 9</span>
										<span style="COLOR: #000000">
												<img id="Codehighlighter1_270_414_Open_Image" onclick="this.style.display='none'; Codehighlighter1_270_414_Open_Text.style.display='none'; Codehighlighter1_270_414_Closed_Image.style.display='inline'; Codehighlighter1_270_414_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" />
												<img id="Codehighlighter1_270_414_Closed_Image" style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_270_414_Closed_Text.style.display='none'; Codehighlighter1_270_414_Open_Image.style.display='inline'; Codehighlighter1_270_414_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align="top" />                         </span>
										<span style="COLOR: #0000ff">throws</span>
										<span style="COLOR: #000000"> HibernateException </span>
										<span id="Codehighlighter1_270_414_Closed_Text" style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">
												<img src="http://www.blogjava.net/images/dot.gif" />
										</span>
										<span id="Codehighlighter1_270_414_Open_Text">
												<span style="COLOR: #000000">{<br /></span>
												<span style="COLOR: #008080">10</span>
												<span style="COLOR: #000000">
														<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />
														<br />
												</span>
												<span style="COLOR: #008080">11</span>
												<span style="COLOR: #000000">
														<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />                     </span>
												<span style="COLOR: #0000ff">return</span>
												<span style="COLOR: #000000"> (Integer) (session.createSQLQuery(sql).<strong>addScalar(</strong></span>
												<strong>
														<span style="COLOR: #000000">"</span>
														<span style="COLOR: #000000">count</span>
														<span style="COLOR: #000000">"</span>
												</strong>
												<span style="COLOR: #000000">
														<strong>, Hibernate.INTEGER).</strong>uniqueResult());<br /></span>
												<span style="COLOR: #008080">12</span>
												<span style="COLOR: #000000">
														<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />
														<br />
												</span>
												<span style="COLOR: #008080">13</span>
												<span style="COLOR: #000000">
														<img src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />                  }</span>
										</span>
										<span style="COLOR: #000000">
												<br />
										</span>
										<span style="COLOR: #008080">14</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />
												<br />
										</span>
										<span style="COLOR: #008080">15</span>
										<span style="COLOR: #000000">
												<img src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top" />              }</span>
								</span>
								<span style="COLOR: #000000">);<br /></span>
								<span style="COLOR: #008080">16</span>
								<span style="COLOR: #000000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align="top" />
										<br />
								</span>
								<span style="COLOR: #008080">17</span>
								<span style="COLOR: #000000">
										<img src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockEnd.gif" align="top" />    }</span>
						</span>
						<span style="COLOR: #000000">
								<br />
						</span>
						<span style="COLOR: #008080">18</span>
						<span style="COLOR: #000000">
								<img src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align="top" />
						</span>
				</div>
				<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align="left">大家注意粗体的部分，这里是给一个</p>
		</span>
		<span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">alias</span>
		<span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">赋予类型，那么</span>
		<span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">sql</span>
		<span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">就需要变成以</span>
		<span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">”select count(*) as count ”</span>
		<span style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">开头了。</span>
		<span lang="EN-US" style="COLOR: black">
				<o:p>
				</o:p>
		</span>
<img src ="http://www.blogjava.net/pesome/aggbug/101402.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/pesome/" target="_blank">pesome</a> 2007-03-02 10:52 <a href="http://www.blogjava.net/pesome/archive/2007/03/02/101402.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>php5+mysql5+apache2需要注意的几点</title><link>http://www.blogjava.net/pesome/archive/2007/01/14/93783.html</link><dc:creator>pesome</dc:creator><author>pesome</author><pubDate>Sun, 14 Jan 2007 09:34:00 GMT</pubDate><guid>http://www.blogjava.net/pesome/archive/2007/01/14/93783.html</guid><wfw:comment>http://www.blogjava.net/pesome/comments/93783.html</wfw:comment><comments>http://www.blogjava.net/pesome/archive/2007/01/14/93783.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/pesome/comments/commentRss/93783.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/pesome/services/trackbacks/93783.html</trackback:ping><description><![CDATA[今天为了在本机装个wordpress玩玩，搞了搞php5+mysql5+apache2。网上搜了一篇文档，很快就让php与apache跑起来了，但连mysql始终不行。报错：Call to undefined function mysql_connect()。查了一下半天，就是php关于mysql的ext没配好，但我改了php.ini啊，也把"extension=php_mysql.dll"放出来了。查了好久，看到一篇说php5需要加上"extension=php_mysqli.dll"，试了下果然好了。<br />     然后需要以index.php作为默认的welcomefile(不知道怎么叫，web.xml里是这个)，需要在"DirectoryIndex index.html index.html.var"后加上 index.php就行。<br />然后飞快的装了phpmyadmin、dvbbs的php版。发现php应用的安装的确很是方便，解压，拷贝到htdocs下，马上就能运行了，比java应用简单的多，更别提复杂的要死的企业应用了。这点上java要好好向php学习啊。<img src ="http://www.blogjava.net/pesome/aggbug/93783.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/pesome/" target="_blank">pesome</a> 2007-01-14 17:34 <a href="http://www.blogjava.net/pesome/archive/2007/01/14/93783.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>准备给openfans添加spring2.0支持</title><link>http://www.blogjava.net/pesome/archive/2006/12/28/90499.html</link><dc:creator>pesome</dc:creator><author>pesome</author><pubDate>Thu, 28 Dec 2006 07:15:00 GMT</pubDate><guid>http://www.blogjava.net/pesome/archive/2006/12/28/90499.html</guid><wfw:comment>http://www.blogjava.net/pesome/comments/90499.html</wfw:comment><comments>http://www.blogjava.net/pesome/archive/2006/12/28/90499.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.blogjava.net/pesome/comments/commentRss/90499.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/pesome/services/trackbacks/90499.html</trackback:ping><description><![CDATA[  学习了下spring2.0。对openfans而言，有2个比较重要的改进。首先是aspectj的支持，可以方便的使用aspectj语法定义aspect和pointcut了，openfans准备在domain object的自动注入上和权限等方面使用aop。另外就是spring form标签库的引入，现在springmvc也有自己的标签库，以前自己给checkbox和radio写的request.getParameter可以改写了。<img src ="http://www.blogjava.net/pesome/aggbug/90499.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/pesome/" target="_blank">pesome</a> 2006-12-28 15:15 <a href="http://www.blogjava.net/pesome/archive/2006/12/28/90499.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>一个定时更新cache框架</title><link>http://www.blogjava.net/pesome/archive/2006/12/13/87485.html</link><dc:creator>pesome</dc:creator><author>pesome</author><pubDate>Wed, 13 Dec 2006 06:46:00 GMT</pubDate><guid>http://www.blogjava.net/pesome/archive/2006/12/13/87485.html</guid><wfw:comment>http://www.blogjava.net/pesome/comments/87485.html</wfw:comment><comments>http://www.blogjava.net/pesome/archive/2006/12/13/87485.html#Feedback</comments><slash:comments>7</slash:comments><wfw:commentRss>http://www.blogjava.net/pesome/comments/commentRss/87485.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/pesome/services/trackbacks/87485.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 应项目需要做了一个定时更新的				cache				框架，采用				spring+quartz				很方便的实现，可以适用任何需要定时才更新的地方，比如静态网页				cache				等。代码很简单：								---------------------------------QuartzCacheHandler-------------------...&nbsp;&nbsp;<a href='http://www.blogjava.net/pesome/archive/2006/12/13/87485.html'>阅读全文</a><img src ="http://www.blogjava.net/pesome/aggbug/87485.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/pesome/" target="_blank">pesome</a> 2006-12-13 14:46 <a href="http://www.blogjava.net/pesome/archive/2006/12/13/87485.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>用Maven做项目管理</title><link>http://www.blogjava.net/pesome/archive/2006/09/21/71045.html</link><dc:creator>pesome</dc:creator><author>pesome</author><pubDate>Thu, 21 Sep 2006 03:37:00 GMT</pubDate><guid>http://www.blogjava.net/pesome/archive/2006/09/21/71045.html</guid><wfw:comment>http://www.blogjava.net/pesome/comments/71045.html</wfw:comment><comments>http://www.blogjava.net/pesome/archive/2006/09/21/71045.html#Feedback</comments><slash:comments>6</slash:comments><wfw:commentRss>http://www.blogjava.net/pesome/comments/commentRss/71045.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/pesome/services/trackbacks/71045.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 在程序员发表的一篇maven文章，跟大家共享。用																		Maven																做项目管理																								在						Java世界中我们很多的开发人员选择用						Ant来构建项目，一个						build.xml能够完成编译、测试、打包、部署等很多任务，但我们...&nbsp;&nbsp;<a href='http://www.blogjava.net/pesome/archive/2006/09/21/71045.html'>阅读全文</a><img src ="http://www.blogjava.net/pesome/aggbug/71045.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/pesome/" target="_blank">pesome</a> 2006-09-21 11:37 <a href="http://www.blogjava.net/pesome/archive/2006/09/21/71045.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>结合openfans谈算法的重要性</title><link>http://www.blogjava.net/pesome/archive/2006/07/12/57805.html</link><dc:creator>pesome</dc:creator><author>pesome</author><pubDate>Wed, 12 Jul 2006 07:01:00 GMT</pubDate><guid>http://www.blogjava.net/pesome/archive/2006/07/12/57805.html</guid><wfw:comment>http://www.blogjava.net/pesome/comments/57805.html</wfw:comment><comments>http://www.blogjava.net/pesome/archive/2006/07/12/57805.html#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://www.blogjava.net/pesome/comments/commentRss/57805.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/pesome/services/trackbacks/57805.html</trackback:ping><description><![CDATA[
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0">
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">不经意看到了程序员的一期算法专题，细细研读多位高手（包括李开复）的文字之后，对算法的重要性重新进行了反思。我研究生毕业</span>
				<span lang="EN-US">2</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">年，一直从事</span>
				<span lang="EN-US">J2EE</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">开发，由于项目的原因，很少需要自己去设计算法，甚至</span>
				<span lang="EN-US">stack</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，</span>
				<span lang="EN-US">tree</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">这些数据结构都很少使用。还好自己也不甘于平淡，如</span>
				<span lang="EN-US">Effective Java</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，</span>
				<span lang="EN-US">Practical Java</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，</span>
				<span lang="EN-US">Refactory</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，</span>
				<span lang="EN-US">Design Pattern</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">等等这些流行书还是抽空学习，这些书的确很是经典，对我的编码风格，模式的理解，设计能力都起到了很好的促进。也快速的由一个程序员成长为架构师（只是公司的，离真正的架构师还差得远）。</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0">
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">因为项目需要，去年下半年开始全面接触开源软件，使用了</span>
				<span lang="EN-US">spring</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，</span>
				<span lang="EN-US">maven</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，</span>
				<span lang="EN-US">hibernate</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，</span>
				<span lang="EN-US">ibatis</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">等众多开源软件，也对开源软件产生了浓厚的兴趣，于是拿这些开源软件做了</span>
				<span lang="EN-US">openfans</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，一方面是推进开源软件在中国的使用的交流，一方面也为自己在实践中更多使用这些软件（因为没有项目和利益因素，可以做想做的事，用想用的软件）。使用这些开源软件倒很是顺利，很多软件拿来就能用，都有</span>
				<span lang="EN-US">sample</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，简单使用还是不难的。</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0">
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">但一些关键的问题一直悬而未决！比如</span>
				<span lang="EN-US">tag</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的设计：我现在简单的使用平铺的模型，</span>
				<span lang="EN-US">tag</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">没有层次之分，</span>
				<span lang="EN-US">tag</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">间产生双向关联。但这样是最符合</span>
				<span lang="EN-US">tag</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">特性的模型吗？如何对这些</span>
				<span lang="EN-US">tag</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">进行分类，如何定义</span>
				<span lang="EN-US">tag</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的多级关联（如</span>
				<span lang="EN-US">spring</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">和</span>
				<span lang="EN-US">hibernate</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">有关联，</span>
				<span lang="EN-US">hibernate</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">又与持久层关联，</span>
				<span lang="EN-US">spring</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">是否与持久层有间接关联，依次类推）。。。。。。而做出一个好的</span>
				<span lang="EN-US">tag</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">模型，可能就需要图论方面的知识。再比如用户相似度设计（号称是豆瓣的核心，难以复制）：每个用户拥有了一些</span>
				<span lang="EN-US">tag</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，如何根据这些</span>
				<span lang="EN-US">tag</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">定义用户的相似度，一个用户有</span>
				<span lang="EN-US">spring</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，</span>
				<span lang="EN-US">hibernate</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">这</span>
				<span lang="EN-US">2</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">个</span>
				<span lang="EN-US">tag</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，一个用户有</span>
				<span lang="EN-US">spring</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，</span>
				<span lang="EN-US">ibatis</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">这</span>
				<span lang="EN-US">2</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">个</span>
				<span lang="EN-US">tag</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，他们相似度为多少，如果每个人</span>
				<span lang="EN-US">tag</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">都很多，再加上权重的概念，问题又复杂的多。简单的做法就是每个用户</span>
				<span lang="EN-US">tag</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">一个个匹配，匹配的越多相似度越大，但这样设计一是不准确，二是时间复杂度很大，最坏情况为</span>
				<span lang="EN-US">n*n*m*m</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，</span>
				<span lang="EN-US">n</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">为用户数，</span>
				<span lang="EN-US">m</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">为每个用户的</span>
				<span lang="EN-US">tag</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">数。</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0">
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">这些都需要扎实的算法基础。而我的基础就很薄弱：本科学的比文科还文科的专业，研究生又学的比较上层的东西（</span>
				<span lang="EN-US">UML</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，</span>
				<span lang="EN-US">RUP</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，</span>
				<span lang="EN-US">PM</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">等，也都一知半解），选修了一门算法导论，又被</span>
				<span lang="EN-US">1000</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">多页的经典英文教材吓趴下了，上了几次课就直接放弃，没敢参加最后考试。现在想临时抱佛脚，谈何容易。</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0">
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">所以算法也并非没有用处，关键要看你在做什么，想做什么。想去</span>
				<span lang="EN-US">google</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">、百度不用会</span>
				<span lang="EN-US">spring</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，算法基础扎实，只会</span>
				<span lang="EN-US">c</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">语言都行；一些行业如电信、金融也很是需要算法高手。而国内更多的企业做企业应用，一般是连连数据库，写写页面，最多引入些开源框架和软件，如</span>
				<span lang="EN-US">spring</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，</span>
				<span lang="EN-US">hibernate</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，</span>
				<span lang="EN-US">struts</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">等。这方面的需求较大，会了</span>
				<span lang="EN-US">spring</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，省了公司的培训成本，自然还是给找工作加了一些砝码。</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0">
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">所以有时听到某些人对某项技术不以为然，说“这些东西有什么是我在几个星期学不会的”的时候，一方面是对其狂妄进行些鄙视，一方面也真要问问自己，我的核心价值到底在哪。这个问题很重要，涉及面很广，选择也很多，而我也只是有些模糊的答案，等以后再仔细写写。</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0">
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">不管如何，我是要开始研究算法了，得解决问题阿！先在</span>
				<span lang="EN-US">openfans</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">开个算法的</span>
				<span lang="EN-US">tag</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，一边学一边积累，对算法有兴趣的同学也可以跟我一块进步。</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0">
				<span lang="EN-US">PS</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">：做个广告，</span>
				<span lang="EN-US">blogjava</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">很多好的</span>
				<span lang="EN-US">bloger</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，能否到</span>
				<span lang="EN-US">
						<a href="http://www.openfans.net/">www.openfans.net</a>
				</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">导入下</span>
				<span lang="EN-US">blog</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，跟大家分享下你的感悟，谢谢！</span>
		</p>
<img src ="http://www.blogjava.net/pesome/aggbug/57805.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/pesome/" target="_blank">pesome</a> 2006-07-12 15:01 <a href="http://www.blogjava.net/pesome/archive/2006/07/12/57805.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>openfans新功能，欢迎大家使用</title><link>http://www.blogjava.net/pesome/archive/2006/06/09/51666.html</link><dc:creator>pesome</dc:creator><author>pesome</author><pubDate>Fri, 09 Jun 2006 04:42:00 GMT</pubDate><guid>http://www.blogjava.net/pesome/archive/2006/06/09/51666.html</guid><wfw:comment>http://www.blogjava.net/pesome/comments/51666.html</wfw:comment><comments>http://www.blogjava.net/pesome/archive/2006/06/09/51666.html#Feedback</comments><slash:comments>6</slash:comments><wfw:commentRss>http://www.blogjava.net/pesome/comments/commentRss/51666.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/pesome/services/trackbacks/51666.html</trackback:ping><description><![CDATA[
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0">
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">很不好意思，不是原创技术。做个广告，有不妥，欢迎管理员从首页拿掉。<br />    你是开源软件的爱好者，平时学习和使用这些软件，也不时写写</span>
				<span lang="EN-US">blog</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，记下些心得。</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0">
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">你是开源软件的传播者，你希望更多的人了解和使用开源软件，希望你的文章被更多的人阅读，并展开更深刻的讨论。</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0">
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">你是开源软件的参与者，平时参与参与国外的开源项目，也希望中国能有更多的开源团体，大家一起做国人自己的开源软件。。。。。。</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0">
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">只要你对开源软件保持着一份热爱，欢迎来到</span>
				<span lang="EN-US">openfans(<a href="http://www.openfans.net/">www.openfans.net</a>)</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0">
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">非常方便的<b style="mso-bidi-font-weight: normal">注册</b>后，你就可以点击“<b style="mso-bidi-font-weight: normal">提交</b></span>
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US">feed</span>
				</b>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">”，只要输入你的</span>
				<span lang="EN-US">rss</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">地址（由于时间原因，还没做直接从</span>
				<span lang="EN-US">web</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">地址发现</span>
				<span lang="EN-US">feed</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">），就可以将你的</span>
				<span lang="EN-US">feed</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">加入，同时我们对一些网站提供了简单的匹配（如</span>
				<span lang="EN-US">blogjava</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，只需输入你在</span>
				<span lang="EN-US">blogjava</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的用户名，系统会自动匹配成你在</span>
				<span lang="EN-US">blogjava</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的</span>
				<span lang="EN-US">feed</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">）。完成后，点击“<b style="mso-bidi-font-weight: normal">立即导入</b>”，就可以将你的文章入库，点击“<b style="mso-bidi-font-weight: normal">最新日志</b>”可以查看。以后系统会每日定期读取你的</span>
				<span lang="EN-US">feed</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，自动将新的文章加入。由于你提供的是</span>
				<span lang="EN-US">rss</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，内容应该是文章的简短描述（视你的</span>
				<span lang="EN-US">blog</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">提供商而定），而且我们会为每篇文章提供<b style="mso-bidi-font-weight: normal">原文链接</b>，直接指向你的</span>
				<span lang="EN-US">blog</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">原文。</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0">
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">导入的日志一般是没有进行分类的，不方便大家的查找。在每篇日志上都有个“<b style="mso-bidi-font-weight: normal">我要推荐</b>”链接，点击并输入你认为适合的标签（如</span>
				<span lang="EN-US">spring</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，</span>
				<span lang="EN-US">hibernate</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，</span>
				<span lang="EN-US">cms</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">）等，就可以把这篇日志形成文章，放在相应的标签下，永久保存。需要学习</span>
				<span lang="EN-US">spring</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，</span>
				<span lang="EN-US">hibernate</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，</span>
				<span lang="EN-US">cms</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的后来者，可以方便的查找到标签和软件，找到你的文章，进而进入你的</span>
				<span lang="EN-US">blog</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0">
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">同时你也可以发表文章，推荐软件，创建和加入小组，进行评论。。。。。。我们会不断完善功能，给大家提供更方便的功能和更好的用户体验。</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0">
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">由于现在人员较少，开发进度较慢。但先做个广告，下一步会做</span>
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US">digg</span>
				</b>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，提供对软件、文章、用户等的</span>
				<span lang="EN-US">digg</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。做对一些<b style="mso-bidi-font-weight: normal">标签的</b></span>
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US">rss</span>
				</b>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，如</span>
				<span lang="EN-US">springframework</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">网站的</span>
				<span lang="EN-US">rss</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，自动获取</span>
				<span lang="EN-US">spring</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的版本更新信息。还要完善<b style="mso-bidi-font-weight: normal">小组功能</b>和<b style="mso-bidi-font-weight: normal">好友功能</b>，给大家提供一个方便交流的平台。</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0">
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">网站拿</span>
				<span lang="EN-US">java</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的一堆开源软件做成，同时本身也是开源软件，希望参与的同学可以</span>
				<span lang="EN-US">email</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">给</span>
				<span lang="EN-US">pesome@gmail.com</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，大家一块为推动开源软件在中国的发展做出自己的贡献。</span>
		</p>
<img src ="http://www.blogjava.net/pesome/aggbug/51666.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/pesome/" target="_blank">pesome</a> 2006-06-09 12:42 <a href="http://www.blogjava.net/pesome/archive/2006/06/09/51666.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>maven换到jdk1.5的问题解决</title><link>http://www.blogjava.net/pesome/archive/2006/05/29/48790.html</link><dc:creator>pesome</dc:creator><author>pesome</author><pubDate>Mon, 29 May 2006 09:11:00 GMT</pubDate><guid>http://www.blogjava.net/pesome/archive/2006/05/29/48790.html</guid><wfw:comment>http://www.blogjava.net/pesome/comments/48790.html</wfw:comment><comments>http://www.blogjava.net/pesome/archive/2006/05/29/48790.html#Feedback</comments><slash:comments>3</slash:comments><wfw:commentRss>http://www.blogjava.net/pesome/comments/commentRss/48790.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/pesome/services/trackbacks/48790.html</trackback:ping><description><![CDATA[
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span style="FONT-SIZE: 12pt; FONT-FAMILY: 楷体_GB2312">  前面<span lang="EN-US">openfans</span>用的<span lang="EN-US">JDK1.4</span>，今天下决心换成<span lang="EN-US">1.5</span>了。运行倒是好好的，在<span lang="EN-US">jetty</span>下也没有什么问题。一不小心点了下<span lang="EN-US">eclipse</span>里我做的<span lang="EN-US">mvn eclipse:eclipse</span>的<span lang="EN-US">External Tools</span>，就开始<span lang="EN-US">maven</span>了。停也没用了，等着吧。结果报错：<span lang="EN-US" style="COLOR: black">D:\javaproject\openfans\main\src\org\openfans\domain\Group.java:[29,19] -source 1.3 </span><span style="COLOR: black">中不支持泛型（请尝试使用<span lang="EN-US"> -source 1.5 </span>以启用泛型）。看了看<span lang="EN-US">maven</span>的<span lang="EN-US">bat</span>，会自动使用环境变量配置的<span lang="EN-US">jdk</span>，应该没问题啊。还好我网上认识人多，想起<span lang="EN-US">alin</span>用的<span lang="EN-US">jdk1.5</span>，就问他怎么回事。发过来这个：<span lang="EN-US"><?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /?><o:p></o:p></span></span></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align="left">
				<span lang="EN-US" style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: teal; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: white">&lt;</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: #3f7f7f; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: white">plugin</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: teal; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: white">&gt;</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align="left">
				<span lang="EN-US" style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: black; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: white">
						<span style="mso-tab-count: 2">       </span>
				</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: teal; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: white">&lt;</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: #3f7f7f; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: white">artifactId</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: teal; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: white">&gt;</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: black; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: white">maven-compiler-plugin</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: teal; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: white">&lt;/</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: #3f7f7f; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: white">artifactId</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: teal; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: white">&gt;</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align="left">
				<span lang="EN-US" style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: black; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: white">
						<span style="mso-tab-count: 4">              </span>
				</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: teal; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: white">&lt;</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: #3f7f7f; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: white">configuration</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: teal; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: white">&gt;</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align="left">
				<span lang="EN-US" style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: black; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: white">
						<span style="mso-tab-count: 5">                  </span>
				</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: teal; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: white">&lt;</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: #3f7f7f; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: white">source</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: teal; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: white">&gt;</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: black; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: white">1.5</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: teal; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: white">&lt;/</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: #3f7f7f; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: white">source</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: teal; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: white">&gt;</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align="left">
				<span lang="EN-US" style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: black; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: white">
						<span style="mso-tab-count: 5">                  </span>
				</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: teal; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: white">&lt;</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: #3f7f7f; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: white">target</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: teal; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: white">&gt;</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: black; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: white">1.5</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: teal; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: white">&lt;/</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: #3f7f7f; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: white">target</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: teal; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: white">&gt;</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: left; mso-layout-grid-align: none" align="left">
				<span lang="EN-US" style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: black; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: white">
						<span style="mso-tab-count: 4">              </span>
				</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: teal; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: white">&lt;/</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: #3f7f7f; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: white">configuration</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: teal; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: white">&gt;</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US" style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: teal; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: white">&lt;/</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: #3f7f7f; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: white">plugin</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; BACKGROUND: white; COLOR: teal; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt; mso-highlight: white">&gt;</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: teal; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span style="FONT-SIZE: 10pt; COLOR: teal; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">我一看就明白了，</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: teal; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">mvn</span>
				<span style="FONT-SIZE: 10pt; COLOR: teal; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">时是用</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: teal; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">1.3</span>
				<span style="FONT-SIZE: 10pt; COLOR: teal; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">给我编译的，得告诉它用</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: teal; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">1.5</span>
				<span style="FONT-SIZE: 10pt; COLOR: teal; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">。拷到</span>
				<span lang="EN-US" style="FONT-SIZE: 10pt; COLOR: teal; FONT-FAMILY: 'Courier New'; mso-font-kerning: 0pt">pom</span>
				<span style="FONT-SIZE: 10pt; COLOR: teal; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-family: 'Courier New'; mso-font-kerning: 0pt">文件中，再</span>
				<span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 楷体_GB2312">mvn eclipse:eclipse</span>
				<span style="FONT-SIZE: 12pt; FONT-FAMILY: 楷体_GB2312">搞定。问题是很快解决了，同时却留下了很多思考：<span lang="EN-US"><o:p></o:p></span></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l0 level1 lfo1; tab-stops: list 18.0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 楷体_GB2312; mso-bidi-font-family: 楷体_GB2312">
								<span style="mso-list: Ignore">1．<span style="FONT: 7pt 'Times New Roman'"></span></span>
						</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span style="FONT-SIZE: 12pt; FONT-FAMILY: 楷体_GB2312">技术没有止境，做人一定要谦虚。</span>
				</b>
				<span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 楷体_GB2312">Maven2</span>
				<span style="FONT-SIZE: 12pt; FONT-FAMILY: 楷体_GB2312">我用的也算比较早，还曾经被白衣说是对<span lang="EN-US">maven2</span>的推广做了贡献的，自己也颇以为然。而现在这个简单的问题却不知道了，还得<span lang="EN-US">google</span>或问人解决。还好我一直比较谦虚（本身也没啥可骄傲的资本），否则要狂被鄙视了。<span lang="EN-US"><o:p></o:p></span></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l0 level1 lfo1; tab-stops: list 18.0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 楷体_GB2312; mso-bidi-font-family: 楷体_GB2312">
								<span style="mso-list: Ignore">2．<span style="FONT: 7pt 'Times New Roman'"></span></span>
						</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span style="FONT-SIZE: 12pt; FONT-FAMILY: 楷体_GB2312">技术的推广要不遗余力，好的东西要让大家都知道。</span>
				</b>
				<span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 楷体_GB2312">Maven2</span>
				<span style="FONT-SIZE: 12pt; FONT-FAMILY: 楷体_GB2312">我也只是使用，了解并不深入（项目中碰到了的知道，没碰到的就不懂了），但我是到处推荐，碰到个人就说这个好。这下很多朋友都知道了，也引入项目实践了。一方面他们用的舒服，提高了效率，有点问题还可以向我这个所谓的<span lang="EN-US">maven2</span>高手请教，我自是“知无不言，言无不尽”；另一方面，他们也许就碰到其它问题了，然后知道如何解决，在我碰到类似问题时，就可以向他们请教了。你看，多好的良性循环，想想都美滋滋的。<span lang="EN-US"><o:p></o:p></span></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l0 level1 lfo1; tab-stops: list 18.0pt">
				<b style="mso-bidi-font-weight: normal">
						<span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 楷体_GB2312; mso-bidi-font-family: 楷体_GB2312">
								<span style="mso-list: Ignore">3．<span style="FONT: 7pt 'Times New Roman'"></span></span>
						</span>
				</b>
				<b style="mso-bidi-font-weight: normal">
						<span style="FONT-SIZE: 12pt; FONT-FAMILY: 楷体_GB2312">多进行知识共享，大家的智慧比个人强。</span>
				</b>
				<span style="FONT-SIZE: 12pt; FONT-FAMILY: 楷体_GB2312">这是从更高的角度看了，通过知识的共享，能迅速集合大家的经验和智慧，让个体更快的进行学习，少走弯路。你共享自己知识的同时，也能获得别人的成果。如果你知道谁<span lang="EN-US">spring</span>比较强，谁<span lang="EN-US">hibernate</span>比较强，谁在用<span lang="EN-US">maven</span>，而且碰到问题能看他们的文章或直接向他们请教，做起项目来是不是都安心的多。可能有人说有<span lang="EN-US">google</span>，但<span lang="EN-US">google</span>信息量太大，而且很多文章是处处转载千篇一律，经常半天找不到东西。我是深有体会，所以想到做<span lang="EN-US">openfans</span>，做一个知识共享的平台，并做到去糟取精。现在还远远达不到要求，但我会努力的。<span lang="EN-US"><o:p></o:p></span></span>
		</p>
<img src ="http://www.blogjava.net/pesome/aggbug/48790.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/pesome/" target="_blank">pesome</a> 2006-05-29 17:11 <a href="http://www.blogjava.net/pesome/archive/2006/05/29/48790.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>jetty与maven集成</title><link>http://www.blogjava.net/pesome/archive/2006/05/15/46179.html</link><dc:creator>pesome</dc:creator><author>pesome</author><pubDate>Mon, 15 May 2006 03:19:00 GMT</pubDate><guid>http://www.blogjava.net/pesome/archive/2006/05/15/46179.html</guid><wfw:comment>http://www.blogjava.net/pesome/comments/46179.html</wfw:comment><comments>http://www.blogjava.net/pesome/archive/2006/05/15/46179.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/pesome/comments/commentRss/46179.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/pesome/services/trackbacks/46179.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 自己做个小项目，使用了										maven2								，一直使用										tomcat								，但很不方便。采用直接改				server.xml				指向项目路径的方法，但这样要求把编译路径改向				WEB-INF/classes				，而且要求把需要的				jar				放到				WEB-I...&nbsp;&nbsp;<a href='http://www.blogjava.net/pesome/archive/2006/05/15/46179.html'>阅读全文</a><img src ="http://www.blogjava.net/pesome/aggbug/46179.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/pesome/" target="_blank">pesome</a> 2006-05-15 11:19 <a href="http://www.blogjava.net/pesome/archive/2006/05/15/46179.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>sf上将cvs切换成svn经验</title><link>http://www.blogjava.net/pesome/archive/2006/04/05/39337.html</link><dc:creator>pesome</dc:creator><author>pesome</author><pubDate>Wed, 05 Apr 2006 04:15:00 GMT</pubDate><guid>http://www.blogjava.net/pesome/archive/2006/04/05/39337.html</guid><wfw:comment>http://www.blogjava.net/pesome/comments/39337.html</wfw:comment><comments>http://www.blogjava.net/pesome/archive/2006/04/05/39337.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/pesome/comments/commentRss/39337.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/pesome/services/trackbacks/39337.html</trackback:ping><description><![CDATA[
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0">
				<span lang="EN-US">Sf</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的</span>
				<span lang="EN-US">cvs</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">一直不好，也不知道什么原因</span>
				<span lang="EN-US">.</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">前面听白衣说过，可以一键切换到</span>
				<span lang="EN-US">svn.</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">今天就试了试，找了半天，在</span>
				<span lang="EN-US">admin-&gt; svn</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">下找到了</span>
				<span lang="EN-US">migrate</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">这个链接，点一下进入</span>
				<span lang="EN-US">migrate</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">界面，什么都不用改，直接点下面的确认按钮就搞定。这时的状态是</span>
				<span lang="EN-US">wating</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，号称要等</span>
				<span lang="EN-US">1-3</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">小时才能搞定。我等不及，隔了一会就刷新，结果状态已经变成</span>
				<span lang="EN-US">complete</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">了。</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0">
				<span lang="EN-US" style="FONT-FAMILY: Arial">svn</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">地址为</span>
				<span lang="EN-US" style="FONT-FAMILY: Arial">:https://svn.sourceforge.net/svnroot/openfans/<br /></span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">然后拿小海龟试了下</span>
				<span lang="EN-US" style="FONT-FAMILY: Arial">,</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">可以访问</span>
				<span lang="EN-US" style="FONT-FAMILY: Arial">.</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">拿</span>
				<span lang="EN-US" style="FONT-FAMILY: Arial">svn</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">的</span>
				<span lang="EN-US" style="FONT-FAMILY: Arial">eclipse</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">插件下载也成功了</span>
				<span lang="EN-US" style="FONT-FAMILY: Arial">,</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">通过</span>
				<span lang="EN-US" style="FONT-FAMILY: Arial">updatesite</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">可以下载这个插件</span>
				<span lang="EN-US" style="FONT-FAMILY: Arial">(<a href="http://www.polarion.org/projects/subversive/download/update-site/">http://www.polarion.org/projects/subversive/download/update-site/</a>)</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">。打开插件窗口，界面跟</span>
				<span lang="EN-US" style="FONT-FAMILY: Arial">cvs</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">基本类似，我先试</span>
				<span lang="EN-US" style="FONT-FAMILY: Arial">commit</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">功能，正好把前面</span>
				<span lang="EN-US" style="FONT-FAMILY: Arial">cvs</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">的本机改动提交上去。</span>
				<span lang="EN-US" style="FONT-FAMILY: Arial">
						<?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; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0">
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">结果报</span>
				<span lang="EN-US" style="FONT-FAMILY: Arial">403 forbiden</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">错。</span>
				<span lang="EN-US" style="FONT-FAMILY: Arial">Google</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">，看到白衣也碰到同样问题，结果迁到</span>
				<span lang="EN-US" style="FONT-FAMILY: Arial">scud</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">上去了。我只好点些老外的论坛回复看，看到一个解决问题的回复。号称要</span>
				<span lang="EN-US" style="FONT-FAMILY: Arial">admin-&gt;member</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">，我便照做，一看多了个</span>
				<span lang="EN-US" style="FONT-FAMILY: Arial">svn</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">的</span>
				<span lang="EN-US" style="FONT-FAMILY: Arial">permission</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">框，把自己的先勾上，</span>
				<span lang="EN-US" style="FONT-FAMILY: Arial">Update</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">。然后重新</span>
				<span lang="EN-US" style="FONT-FAMILY: Arial">commit</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">，搞定。</span>
				<span lang="EN-US" style="FONT-FAMILY: Arial">Sf</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">的</span>
				<span lang="EN-US" style="FONT-FAMILY: Arial">svn</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">速度飞快，比</span>
				<span lang="EN-US" style="FONT-FAMILY: Arial">cvs</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">快多了，这下也省得自己搞</span>
				<span lang="EN-US" style="FONT-FAMILY: Arial">svn</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">了。把这个成功经验写出来，也可以给后面的人一个参考。</span>
		</p>
<img src ="http://www.blogjava.net/pesome/aggbug/39337.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/pesome/" target="_blank">pesome</a> 2006-04-05 12:15 <a href="http://www.blogjava.net/pesome/archive/2006/04/05/39337.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>openfans快速配置指南</title><link>http://www.blogjava.net/pesome/archive/2006/04/01/38644.html</link><dc:creator>pesome</dc:creator><author>pesome</author><pubDate>Sat, 01 Apr 2006 13:05:00 GMT</pubDate><guid>http://www.blogjava.net/pesome/archive/2006/04/01/38644.html</guid><wfw:comment>http://www.blogjava.net/pesome/comments/38644.html</wfw:comment><comments>http://www.blogjava.net/pesome/archive/2006/04/01/38644.html#Feedback</comments><slash:comments>8</slash:comments><wfw:commentRss>http://www.blogjava.net/pesome/comments/commentRss/38644.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/pesome/services/trackbacks/38644.html</trackback:ping><description><![CDATA[
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0">
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">应牛牛和</span>
				<span lang="EN-US">lucky</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的要求，写一份</span>
				<span lang="EN-US">openfans</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的快速配置指南，也就是介绍如何在你的机器上把下载下来的</span>
				<span lang="EN-US">openfans</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">跑起来。首先使用</span>
				<span lang="EN-US">maven</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，需要下载</span>
				<span lang="EN-US">maven</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，</span>
				<span lang="EN-US">
						<a href="http://www.openfans.net/">www.openfans.net</a>
				</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">里可以输入</span>
				<span lang="EN-US">maven</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">进行搜索，有它的介绍和主页，还有我写的一篇简单的</span>
				<span lang="EN-US">maven</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">上手文章。</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0">
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">如果使用</span>
				<span lang="EN-US">eclipse</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，在项目根目录，也就是</span>
				<span lang="EN-US">pom.xml</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">所在目录，运行</span>
				<span lang="EN-US">mvn eclipse:eclipse(</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">如初次使用，会花较长时间到网上下载</span>
				<span lang="EN-US">plugin</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">和</span>
				<span lang="EN-US">jar</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，建议去喝杯咖啡</span>
				<span lang="EN-US">)</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。</span>
				<span lang="EN-US">mvn eclipse:eclipse</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">会生成</span>
				<span lang="EN-US">.class</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">和</span>
				<span lang="EN-US">.project</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">文件，可以进入项目的</span>
				<span lang="EN-US">build path</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">查看，会自动将</span>
				<span lang="EN-US">output</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">路径设为</span>
				<span lang="EN-US">target/classes</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。默认数据库使用</span>
				<span lang="EN-US">mysql</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，如果希望马上运行，则创建一个新数据库，可以命名为</span>
				<span lang="EN-US">openfans</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，如果</span>
				<span lang="EN-US">mysql</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">采用默认安装，则用户名</span>
				<span lang="EN-US">root</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，密码为空，可以无需更改</span>
				<span lang="EN-US">jdbc</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">配置文件。要更改也很简单，在</span>
				<span lang="EN-US">main/src</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">下面有一个</span>
				<span lang="EN-US">jdbc.properties</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">文件，可以在这里更改数据库类型和用户名密码。这里有一句</span>
				<span lang="EN-US">hibernate.hbm2ddl.auto=update</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，表示</span>
				<span lang="EN-US">hibernate</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">会自动更新建表语句，也就是新运行或更新了</span>
				<span lang="EN-US">hbm</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">文件再运行，</span>
				<span lang="EN-US">hibernate</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">都会自动帮你完成数据表的重建工作，这样你可以不用再考虑数据库建表脚本了。</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0">
				<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">mvn package</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，会运行所有</span>
				<span lang="EN-US">test case</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。目前的</span>
				<span lang="EN-US">test case</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">通过继承</span>
				<span lang="EN-US">AbstractTransactionalDataSourceSpringContextTests</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，能够方便的实现数据库回滚，在</span>
				<span lang="EN-US">BaseTest</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">类下有一句</span>
				<span lang="EN-US">this.setDefaultRollback(false)</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，如果希望通过程序填充数据，就</span>
				<span lang="EN-US">uncomment</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">它。这里有一个地方要注意一下，就是</span>
				<span lang="EN-US">web/WEB-INF/urlrewrite.xml</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，这是</span>
				<span lang="EN-US">urlrewrite</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的配置文件，</span>
				<span lang="EN-US">urlrewrite</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的描述在</span>
				<span lang="EN-US">openfans</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">网站里有，可以通过搜索</span>
				<span lang="EN-US">urlrewrite</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">快速的找到。因为我把文档根设为“</span>
				<span lang="EN-US">/</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">”，所以有</span>
				<span lang="EN-US">&lt;to type="redirect"&gt;/view$1.html\?id=$2&lt;/to&gt;</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，如果文档根是</span>
				<span lang="EN-US">openfans</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">则需在</span>
				<span lang="EN-US">/view</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">前加上</span>
				<span lang="EN-US">/openfans</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，然后再运行</span>
				<span lang="EN-US">mvn package</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。测试全部通过，就会在</span>
				<span lang="EN-US">target</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">目录下生成</span>
				<span lang="EN-US">openfans-o.1.war</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，将这个</span>
				<span lang="EN-US">war</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>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的</span>
				<span lang="EN-US">webapps</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>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，应该就能通过</span>
				<span lang="EN-US">
						<a href="http://localhost:8080/openfans">http://localhost:8080/openfans</a>
				</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">访问了（假定你采用默认端口</span>
				<span lang="EN-US">8080</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">）。</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0">
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">如果进行开发，可以安装</span>
				<span lang="EN-US">eclipse-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">openfans</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>
				<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">conf/Catalina/localhost</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">下创建一个</span>
				<span lang="EN-US">openfans.xml</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，内容如下：</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0">
				<span lang="EN-US">&lt;?xml version="1.0" encoding="UTF-8"?&gt;</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0">
				<span lang="EN-US">&lt;Context path="/openfans" reloadable="true" docBase="D:/javaproject/openfans/web"&gt;</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0">
				<span lang="EN-US">&lt;/Context&gt;</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0">
				<span lang="EN-US">docBase</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">改成你的</span>
				<span lang="EN-US">openfans</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">所在的路径。<br />   这里因为pom文件定义的默认输出位置为target，需改为web-inf/classes，这时会有一个src冲突，需把src/web/里的web-inf/classes exclude掉就可以了。<br />然后在</span>
				<span lang="EN-US">eclipse</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>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，同样可以通过</span>
				<span lang="EN-US">
						<a href="http://localhost:8080/openfans">http://localhost:8080/openfans</a>
				</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">访问了。用这种方式启动</span>
				<span lang="EN-US">tomcat</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">可以进行调试。</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0">
				<span lang="EN-US">
						<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /?>
						<o:p> </o:p>
				</span>
		</p>
<img src ="http://www.blogjava.net/pesome/aggbug/38644.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/pesome/" target="_blank">pesome</a> 2006-04-01 21:05 <a href="http://www.blogjava.net/pesome/archive/2006/04/01/38644.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>openfans整体设计介绍</title><link>http://www.blogjava.net/pesome/archive/2006/03/28/37754.html</link><dc:creator>pesome</dc:creator><author>pesome</author><pubDate>Tue, 28 Mar 2006 03:51:00 GMT</pubDate><guid>http://www.blogjava.net/pesome/archive/2006/03/28/37754.html</guid><wfw:comment>http://www.blogjava.net/pesome/comments/37754.html</wfw:comment><comments>http://www.blogjava.net/pesome/archive/2006/03/28/37754.html#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://www.blogjava.net/pesome/comments/commentRss/37754.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/pesome/services/trackbacks/37754.html</trackback:ping><description><![CDATA[         先说一下openfans最早版本的整体设计。首先是用Equinox直接new出项目来，它默认是springmvc+spring+hibernate再加­上一些常用的组件，如sitemesh，common-validator，dwr等。而这些都是我们想要的。 <br />         有了这个大的框架，我们可以进行业务建模了，我们采用的是领域模型驱动的设计方案。首先考虑的是对象以及对象间的关联，我们也没用什么建模工具和自动生成工具，­先自己写java类，写好属性，用eclipse生成get和set。然后手写hibernate的hbm配置文件，有点土，这也是我第一正式的使用hiber­nate。开始我用了dao模式，写了好多dao，后来和oofrank讨论，一直认为hibernate就是我们的持久层，完全没有必要为了移植性（如将来使­用ibatis）而引入dao。所以抛弃了dao模式，而由一个façade处理持久。这样的设计跟一般的三层模型略有不同，hibernate就是我们的持久­层，然后通过一个façade提供对上层的接口。领域模型和mvc中的c充当我们的业务层。我们的对象不是贫血模型，而是有能力的。当然现在这种能力更多是对象­间的关联，而对持久层无能为力，但也已经方便了很多。Controller现在具有较多的功能，它能调领域对象，也能直接使用façade。然后是jsp+js­tl+el做纯粹的展现层。C和V的分类原则是这样的：一类是查看，一类是form提交。所有查看由一个viewController统一处理（这样增加了一些­耦合，但效果还可以），一个对象的增、删、改由一个formController处理。 <br />           有了这些设计原则，做起来倒是很快，几天就核心功能出来了。对于数据库，只要建一个库就行，其余的如建表，改表等都由hibernate来自动帮你完成，数据库­就是在写hbm时关心下，其它完全对我们透明，感觉还是挺爽的。 最初版一共就20几个类，完成了很多的功能，可以具体看 <a href="http://www.openfans.org">www.openfans.org</a><br />           下一篇写怎么使用maven和tomcat，让openfans在自己机器上跑起来。先去吃饭了，^_^。大家有任何疑问和好的改进意见，都可以提，跟帖。 <img src ="http://www.blogjava.net/pesome/aggbug/37754.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/pesome/" target="_blank">pesome</a> 2006-03-28 11:51 <a href="http://www.blogjava.net/pesome/archive/2006/03/28/37754.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>给我的openfans再做下广告</title><link>http://www.blogjava.net/pesome/archive/2006/03/25/37409.html</link><dc:creator>pesome</dc:creator><author>pesome</author><pubDate>Sat, 25 Mar 2006 15:04:00 GMT</pubDate><guid>http://www.blogjava.net/pesome/archive/2006/03/25/37409.html</guid><wfw:comment>http://www.blogjava.net/pesome/comments/37409.html</wfw:comment><comments>http://www.blogjava.net/pesome/archive/2006/03/25/37409.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/pesome/comments/commentRss/37409.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/pesome/services/trackbacks/37409.html</trackback:ping><description><![CDATA[本网站旨在推动opensource软件在中国的传播和使用。应用web2.0的思想，提倡大家都来参与和有收获有贡献的风气。注册后就可以直接登录（将来需发email进行验证），登录近来就可以进行所有的操作了。 <br />     操作很简单，先可以点击上面的修改用户链接，补充自己的信息（现在只要填入blog地址、简单描述和所在地），这样能够让其它用户更好的了解你，还可以加一个你喜欢的图像上传（现在大小限制在10k以内）。 <br />      点击推荐软件链接，可以推荐你喜欢的开源软件。填入名称，主页，加上你的介绍或官方的介绍，然后给它个图标，就可以了。图标可以在它的主页上找到，然后将其url拷贝下来，就可以了。 <br />     在浏览软件时，你可以随时增加认为与其相关的标签（我们把软件认为是一种特殊的标签）。标签标题是不带空格的，我们可以填入用空格分割的多个标签，系统会依次增加这些标签关联。如hibernate，你认为它是持久层，也可以认为是O/Rmapping，已经关联的标签也可以再加，我们会增加其关联度。一个标签下的相关标签会按关联度从高到低排列。 <br />     更重要的是你说明自己对这个软件的使用情况，如熟练掌握、正在使用还是准备使用。简单的点击，会给软件和你增加有用的信息。我们会看到一个软件有多少人熟练掌握，有多少人正在使用，在进行同类软件横向比较时非常有用。而如果你在准备使用一个软件时，就可以看看有谁熟练掌握了这个软件，可以看他（她）的blog，或直接跟他（她）联系，更快的掌握这个软件。 <br />     如果你有好的心得体会或看到网上有好得相关文章，也可以在浏览标签的页面，点击发表文章链接，跟大家进行分享。别人也许就因为你的一篇文章快速入门了呢，呵呵！ <br />     将来还会有更多更好更酷的功能出来，我们永远会从用户角度出发，力求做到最好的用户体验。欢迎进入openfans的世界！ <br /><img src ="http://www.blogjava.net/pesome/aggbug/37409.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/pesome/" target="_blank">pesome</a> 2006-03-25 23:04 <a href="http://www.blogjava.net/pesome/archive/2006/03/25/37409.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>启动openfans网站和项目</title><link>http://www.blogjava.net/pesome/archive/2006/03/19/36020.html</link><dc:creator>pesome</dc:creator><author>pesome</author><pubDate>Sun, 19 Mar 2006 02:46:00 GMT</pubDate><guid>http://www.blogjava.net/pesome/archive/2006/03/19/36020.html</guid><wfw:comment>http://www.blogjava.net/pesome/comments/36020.html</wfw:comment><comments>http://www.blogjava.net/pesome/archive/2006/03/19/36020.html#Feedback</comments><slash:comments>6</slash:comments><wfw:commentRss>http://www.blogjava.net/pesome/comments/commentRss/36020.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/pesome/services/trackbacks/36020.html</trackback:ping><description><![CDATA[注册网站<a href="http://www.openfans.org以/" target="_blank"><font color="#0000cc">www.</font><span id="highlight_tag" style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: bold; PADDING-BOTTOM: 0px; COLOR: #ee6600; PADDING-TOP: 0px; BACKGROUND-COLOR: yellow; EE6600: ">openfans</span><font color="#0000cc">.org以</font></a>及<a href="http://www.openfans.net/" target="_blank"><font color="#551a8b">www.</font><span id="highlight_tag" style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: bold; PADDING-BOTTOM: 0px; COLOR: #ee6600; PADDING-TOP: 0px; BACKGROUND-COLOR: yellow; EE6600: ">openfans</span><font color="#551a8b">.net</font></a><br />(现在www.openfans.net开通了<a href="http://www.openfans.net:8080/openfans/)，" target="_blank"><font color="#0000cc">)，</font></a>提供对开源软件的介绍和评论。应用web <br />2.0思想，体现社区自管理的原则，提倡对开源软件学习和交互。期望成为中国开源软件介绍和交流的主流平台之一，为开源软件在中国的传播和使用贡献自己的力量。 <br /><p>roadmap（暂定）： <br />0.1（4月底完成）--注册，登陆，权限管理，标签功能，发表软件介绍和文章 <br />0.5（5月底完成）--评分体系，同城，小组和朋友管理 <br />0.8（7月底完成）--sns功能，投票功能 <br />1.0（9月底完成）--开始形成专家小组，提供项目外包和咨询管理平台 <br />更多--随着平台的使用和更多的成员加入，不断加入新的功能 <br /></p><p>同时启动开源项目<span id="highlight_tag" style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: bold; PADDING-BOTTOM: 0px; COLOR: #ee6600; PADDING-TOP: 0px; BACKGROUND-COLOR: yellow; EE6600: ">openfans</span>，使用开源软件：eclipse, <br />maven2, spring(包括spring mvc), hibernate, <br />mysql,common-validator,sitemesh..... <br />目的是提供web2.0应用的基本模型，同步在<a href="http://www.openfans.net上" target="_blank"><font color="#0000cc">www.</font><span id="highlight_tag" style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: bold; PADDING-BOTTOM: 0px; COLOR: #ee6600; PADDING-TOP: 0px; BACKGROUND-COLOR: yellow; EE6600: ">openfans</span><font color="#0000cc">.net上</font></a>进行验证和使用，并能够方便的移植到其它领域。 <br />目前项目在sourceforge上，由pesome和oofrank共同管理。0.1版基本完成。 <br />cvs -d:pserver:anonym<a href="http://groups.google.com/groups/unlock?msg=6844de35f8dc538e&amp;hl=zh-CN&amp;_done=/group/openfans/browse_thread/thread/36c6a4d161040067%3Fhl%3Dzh-CN" target="_parent"><font color="#0000cc">...</font></a>@cvs.sourceforge.net:/cvsroot/<span id="highlight_tag" style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: bold; PADDING-BOTTOM: 0px; COLOR: #ee6600; PADDING-TOP: 0px; BACKGROUND-COLOR: yellow; EE6600: ">openfans</span> login <br /></p><p>希望参与开发的同学请mailto:pes<a href="http://groups.google.com/groups/unlock?msg=6844de35f8dc538e&amp;hl=zh-CN&amp;_done=/group/openfans/browse_thread/thread/36c6a4d161040067%3Fhl%3Dzh-CN" target="_parent"><font color="#0000cc">...</font></a>@gmail.com，简单介绍自己并注明在sf上的用户名。 <br />在google上开了一个站务论坛：<a href="http://groups.google.com/group/openfans" target="_blank"><font color="#551a8b">http://groups.google.com/group/</font><span id="highlight_tag" style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-WEIGHT: bold; PADDING-BOTTOM: 0px; COLOR: #ee6600; PADDING-TOP: 0px; BACKGROUND-COLOR: yellow; EE6600: ">openfans</span></a><br /><br />欢迎大家多来访问，推荐软件和文章，方便大家更快更好的找到自己最需要的东西！</p><img src ="http://www.blogjava.net/pesome/aggbug/36020.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/pesome/" target="_blank">pesome</a> 2006-03-19 10:46 <a href="http://www.blogjava.net/pesome/archive/2006/03/19/36020.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>oscache使用和研究</title><link>http://www.blogjava.net/pesome/archive/2006/02/16/30980.html</link><dc:creator>pesome</dc:creator><author>pesome</author><pubDate>Thu, 16 Feb 2006 05:39:00 GMT</pubDate><guid>http://www.blogjava.net/pesome/archive/2006/02/16/30980.html</guid><wfw:comment>http://www.blogjava.net/pesome/comments/30980.html</wfw:comment><comments>http://www.blogjava.net/pesome/archive/2006/02/16/30980.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.blogjava.net/pesome/comments/commentRss/30980.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/pesome/services/trackbacks/30980.html</trackback:ping><description><![CDATA[<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><B style="mso-bidi-font-weight: normal"><SPAN lang=EN-US>Oscache</SPAN></B><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的使用非常方便，特别是</SPAN><SPAN lang=EN-US>jsp cache</SPAN></B><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">用的非常广泛。</SPAN><SPAN lang=EN-US>Oscache</SPAN></B><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的文档中也对</SPAN><SPAN lang=EN-US>jsp cache tag</SPAN></B><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的配置有详细说明，但对如普通</SPAN><SPAN lang=EN-US>pojo</SPAN></B><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">对象的</SPAN><SPAN lang=EN-US>cache</SPAN></B><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">讲的较少，也许是比较简单的缘故。今天做了个测试方案，写测试案例进行了比较和研究。</SPAN><SPAN lang=EN-US><?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></B></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">测试方案</SPAN><SPAN lang=EN-US>1</SPAN></B><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">：</SPAN></B><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">在本机上直接测试，循环从</SPAN><SPAN lang=EN-US>metabase</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">库中的</SPAN><SPAN lang=EN-US>process_info</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">表取得数据（表中只有</SPAN><SPAN lang=EN-US>2</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">条记录）比较使用</SPAN><SPAN lang=EN-US>cache</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">和不使用</SPAN><SPAN lang=EN-US>cache</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的性能（为平均值）。</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">代码如下：<BR></P>
<DIV style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><SPAN style="COLOR: #008080">&nbsp;1</SPAN><IMG id=Codehighlighter1_48_1180_Open_Image onclick="this.style.display='none'; Codehighlighter1_48_1180_Open_Text.style.display='none'; Codehighlighter1_48_1180_Closed_Image.style.display='inline'; Codehighlighter1_48_1180_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockStart.gif" align=top><IMG id=Codehighlighter1_48_1180_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_48_1180_Closed_Text.style.display='none'; Codehighlighter1_48_1180_Open_Image.style.display='inline'; Codehighlighter1_48_1180_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedBlock.gif" align=top><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">class</SPAN><SPAN style="COLOR: #000000">&nbsp;DatabaseCacheTest&nbsp;</SPAN><SPAN style="COLOR: #0000ff">extends</SPAN><SPAN style="COLOR: #000000">&nbsp;TestCase&nbsp;</SPAN><SPAN id=Codehighlighter1_48_1180_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.blogjava.net/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_48_1180_Open_Text><SPAN style="COLOR: #000000">{<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;2</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;GeneralCacheAdministrator&nbsp;admin&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">null</SPAN><SPAN style="COLOR: #000000">;<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;3</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top><BR></SPAN><SPAN style="COLOR: #008080">&nbsp;4</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">protected</SPAN><SPAN style="COLOR: #000000">&nbsp;ApplicationContext&nbsp;ctx;<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;5</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top><BR></SPAN><SPAN style="COLOR: #008080">&nbsp;6</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">protected</SPAN><SPAN style="COLOR: #000000">&nbsp;ProcessInfoDAO&nbsp;processInfoDAO;<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;7</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top><BR></SPAN><SPAN style="COLOR: #008080">&nbsp;8</SPAN><SPAN style="COLOR: #000000"><IMG id=Codehighlighter1_212_466_Open_Image onclick="this.style.display='none'; Codehighlighter1_212_466_Open_Text.style.display='none'; Codehighlighter1_212_466_Closed_Image.style.display='inline'; Codehighlighter1_212_466_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_212_466_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_212_466_Closed_Text.style.display='none'; Codehighlighter1_212_466_Open_Image.style.display='inline'; Codehighlighter1_212_466_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">protected</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">void</SPAN><SPAN style="COLOR: #000000">&nbsp;setUp()&nbsp;</SPAN><SPAN style="COLOR: #0000ff">throws</SPAN><SPAN style="COLOR: #000000">&nbsp;Exception&nbsp;</SPAN><SPAN id=Codehighlighter1_212_466_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.blogjava.net/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_212_466_Open_Text><SPAN style="COLOR: #000000">{<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;9</SPAN><SPAN style="COLOR: #000000"><IMG id=Codehighlighter1_233_300_Open_Image onclick="this.style.display='none'; Codehighlighter1_233_300_Open_Text.style.display='none'; Codehighlighter1_233_300_Closed_Image.style.display='inline'; Codehighlighter1_233_300_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_233_300_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_233_300_Closed_Text.style.display='none'; Codehighlighter1_233_300_Open_Image.style.display='inline'; Codehighlighter1_233_300_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;String[]&nbsp;paths&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN id=Codehighlighter1_233_300_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.blogjava.net/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_233_300_Open_Text><SPAN style="COLOR: #000000">{&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">/spring/dataAccessContext.xml</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">,<BR></SPAN><SPAN style="COLOR: #008080">10</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">/spring/spring-biz-db.xml</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;}</SPAN></SPAN><SPAN style="COLOR: #000000">;<BR></SPAN><SPAN style="COLOR: #008080">11</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ctx&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000">&nbsp;ClassPathXmlApplicationContext(paths);<BR></SPAN><SPAN style="COLOR: #008080">12</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top><BR></SPAN><SPAN style="COLOR: #008080">13</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;processInfoDAO&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;(ProcessInfoDAO)&nbsp;ctx.getBean(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">processInfoDAO</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">);<BR></SPAN><SPAN style="COLOR: #008080">14</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;admin&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000">&nbsp;GeneralCacheAdministrator();<BR></SPAN><SPAN style="COLOR: #008080">15</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">16</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top><BR></SPAN><SPAN style="COLOR: #008080">17</SPAN><SPAN style="COLOR: #000000"><IMG id=Codehighlighter1_513_535_Open_Image onclick="this.style.display='none'; Codehighlighter1_513_535_Open_Text.style.display='none'; Codehighlighter1_513_535_Closed_Image.style.display='inline'; Codehighlighter1_513_535_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_513_535_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_513_535_Closed_Text.style.display='none'; Codehighlighter1_513_535_Open_Image.style.display='inline'; Codehighlighter1_513_535_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">protected</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">void</SPAN><SPAN style="COLOR: #000000">&nbsp;tearDown()&nbsp;</SPAN><SPAN style="COLOR: #0000ff">throws</SPAN><SPAN style="COLOR: #000000">&nbsp;Exception&nbsp;</SPAN><SPAN id=Codehighlighter1_513_535_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.blogjava.net/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_513_535_Open_Text><SPAN style="COLOR: #000000">{<BR></SPAN><SPAN style="COLOR: #008080">18</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;admin.destroy();<BR></SPAN><SPAN style="COLOR: #008080">19</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">20</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top><BR></SPAN><SPAN style="COLOR: #008080">21</SPAN><SPAN style="COLOR: #000000"><IMG id=Codehighlighter1_570_805_Open_Image onclick="this.style.display='none'; Codehighlighter1_570_805_Open_Text.style.display='none'; Codehighlighter1_570_805_Closed_Image.style.display='inline'; Codehighlighter1_570_805_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_570_805_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_570_805_Closed_Text.style.display='none'; Codehighlighter1_570_805_Open_Image.style.display='inline'; Codehighlighter1_570_805_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">void</SPAN><SPAN style="COLOR: #000000">&nbsp;testGetFromCache()&nbsp;</SPAN><SPAN id=Codehighlighter1_570_805_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.blogjava.net/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_570_805_Open_Text><SPAN style="COLOR: #000000">{<BR></SPAN><SPAN style="COLOR: #008080">22</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">long</SPAN><SPAN style="COLOR: #000000">&nbsp;t1&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;System.currentTimeMillis();<BR></SPAN><SPAN style="COLOR: #008080">23</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top><BR></SPAN><SPAN style="COLOR: #008080">24</SPAN><SPAN style="COLOR: #000000"><IMG id=Codehighlighter1_647_746_Open_Image onclick="this.style.display='none'; Codehighlighter1_647_746_Open_Text.style.display='none'; Codehighlighter1_647_746_Closed_Image.style.display='inline'; Codehighlighter1_647_746_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_647_746_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_647_746_Closed_Text.style.display='none'; Codehighlighter1_647_746_Open_Image.style.display='inline'; Codehighlighter1_647_746_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">for</SPAN><SPAN style="COLOR: #000000">&nbsp;(</SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000">&nbsp;i&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">;&nbsp;i&nbsp;</SPAN><SPAN style="COLOR: #000000">&lt;</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">10000</SPAN><SPAN style="COLOR: #000000">;&nbsp;i</SPAN><SPAN style="COLOR: #000000">++</SPAN><SPAN style="COLOR: #000000">)&nbsp;</SPAN><SPAN id=Codehighlighter1_647_746_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.blogjava.net/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_647_746_Open_Text><SPAN style="COLOR: #000000">{<BR></SPAN><SPAN style="COLOR: #008080">25</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ProcessInfoDO&nbsp;pdo&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;getProcess(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">65</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">);<BR></SPAN><SPAN style="COLOR: #008080">26</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;assertEquals(pdo.getProcessName(),&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">TestProcess</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">);<BR></SPAN><SPAN style="COLOR: #008080">27</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">28</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.out.println(System.currentTimeMillis()&nbsp;</SPAN><SPAN style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #000000">&nbsp;t1);<BR></SPAN><SPAN style="COLOR: #008080">29</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top><BR></SPAN><SPAN style="COLOR: #008080">30</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">31</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top><BR></SPAN><SPAN style="COLOR: #008080">32</SPAN><SPAN style="COLOR: #000000"><IMG id=Codehighlighter1_860_1087_Open_Image onclick="this.style.display='none'; Codehighlighter1_860_1087_Open_Text.style.display='none'; Codehighlighter1_860_1087_Closed_Image.style.display='inline'; Codehighlighter1_860_1087_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_860_1087_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_860_1087_Closed_Text.style.display='none'; Codehighlighter1_860_1087_Open_Image.style.display='inline'; Codehighlighter1_860_1087_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">private</SPAN><SPAN style="COLOR: #000000">&nbsp;ProcessInfoDO&nbsp;getProcessByCache(String&nbsp;id)&nbsp;</SPAN><SPAN id=Codehighlighter1_860_1087_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.blogjava.net/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_860_1087_Open_Text><SPAN style="COLOR: #000000">{<BR></SPAN><SPAN style="COLOR: #008080">33</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ProcessInfoDO&nbsp;pdo;<BR></SPAN><SPAN style="COLOR: #008080">34</SPAN><SPAN style="COLOR: #000000"><IMG id=Codehighlighter1_889_959_Open_Image onclick="this.style.display='none'; Codehighlighter1_889_959_Open_Text.style.display='none'; Codehighlighter1_889_959_Closed_Image.style.display='inline'; Codehighlighter1_889_959_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_889_959_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_889_959_Closed_Text.style.display='none'; Codehighlighter1_889_959_Open_Image.style.display='inline'; Codehighlighter1_889_959_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">try</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN id=Codehighlighter1_889_959_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.blogjava.net/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_889_959_Open_Text><SPAN style="COLOR: #000000">{<BR></SPAN><SPAN style="COLOR: #008080">35</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pdo&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;(ProcessInfoDO)&nbsp;admin.getFromCache(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">65</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">);<BR></SPAN><SPAN style="COLOR: #008080">36</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">return</SPAN><SPAN style="COLOR: #000000">&nbsp;pdo;<BR></SPAN><SPAN style="COLOR: #008080">37</SPAN><SPAN style="COLOR: #000000"><IMG id=Codehighlighter1_993_1084_Open_Image onclick="this.style.display='none'; Codehighlighter1_993_1084_Open_Text.style.display='none'; Codehighlighter1_993_1084_Closed_Image.style.display='inline'; Codehighlighter1_993_1084_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_993_1084_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_993_1084_Closed_Text.style.display='none'; Codehighlighter1_993_1084_Open_Image.style.display='inline'; Codehighlighter1_993_1084_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">catch</SPAN><SPAN style="COLOR: #000000">&nbsp;(NeedsRefreshException&nbsp;e)&nbsp;</SPAN><SPAN id=Codehighlighter1_993_1084_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.blogjava.net/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_993_1084_Open_Text><SPAN style="COLOR: #000000">{<BR></SPAN><SPAN style="COLOR: #008080">38</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pdo&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;processInfoDAO.selectById(</SPAN><SPAN style="COLOR: #000000">65</SPAN><SPAN style="COLOR: #000000">);<BR></SPAN><SPAN style="COLOR: #008080">39</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;admin.putInCache(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">65</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">,&nbsp;pdo);<BR></SPAN><SPAN style="COLOR: #008080">40</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">return</SPAN><SPAN style="COLOR: #000000">&nbsp;pdo;<BR></SPAN><SPAN style="COLOR: #008080">41</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">42</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">43</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top><BR></SPAN><SPAN style="COLOR: #008080">44</SPAN><SPAN style="COLOR: #000000"><IMG id=Codehighlighter1_1135_1178_Open_Image onclick="this.style.display='none'; Codehighlighter1_1135_1178_Open_Text.style.display='none'; Codehighlighter1_1135_1178_Closed_Image.style.display='inline'; Codehighlighter1_1135_1178_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_1135_1178_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_1135_1178_Closed_Text.style.display='none'; Codehighlighter1_1135_1178_Open_Image.style.display='inline'; Codehighlighter1_1135_1178_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">private</SPAN><SPAN style="COLOR: #000000">&nbsp;ProcessInfoDO&nbsp;getProcess(String&nbsp;id)&nbsp;</SPAN><SPAN id=Codehighlighter1_1135_1178_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.blogjava.net/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_1135_1178_Open_Text><SPAN style="COLOR: #000000">{<BR></SPAN><SPAN style="COLOR: #008080">45</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">return</SPAN><SPAN style="COLOR: #000000">&nbsp;processInfoDAO.selectById(</SPAN><SPAN style="COLOR: #000000">65</SPAN><SPAN style="COLOR: #000000">);<BR></SPAN><SPAN style="COLOR: #008080">46</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">47</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockEnd.gif" align=top>}</SPAN></SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">48</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><BR></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt">
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US></SPAN></P><SPAN lang=EN-US style="FONT-FAMILY: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-family: Wingdings"><SPAN style="mso-list: Ignore">Ø<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">循环</SPAN><SPAN lang=EN-US>100</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">次，使用</SPAN><SPAN lang=EN-US>cache</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">用时</SPAN><SPAN lang=EN-US>578ms</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，直接从数据库取用时</SPAN><SPAN lang=EN-US>2015ms</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。</SPAN>
<P></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 37.5pt; TEXT-INDENT: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 37.5pt"><SPAN lang=EN-US style="FONT-FAMILY: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-family: Wingdings"><SPAN style="mso-list: Ignore">Ø<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">循环</SPAN><SPAN lang=EN-US>1000</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">次，使用</SPAN><SPAN lang=EN-US>cache</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">用时</SPAN><SPAN lang=EN-US>719ms</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，直接从数据库取用时</SPAN><SPAN lang=EN-US>13984ms</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 37.5pt; TEXT-INDENT: -21pt; mso-list: l0 level1 lfo1; tab-stops: list 37.5pt"><SPAN lang=EN-US style="FONT-FAMILY: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-family: Wingdings"><SPAN style="mso-list: Ignore">Ø<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">循环</SPAN><SPAN lang=EN-US>10000</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">次，使用</SPAN><SPAN lang=EN-US>cache</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">用时</SPAN><SPAN lang=EN-US>2016ms</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，直接从数据库取用时</SPAN><SPAN lang=EN-US>131188ms</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">使用图例比较，系列</SPAN><SPAN lang=EN-US>1</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">表示循环的次数，系列</SPAN><SPAN lang=EN-US>2</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">为使用</SPAN><SPAN lang=EN-US>cache</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的用时，系列</SPAN><SPAN lang=EN-US>3</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">为不使用</SPAN><SPAN lang=EN-US>cache</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的用时。可以看出，随着循环次数的增多，使用</SPAN><SPAN lang=EN-US>cache</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">方案的性能优势更加明显。<BR><IMG alt="" hspace=0 src="http://www.blogjava.net/images/blogjava_net/pesome/5223/t_clip_image00.gif" align=baseline border=0></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 16.5pt"><SPAN lang=EN-US><?xml:namespace prefix = v ns = "urn:schemas-microsoft-com:vml" /><v:shapetype id=_x0000_t75 stroked="f" filled="f" path="m@4@5l@4@11@9@11@9@5xe" o:preferrelative="t" o:spt="75" coordsize="21600,21600"><v:stroke joinstyle="miter"></v:stroke><v:formulas><v:f eqn="if lineDrawn pixelLineWidth 0"></v:f><v:f eqn="sum @0 1 0"></v:f><v:f eqn="sum 0 0 @1"></v:f><v:f eqn="prod @2 1 2"></v:f><v:f eqn="prod @3 21600 pixelWidth"></v:f><v:f eqn="prod @3 21600 pixelHeight"></v:f><v:f eqn="sum @0 0 1"></v:f><v:f eqn="prod @6 1 2"></v:f><v:f eqn="prod @7 21600 pixelWidth"></v:f><v:f eqn="sum @8 21600 0"></v:f><v:f eqn="prod @7 21600 pixelHeight"></v:f><v:f eqn="sum @10 21600 0"></v:f></v:formulas><v:path o:connecttype="rect" gradientshapeok="t" o:extrusionok="f"></v:path><o:lock aspectratio="t" v:ext="edit"></o:lock></v:shapetype><SPAN lang=EN-US style="FONT-SIZE: 10.5pt; FONT-FAMILY: 'Times New Roman'; mso-fareast-font-family: 宋体; mso-bidi-font-size: 12.0pt; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA"><v:shapetype id=_x0000_t75 stroked="f" filled="f" path="m@4@5l@4@11@9@11@9@5xe" o:preferrelative="t" o:spt="75" coordsize="21600,21600"><v:stroke joinstyle="miter"></v:stroke><v:formulas><v:f eqn="if lineDrawn pixelLineWidth 0"></v:f><v:f eqn="sum @0 1 0"></v:f><v:f eqn="sum 0 0 @1"></v:f><v:f eqn="prod @2 1 2"></v:f><v:f eqn="prod @3 21600 pixelWidth"></v:f><v:f eqn="prod @3 21600 pixelHeight"></v:f><v:f eqn="sum @0 0 1"></v:f><v:f eqn="prod @6 1 2"></v:f><v:f eqn="prod @7 21600 pixelWidth"></v:f><v:f eqn="sum @8 21600 0"></v:f><v:f eqn="prod @7 21600 pixelHeight"></v:f><v:f eqn="sum @10 21600 0"></v:f></v:formulas><v:path o:connecttype="rect" gradientshapeok="t" o:extrusionok="f"></v:path><o:lock aspectratio="t" v:ext="edit"></o:lock></v:shapetype></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">结论：使用</SPAN><SPAN lang=EN-US>cache</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，随着循环的增多，用时增长较缓慢，而不使用</SPAN><SPAN lang=EN-US>cache</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">基本是等比例增长。在循环次数较多时，使用</SPAN><SPAN lang=EN-US>cache cpu</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">利用率显著提高，能达到</SPAN><SPAN lang=EN-US>90</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">％以上。不使用</SPAN><SPAN lang=EN-US>cache</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">则只能上到</SPAN><SPAN lang=EN-US>50%</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">左右，更多是在等待数据库返回结果。所以使用</SPAN><SPAN lang=EN-US>cache</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">能大大减轻数据库的压力，提高应用服务器的利用率，符合我们对应用服务器进行水平扩展的要求。</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p>&nbsp;</o:p></SPAN></P>
<P>&nbsp;</P><img src ="http://www.blogjava.net/pesome/aggbug/30980.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/pesome/" target="_blank">pesome</a> 2006-02-16 13:39 <a href="http://www.blogjava.net/pesome/archive/2006/02/16/30980.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>自己写的一个cache小组件</title><link>http://www.blogjava.net/pesome/archive/2005/09/06/12236.html</link><dc:creator>pesome</dc:creator><author>pesome</author><pubDate>Tue, 06 Sep 2005 07:38:00 GMT</pubDate><guid>http://www.blogjava.net/pesome/archive/2005/09/06/12236.html</guid><wfw:comment>http://www.blogjava.net/pesome/comments/12236.html</wfw:comment><comments>http://www.blogjava.net/pesome/archive/2005/09/06/12236.html#Feedback</comments><slash:comments>5</slash:comments><wfw:commentRss>http://www.blogjava.net/pesome/comments/commentRss/12236.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/pesome/services/trackbacks/12236.html</trackback:ping><description><![CDATA[<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN lang=EN-US>Cache</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">作为提高性能的有效手段可以说是无处不在的。</SPAN><SPAN lang=EN-US>CPU</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">有一级缓存，二级缓存；数据库有自己的数据缓存；内存实质上就是硬盘的缓存。。。。。。而程序中的缓存也能够有效的减少与存储设备的交互，增加应用的并发能力。</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">我通过在实际项目中自行设计和使用</SPAN><SPAN lang=EN-US>cache</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，逐渐提高了系统的并发能力，但同时也感觉到了很多的不足：</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 39pt; TEXT-INDENT: -18pt; mso-list: l0 level1 lfo1; tab-stops: list 39.0pt"><SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"><SPAN style="mso-list: Ignore">1.<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">因为是在原有系统基础上优化，</SPAN><SPAN lang=EN-US>cache</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的处理没有统一的规划，而是头痛医头，脚痛医脚。</SPAN><SPAN lang=EN-US>cache</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">分散在系统各个模块，很难想起哪些模块使用了</SPAN><SPAN lang=EN-US>cache</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 39pt; TEXT-INDENT: -18pt; mso-list: l0 level1 lfo1; tab-stops: list 39.0pt"><SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"><SPAN style="mso-list: Ignore">2.<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><SPAN lang=EN-US>cache</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的实现各种各样，有的是单例、有的是</SPAN><SPAN lang=EN-US>static</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">对象，而</SPAN><SPAN lang=EN-US>cache</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">对象与数据库的交互也是直接硬编码在原有系统中，难于维护</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 39pt; TEXT-INDENT: -18pt; mso-list: l0 level1 lfo1; tab-stops: list 39.0pt"><SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"><SPAN style="mso-list: Ignore">3.<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><SPAN lang=EN-US>cache</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的参数如刷新间隔。。。。。。未使用配置文件，而是直接定义在</SPAN><SPAN lang=EN-US>cache</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的类文件中，对配置的更改就需要更新整个类，进而影响系统的运行</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 39pt; TEXT-INDENT: -18pt; mso-list: l0 level1 lfo1; tab-stops: list 39.0pt"><SPAN lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"><SPAN style="mso-list: Ignore">4.<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">缺少对</SPAN><SPAN lang=EN-US>cache</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的监控机制和</SPAN><SPAN lang=EN-US>log</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">机制，出现问题很难去跟踪和解决。</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">经过一段时间具体项目的洗礼，对</SPAN><SPAN lang=EN-US>java</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">也有了进一步的认识，我也可以有能力来解决一直困扰心中的</SPAN><SPAN lang=EN-US>cache</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的这些问题了。想法很简单，就是能够通过单一的配置文件，对系统中的所有</SPAN><SPAN lang=EN-US>cache</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">进行统一的管理，各个</SPAN><SPAN lang=EN-US>cache</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">所在的模块，和</SPAN><SPAN lang=EN-US>cache</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的配置参数，都能够一目了然。而对配置文件的重载功能也是我要考虑的问题，希望对某些</SPAN><SPAN lang=EN-US>cache</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的配置的更改能够对其它</SPAN><SPAN lang=EN-US>cache</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">无影响，同时这些更改也能在不影响应用运行状态的情况下进行。当然既然是统一管理，就需要做到接口的统一。我定义了</SPAN><SPAN lang=EN-US>Cache</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">和</SPAN><SPAN lang=EN-US>CachePersistence</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">两个接口，然后不同的</SPAN><SPAN lang=EN-US>cache</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">可以提供不同的实现，实现类需要在配置文件中指定，同时系统提供默认的实现，以满足简单的应用。想了就要开始做，我也没想一开始就做出象</SPAN><SPAN lang=EN-US>OSCache</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">或</SPAN><SPAN lang=EN-US>JbossCache</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">那样通用的</SPAN><SPAN lang=EN-US>cache</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">来，也许经过不断的交流，不断的完善最终可以做到。经过简单的设计，我就开始写代码了，就我一个人，也算是</SPAN><SPAN lang=EN-US>XP</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">编程了，呵呵！</SPAN><SPAN lang=EN-US>cache</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的配置参数，我根据项目经验想到了几个，可能还可以有，但目前我不知道，需要在更多的项目应用中去发现，具体可以看我的包中的</SPAN><SPAN lang=EN-US>cache.xml</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">文件，有对配置项的具体说明。</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">从开始开发到最后写完测试类，也就不到一个星期的时间（上班的空余时间和加班写），当中也进行了几次重构。总的来说，还算满意，这也算俺的第一个开源项目啊，呵呵！</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">具体如何使用，很简单，你有兴趣可以实现</SPAN><SPAN lang=EN-US>Cache</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">接口，我内置了基于</SPAN><SPAN lang=EN-US>HashMap</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的</SPAN><SPAN lang=EN-US>Cache</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，应该能满足大部分应用的需要。</SPAN><SPAN lang=EN-US>CachePersistence</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">就是你的对象与存储设备交互的实现了，你一般需要实现这一接口，然后配置在配置文件中。然后通过</SPAN><SPAN lang=EN-US>CacheFactory</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">得到</SPAN><SPAN lang=EN-US>Cache</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，通过</SPAN><SPAN lang=EN-US>Cache</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">接口使用对象。对</SPAN><SPAN lang=EN-US>Cache</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的操作你可以当成一个</SPAN><SPAN lang=EN-US>Map</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">来使用，由容器来自动处理何时与存储设备的交互，你只要配置好就</SPAN><SPAN lang=EN-US>ok</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">了。另外可以参考</SPAN><SPAN lang=EN-US>src</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">中的</SPAN><SPAN lang=EN-US>test</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">包，里面是我对</SPAN><SPAN lang=EN-US>Cache</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的功能测试代码，也能作为使用</SPAN><SPAN lang=EN-US>cache</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的实例的。</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">说了这么多，大家如果有兴趣，可下载我的全部文件，里面包括</SPAN><SPAN lang=EN-US>jar</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">、</SPAN><SPAN lang=EN-US>src</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">、</SPAN><SPAN lang=EN-US>lib</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">、</SPAN><SPAN lang=EN-US>javadoc</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">还有配置文件，点击这里<FONT face="Times New Roman"><A href="http://www.blogjava.net/Files/pesome/pcache.zip">http://www.blogjava.net/Files/pesome/pcache.zip</A></FONT></SPAN><SPAN lang=EN-US><A href="http://www.blogjava.net/pesome/pesome/Files/pesome/pcache.zip"></A></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。更欢迎大家在实际的项目中使用我的</SPAN><SPAN lang=EN-US>cache</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，如果有任何问题都可以跟我联系，</SPAN><SPAN lang=EN-US><A href="mailto:pesome@163.com">mailto:pesome@163.com</A></SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。谢谢！</SPAN><SPAN lang=EN-US><?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></P><img src ="http://www.blogjava.net/pesome/aggbug/12236.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/pesome/" target="_blank">pesome</a> 2005-09-06 15:38 <a href="http://www.blogjava.net/pesome/archive/2005/09/06/12236.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>