﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>BlogJava-我不是张嘎－小兵-随笔分类-项目实践</title><link>http://www.blogjava.net/grantbb/category/3231.html</link><description>期待交流</description><language>zh-cn</language><lastBuildDate>Mon, 21 May 2007 11:27:37 GMT</lastBuildDate><pubDate>Mon, 21 May 2007 11:27:37 GMT</pubDate><ttl>60</ttl><item><title>BooleanQuery$TooManyClauses的问题</title><link>http://www.blogjava.net/grantbb/archive/2007/05/21/118939.html</link><dc:creator>我不是张嘎－小兵</dc:creator><author>我不是张嘎－小兵</author><pubDate>Mon, 21 May 2007 09:21:00 GMT</pubDate><guid>http://www.blogjava.net/grantbb/archive/2007/05/21/118939.html</guid><wfw:comment>http://www.blogjava.net/grantbb/comments/118939.html</wfw:comment><comments>http://www.blogjava.net/grantbb/archive/2007/05/21/118939.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/grantbb/comments/commentRss/118939.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/grantbb/services/trackbacks/118939.html</trackback:ping><description><![CDATA[org.apache.lucene.search.BooleanQuery$TooManyClauses: maxClauseCount is set to 1024<br>
&nbsp;&nbsp;&nbsp; at org.apache.lucene.search.BooleanQuery.add(BooleanQuery.java:165)<br>
&nbsp;&nbsp;&nbsp; at org.apache.lucene.search.BooleanQuery.add(BooleanQuery.java:156)<br>
&nbsp;&nbsp;&nbsp; at org.apache.lucene.search.PrefixQuery.rewrite(PrefixQuery.java:53)<br>
&nbsp;&nbsp;&nbsp; at org.apache.lucene.search.BooleanQuery.rewrite(BooleanQuery.java:408)<br>
&nbsp;&nbsp;&nbsp; at org.apache.lucene.search.IndexSearcher.rewrite(IndexSearcher.java:138)<br>
&nbsp;&nbsp;&nbsp; at org.apache.lucene.search.Query.weight(Query.java:94)<br>
&nbsp;&nbsp;&nbsp; at org.apache.lucene.search.Hits.&lt;init&gt;(Hits.java:42)<br>
&nbsp;&nbsp;&nbsp; at org.apache.lucene.search.Searcher.search(Searcher.java:45)<br>
&nbsp;&nbsp;&nbsp; at org.apache.lucene.search.Searcher.search(Searcher.java:37)<br>
&nbsp;&nbsp;&nbsp; at com.toodou.searcher.search.PodcasterSearcher.searchPodcaster(PodcasterSearcher.java:238)<br>
&nbsp;&nbsp;&nbsp; at com.toodou.searcher.search.PodcasterSearcher.doPodcasterSearch(PodcasterSearcher.java:66)<br>
&nbsp;&nbsp;&nbsp; at test.com.toodou.searcher.search.PodcasterSearcherTest.testdoPodcasterSearch(PodcasterSearcherTest.java:57)<br>
&nbsp;&nbsp;&nbsp; at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br>
&nbsp;&nbsp;&nbsp; at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)<br>
&nbsp;&nbsp;&nbsp; at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br>
&nbsp;&nbsp;&nbsp; at java.lang.reflect.Method.invoke(Method.java:585)<br>
&nbsp;&nbsp;&nbsp; at junit.framework.TestCase.runTest(TestCase.java:154)<br>
&nbsp;&nbsp;&nbsp; at junit.framework.TestCase.runBare(TestCase.java:127)<br>
&nbsp;&nbsp;&nbsp; at junit.framework.TestResult$1.protect(TestResult.java:106)<br>
&nbsp;&nbsp;&nbsp; at junit.framework.TestResult.runProtected(TestResult.java:124)<br>
&nbsp;&nbsp;&nbsp; at junit.framework.TestResult.run(TestResult.java:109)<br>
&nbsp;&nbsp;&nbsp; at junit.framework.TestCase.run(TestCase.java:118)<br>
&nbsp;&nbsp;&nbsp; at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)<br>
&nbsp;&nbsp;&nbsp; at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)<br>
&nbsp;&nbsp;&nbsp; at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)<br>
&nbsp;&nbsp;&nbsp; at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)<br>
&nbsp;&nbsp;&nbsp; at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)<br>
&nbsp;&nbsp;&nbsp; at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)<br>
<br>
可以通过设置：<br>
BooleanQuery.setMaxClauseCount(10000);<br>
来解决问题，但是这样带来的问题是会使得内存开销加大。容易出现OutOfMemory的异常<br>
所以需要非常谨慎处理。<img src ="http://www.blogjava.net/grantbb/aggbug/118939.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/grantbb/" target="_blank">我不是张嘎－小兵</a> 2007-05-21 17:21 <a href="http://www.blogjava.net/grantbb/archive/2007/05/21/118939.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>异常："java.sql.SQLException: Server shutdown in progress"</title><link>http://www.blogjava.net/grantbb/archive/2007/05/15/117641.html</link><dc:creator>我不是张嘎－小兵</dc:creator><author>我不是张嘎－小兵</author><pubDate>Tue, 15 May 2007 08:20:00 GMT</pubDate><guid>http://www.blogjava.net/grantbb/archive/2007/05/15/117641.html</guid><wfw:comment>http://www.blogjava.net/grantbb/comments/117641.html</wfw:comment><comments>http://www.blogjava.net/grantbb/archive/2007/05/15/117641.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/grantbb/comments/commentRss/117641.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/grantbb/services/trackbacks/117641.html</trackback:ping><description><![CDATA[查询MySQL会出现："java.sql.SQLException: Server shutdown in progress"的异常<br><br>问题原因：数据有自动脚本，会将执行时间超过30秒的进程杀掉。<br>这样的话，Java的应用就会抛出这样的异常。<br><br><img src ="http://www.blogjava.net/grantbb/aggbug/117641.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/grantbb/" target="_blank">我不是张嘎－小兵</a> 2007-05-15 16:20 <a href="http://www.blogjava.net/grantbb/archive/2007/05/15/117641.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>CAS最近的更新</title><link>http://www.blogjava.net/grantbb/archive/2007/04/23/112907.html</link><dc:creator>我不是张嘎－小兵</dc:creator><author>我不是张嘎－小兵</author><pubDate>Mon, 23 Apr 2007 03:19:00 GMT</pubDate><guid>http://www.blogjava.net/grantbb/archive/2007/04/23/112907.html</guid><wfw:comment>http://www.blogjava.net/grantbb/comments/112907.html</wfw:comment><comments>http://www.blogjava.net/grantbb/archive/2007/04/23/112907.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/grantbb/comments/commentRss/112907.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/grantbb/services/trackbacks/112907.html</trackback:ping><description><![CDATA[<h2 id="ann1">CAS Server 3.1 M2 Released</h2>
<h2 id="ann7">CAS Server and Client 3.1 Milestone 1 Released</h2>
<h2 id="ann8">phpCAS 0.5.0 RC5 Release</h2>
<h2 id="ann2">CAS 3.0.7 Final Release</h2>
Inclusion of Abstract Ticket Registry<br><br>
<h2 id="ann10">CAS 3.0.6 Final</h2>
这里面有几个更新很重要：<br>1.Upgrade to Spring 2.0.1, Spring Web Flow 1.0 and Spring LDAP 1.1.1<br><br>2.Introduction of JBossCacheTicketRegistry<br>&nbsp;&nbsp;&nbsp; 支持后JBossCacheTicketRegistry就可以方便大并发量的网站的水平扩展问题。<br><br> <img src ="http://www.blogjava.net/grantbb/aggbug/112907.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/grantbb/" target="_blank">我不是张嘎－小兵</a> 2007-04-23 11:19 <a href="http://www.blogjava.net/grantbb/archive/2007/04/23/112907.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>从项目管理的九大知识领域来说明如何完成项目</title><link>http://www.blogjava.net/grantbb/archive/2007/04/18/111728.html</link><dc:creator>我不是张嘎－小兵</dc:creator><author>我不是张嘎－小兵</author><pubDate>Wed, 18 Apr 2007 12:03:00 GMT</pubDate><guid>http://www.blogjava.net/grantbb/archive/2007/04/18/111728.html</guid><wfw:comment>http://www.blogjava.net/grantbb/comments/111728.html</wfw:comment><comments>http://www.blogjava.net/grantbb/archive/2007/04/18/111728.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/grantbb/comments/commentRss/111728.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/grantbb/services/trackbacks/111728.html</trackback:ping><description><![CDATA[<p class="MsoNormal"><span style="font-size: 9pt; font-family: 宋体;">我主要结合项目管理的九大知识领域来说明，需要说明的是在我接触的项目中，九个领域的内容有一些没有接触过的我就略过。<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 宋体;"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 宋体;">范围管理：<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 宋体;"><span>&nbsp;&nbsp;&nbsp;&nbsp; </span>首先会有产品经理提出我们要开发一个什么样的软件，有那些功能，基本上就是一些FeatureList，然后给出vision
and scope文档。软件开发的项目经理会根据这份文档，通过沟通，来写出SRS。其中主要包括了UseCase和非功能性需求以及一些约束条件。有了这些内容后，会开一个需求确认会，来确认已经明确的需求，会议上可以对不明确的需求进行讨论和完善。<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 宋体;"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 宋体;">时间管理：<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 宋体;"><span>&nbsp;&nbsp;&nbsp;&nbsp; </span>项目经理在接到软件项目开发任务后，就要制定出一个大致的项目计划，然后有了软件的需求文档之后，可以进一步细化项目的计划。在做项目计划的时候同时会牵扯到任务的分工。在项目进行的过程中严格按照项目计划进行。<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 宋体;"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 宋体;">采购管理<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 宋体;"><span>&nbsp;&nbsp;&nbsp;&nbsp; </span>项目的前期，项目经理需要明确软件安装需要多少服务器，服务器的配置是什么样的。什么时候必须到货，预算的经费是多少等。如果项目的人手不够，同时要考虑进行软件外包。<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 宋体;"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 宋体;">人力资源管理<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 宋体;"><span>&nbsp;&nbsp;&nbsp;&nbsp; </span>主要是提高团队的士气和凝聚力，让每一位团队成员都有清晰一致的目标，从生活等各个方面关心开发人员，帮助他们解决一些实实在在的问题。如果有软件外包，还要统一得管理好外包的软件开发人员。<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 宋体;"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 宋体;">沟通管理<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 宋体;"><span>&nbsp;&nbsp;&nbsp;&nbsp; </span>经常开项目小组会议，保持信息畅通，通过wiki等工具保持信息共享。每天都有晨会，周报发给小组的所有成员。通过聚餐、喝茶等方式增进交流。针对不同的员工可能需要采用不同的方式，例如：有的人喜欢面对面的沟通，有的喜欢email沟通，有得喜欢msn等等。<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 宋体;"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 宋体;">风险管理<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 宋体;"><span>&nbsp;&nbsp;&nbsp;&nbsp; </span>我认为比较重要的是抓住开发过程的几个环节，例如：需求分析、界面的设计、接口的设计、数据库的设计等。每天项目经理都要确认项目的进度是否正常，检查项目的质量，尽可能早的发现一些问题。经常得跟产品经理交流，确保开发的软件产品符合需求。<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 宋体;"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 宋体;">成本管理<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 宋体;"><span>&nbsp;&nbsp;&nbsp;&nbsp; </span>对于我接触的项目，牵扯到成本管理的主要就是开发人员的成本，分配好任务，把握住进度，提高开发团队的效率就能够为公司节省开支，从而达到控制成本的目的。<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 宋体;"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size: 9pt; font-family: 宋体;">质量管理<o:p></o:p></span></p>
<span style="font-size: 9pt; font-family: 宋体;"><span>&nbsp;&nbsp;&nbsp;&nbsp; </span>我认为质量管理应该贯穿于整个的软件开发过程中。比较典型的有，首先就是要保证SRS的质量，只有需求的质量控制住了，整个项目才有保障。软件的编码要规范，有详细清楚的注释，要求写单元测试，定期的进行代码review会议，要有集成测试和系统测试。对于我们的互联网产品，由于产品环境比较复杂，所以一定要有相应的系统测试，也可以称为线上测试。</span><img src ="http://www.blogjava.net/grantbb/aggbug/111728.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/grantbb/" target="_blank">我不是张嘎－小兵</a> 2007-04-18 20:03 <a href="http://www.blogjava.net/grantbb/archive/2007/04/18/111728.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>developerworks上关于泛型的文章</title><link>http://www.blogjava.net/grantbb/archive/2007/04/18/111727.html</link><dc:creator>我不是张嘎－小兵</dc:creator><author>我不是张嘎－小兵</author><pubDate>Wed, 18 Apr 2007 11:57:00 GMT</pubDate><guid>http://www.blogjava.net/grantbb/archive/2007/04/18/111727.html</guid><wfw:comment>http://www.blogjava.net/grantbb/comments/111727.html</wfw:comment><comments>http://www.blogjava.net/grantbb/archive/2007/04/18/111727.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/grantbb/comments/commentRss/111727.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/grantbb/services/trackbacks/111727.html</trackback:ping><description><![CDATA[<strong><a  href="http://www.ibm.com/developerworks/cn/java/j-djc02113/">诊断 Java 代码: 轻松掌握 Java 泛型</a></strong><br><br><strong><a  href="http://www.ibm.com/developerworks/cn/java/j-djc03113/">诊断 Java 代码: 轻松掌握 Java 泛型类型，第 2 部分</a></strong>
<br><br><strong><a  href="http://www.ibm.com/developerworks/cn/java/j-djc04093/">诊断 Java 代码: 轻松掌握 Java 泛型，第 3 部分</a></strong>
<br><br><strong><a  href="http://www.ibm.com/developerworks/cn/java/j-djc05133/">诊断 Java 代码: 轻松掌握 Java 泛型，第 4 部分</a></strong>
<br><br><strong><a  href="http://www.ibm.com/developerworks/cn/java/j-jtp01255.html">Java 理论和实践: 了解泛型</a></strong>
<br><br><strong><a  href="http://www.ibm.com/developerworks/cn/java/j-lo-gj/index.html">多角度看 Java 中的泛型</a></strong>
<br><br><strong><a  href="http://www.ibm.com/developerworks/cn/opensource/os-ecljgs/">Eclipse V3.1 中的 Java 泛型支持</a></strong>
<br><br><strong><a  href="http://www.ibm.com/developerworks/cn/views/java/tutorials.jsp?cv_doc_id=85169">介绍 JDK 5.0 中的泛型</a></strong>
<br><br><strong><a  href="http://www.ibm.com/developerworks/cn/java/j-genjava/">编译时使用 Generic Java 捕获更多的错误</a></strong>
<br><img src ="http://www.blogjava.net/grantbb/aggbug/111727.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/grantbb/" target="_blank">我不是张嘎－小兵</a> 2007-04-18 19:57 <a href="http://www.blogjava.net/grantbb/archive/2007/04/18/111727.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Lucene2.1的新变化</title><link>http://www.blogjava.net/grantbb/archive/2007/03/22/105669.html</link><dc:creator>我不是张嘎－小兵</dc:creator><author>我不是张嘎－小兵</author><pubDate>Thu, 22 Mar 2007 14:46:00 GMT</pubDate><guid>http://www.blogjava.net/grantbb/archive/2007/03/22/105669.html</guid><wfw:comment>http://www.blogjava.net/grantbb/comments/105669.html</wfw:comment><comments>http://www.blogjava.net/grantbb/archive/2007/03/22/105669.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.blogjava.net/grantbb/comments/commentRss/105669.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/grantbb/services/trackbacks/105669.html</trackback:ping><description><![CDATA[
		<p class="MsoNormal">
				<span lang="EN-US">1.9</span>
				<span style="font-family: 宋体;">到</span>
				<span lang="EN-US">2.0</span>
				<span style="font-family: 宋体;">的改动不是很多，主要是废弃了一些</span>
				<span lang="EN-US">API</span>
				<span style="font-family: 宋体;">，</span>
				<span lang="EN-US">2.0</span>
				<span style="font-family: 宋体;">起了一个过渡的作用。</span>
		</p>
		<p class="MsoNormal">
				<span lang="EN-US">2.1</span>
				<span style="font-family: 宋体;">是在</span>
				<span lang="EN-US">2.0</span>
				<span style="font-family: 宋体;">基础上做了很多的改进，提升了性能，修复了一些</span>
				<span lang="EN-US">Bug</span>
				<span style="font-family: 宋体;">等。</span>
		</p>
		<p class="MsoNormal">
				<span lang="EN-US">
						<o:p> </o:p>
				</span>
		</p>
		<p class="MsoNormal">
				<span lang="EN-US">Lucene2.1</span>
				<span style="font-family: 宋体;">在索引的格式上做了一些改进，所以旧版本的</span>
				<span lang="EN-US">Lucene</span>
				<span style="font-family: 宋体;">是无法访问</span>
				<span lang="EN-US">2.1</span>
				<span style="font-family: 宋体;">版的索引文件。但是</span>
				<span lang="EN-US">2.1</span>
				<span style="font-family: 宋体;">版本的可以读写旧版本的索引文件。保持向下的兼容性。这点需要我们在使用时注意。</span>
		</p>
		<p class="MsoNormal">
				<span lang="EN-US">
						<o:p> </o:p>
				</span>
		</p>
		<p class="MsoNormal">
				<span style="font-family: 宋体;">下面简单的列出一些新的特性：</span>
		</p>
		<p class="MsoNormal" style="margin-left: 18pt; text-indent: -18pt;">
				<!--[if !supportLists]-->
				<span style="" lang="EN-US">
						<span style="">1.<span style="font-family: &quot;Times New Roman&quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">      
</span></span>
				</span>
				<!--[endif]-->
				<span lang="EN-US">'s'</span>
				<span style="font-family: 宋体;">和</span>
				<span lang="EN-US">'t'</span>
				<span style="font-family: 宋体;">从默认的</span>
				<span lang="EN-US">stopwords</span>
				<span style="font-family: 宋体;">中移掉了。但是依然还有</span>
				<span lang="EN-US">'a'</span>
				<span style="font-family: 宋体;">也可以会有同样的问题，所以分词需要针对自己的应用进行自定义。</span>
		</p>
		<p class="MsoNormal" style="margin-left: 18pt; text-indent: -18pt;">
				<!--[if !supportLists]-->
				<span style="" lang="EN-US">
						<span style="">2.<span style="font-family: &quot;Times New Roman&quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">      
</span></span>
				</span>
				<!--[endif]-->
				<span style="font-family: 宋体;">更新了</span>
				<span lang="EN-US">StandardAnalyzer</span>
				<span style="font-family: 宋体;">中的针对</span>
				<span lang="EN-US">CJK</span>
				<span style="font-family: 宋体;">的</span>
				<span lang="EN-US">Unicode</span>
				<span style="font-family: 宋体;">代码范围。用处不大，因为我们中文需要自己开发分词。</span>
		</p>
		<p class="MsoNormal" style="margin-left: 18pt; text-indent: -18pt;">
				<!--[if !supportLists]-->
				<span style="" lang="EN-US">
						<span style="">3.<span style="font-family: &quot;Times New Roman&quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">      
</span></span>
				</span>
				<!--[endif]-->
				<span style="font-family: 宋体;">允许在</span>
				<span lang="EN-US">QueryParser</span>
				<span style="font-family: 宋体;">的最前面使用通配符</span>
				<span lang="EN-US">(*, ?)</span>
				<span style="font-family: 宋体;">，之前是不允许的。这个比较有意义，可以实现一些模糊搜索。</span>
		</p>
		<p class="MsoNormal" style="margin-left: 18pt; text-indent: -18pt;">
				<!--[if !supportLists]-->
				<span style="" lang="EN-US">
						<span style="">4.<span style="font-family: &quot;Times New Roman&quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">      
</span></span>
				</span>
				<!--[endif]-->
				<span lang="EN-US">QueryParser</span>
				<span style="font-family: 宋体;">默认使用</span>
				<span lang="EN-US">ConstantScoreRangeQuery</span>
				<span style="font-family: 宋体;">执行范围查询。增加了</span>
				<span lang="EN-US">useOldRangeQuery</span>
				<span style="font-family: 宋体;">属性允许在需要的情况下使用旧的</span>
				<span lang="EN-US">RangeQuery</span>
		</p>
		<p class="MsoNormal" style="margin-left: 18pt; text-indent: -18pt;">
				<!--[if !supportLists]-->
				<span style="" lang="EN-US">
						<span style="">5.<span style="font-family: &quot;Times New Roman&quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">      
</span></span>
				</span>
				<!--[endif]-->
				<span style="font-family: 宋体;">对于</span>
				<span lang="EN-US">WildcardQuery</span>
				<span style="font-family: 宋体;">，如果一个</span>
				<span lang="EN-US">term</span>
				<span style="font-family: 宋体;">不包含任何的</span>
				<span lang="EN-US">?</span>
				<span style="font-family: 宋体;">或者</span>
				<span lang="EN-US">*</span>
				<span style="font-family: 宋体;">，之前会抛出异常，现在会执行一个</span>
				<span lang="EN-US">TermQuery</span>
				<span style="font-family: 宋体;">。</span>
		</p>
		<p class="MsoNormal" style="margin-left: 18pt; text-indent: -18pt;">
				<!--[if !supportLists]-->
				<span style="" lang="EN-US">
						<span style="">6.<span style="font-family: &quot;Times New Roman&quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">      
</span></span>
				</span>
				<!--[endif]-->
				<span style="font-family: 宋体;">去掉了</span>
				<span lang="EN-US">deprecated</span>
				<span style="font-family: 宋体;">的</span>
				<span lang="EN-US">doc.fields()</span>
				<span style="font-family: 宋体;">方法和</span>
				<span lang="EN-US">Enumeration</span>
		</p>
		<p class="MsoNormal" style="margin-left: 18pt; text-indent: -18pt;">
				<!--[if !supportLists]-->
				<span style="" lang="EN-US">
						<span style="">7.<span style="font-family: &quot;Times New Roman&quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">      
</span></span>
				</span>
				<!--[endif]-->
				<span lang="EN-US">write lock</span>
				<span style="font-family: 宋体;">现在默认的位置是索引的目录，简单命名为</span>
				<span lang="EN-US">write.lock</span>
		</p>
		<p class="MsoNormal" style="margin-left: 18pt; text-indent: -18pt;">
				<!--[if !supportLists]-->
				<span style="" lang="EN-US">
						<span style="">8.<span style="font-family: &quot;Times New Roman&quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">      
</span></span>
				</span>
				<!--[endif]-->
				<span style="font-family: 宋体;">新的</span>
				<span lang="EN-US">FieldSelector API</span>
				<span style="font-family: 宋体;">，相关的</span>
				<span lang="EN-US">IndexReader</span>
				<span style="font-family: 宋体;">和实现都发生了变化。新的</span>
				<span lang="EN-US">Fieldable</span>
				<span style="font-family: 宋体;">接口被用作字段的延迟加载上。</span>
		</p>
		<p class="MsoNormal" style="margin-left: 18pt; text-indent: -18pt;">
				<!--[if !supportLists]-->
				<span style="" lang="EN-US">
						<span style="">9.<span style="font-family: &quot;Times New Roman&quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">      
</span></span>
				</span>
				<!--[endif]-->
				<span style="font-family: 宋体;">使用</span>
				<span lang="EN-US">MultiFieldQueryParser</span>
				<span style="font-family: 宋体;">的时候可以为不同的</span>
				<span lang="EN-US">field</span>
				<span style="font-family: 宋体;">指定不同的</span>
				<span lang="EN-US">boosts</span>
		</p>
		<p class="MsoNormal" style="margin-left: 18pt; text-indent: -18pt;">
				<!--[if !supportLists]-->
				<span style="" lang="EN-US">
						<span style="">10.<span style="font-family: &quot;Times New Roman&quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">  
</span></span>
				</span>
				<!--[endif]-->
				<span style="font-family: 宋体;">新的方法</span>
				<span lang="EN-US"> IndexWriter.addIndexesNoOptimize()</span>
				<span style="font-family: 宋体;">在新添加一个新的</span>
				<span lang="EN-US">segments</span>
				<span style="font-family: 宋体;">的时候，只进行合并，不进行优化。</span>
		</p>
		<p class="MsoNormal" style="margin-left: 18pt; text-indent: -18pt;">
				<!--[if !supportLists]-->
				<span style="" lang="EN-US">
						<span style="">11.<span style="font-family: &quot;Times New Roman&quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">  
</span></span>
				</span>
				<!--[endif]-->
				<span lang="EN-US">QueryParser</span>
				<span style="font-family: 宋体;">允许在引号和短语中使用反斜线</span>
		</p>
		<p class="MsoNormal" style="margin-left: 18pt; text-indent: -18pt;">
				<!--[if !supportLists]-->
				<span style="" lang="EN-US">
						<span style="">12.<span style="font-family: &quot;Times New Roman&quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">  
</span></span>
				</span>
				<!--[endif]-->
				<span style="font-family: 宋体;">增加了方法</span>
				<span lang="EN-US">RAMDirectory.sizeInBytes(), IndexWriter.ramSizeInBytes()</span>
				<span style="font-family: 宋体;">和</span>
				<span lang="EN-US">IndexWriter.flushRamSegments()</span>
				<span style="font-family: 宋体;">，允许应用程序控制索引时缓存文档对内存的使用，这些蛮有用的，可以用于监控索引的过程。</span>
		</p>
		<p class="MsoNormal" style="margin-left: 18pt; text-indent: -18pt;">
				<!--[if !supportLists]-->
				<span style="" lang="EN-US">
						<span style="">13.<span style="font-family: &quot;Times New Roman&quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">  
</span></span>
				</span>
				<!--[endif]-->
				<span lang="EN-US">QueryParser</span>
				<span style="font-family: 宋体;">解析</span>
				<span lang="EN-US">*:*</span>
				<span style="font-family: 宋体;">为匹配所有的内容</span>
		</p>
		<p class="MsoNormal" style="margin-left: 18pt; text-indent: -18pt;">
				<!--[if !supportLists]-->
				<span style="" lang="EN-US">
						<span style="">14.<span style="font-family: &quot;Times New Roman&quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">  
</span></span>
				</span>
				<!--[endif]-->
				<span style="font-family: 宋体;">可以通过命令行在已经存在的索引文件中修改和删除</span>
				<span lang="EN-US">field</span>
		</p>
		<p class="MsoNormal" style="margin-left: 18pt; text-indent: -18pt;">
				<!--[if !supportLists]-->
				<span style="" lang="EN-US">
						<span style="">15.<span style="font-family: &quot;Times New Roman&quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">  
</span></span>
				</span>
				<!--[endif]-->
				<span lang="EN-US">IndexWriter</span>
				<span style="font-family: 宋体;">增加了方法来高效得更新</span>
				<span lang="EN-US">documents</span>
				<span style="font-family: 宋体;">。增加</span>
				<span lang="EN-US">IndexWriter.flush()</span>
				<span style="font-family: 宋体;">方法将内存的内容刷新到文件系统。</span>
		</p>

                                            小兵 2007-3-22<br /><img src ="http://www.blogjava.net/grantbb/aggbug/105669.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/grantbb/" target="_blank">我不是张嘎－小兵</a> 2007-03-22 22:46 <a href="http://www.blogjava.net/grantbb/archive/2007/03/22/105669.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>MySpace的成功经验</title><link>http://www.blogjava.net/grantbb/archive/2007/03/20/104917.html</link><dc:creator>我不是张嘎－小兵</dc:creator><author>我不是张嘎－小兵</author><pubDate>Tue, 20 Mar 2007 04:16:00 GMT</pubDate><guid>http://www.blogjava.net/grantbb/archive/2007/03/20/104917.html</guid><wfw:comment>http://www.blogjava.net/grantbb/comments/104917.html</wfw:comment><comments>http://www.blogjava.net/grantbb/archive/2007/03/20/104917.html#Feedback</comments><slash:comments>3</slash:comments><wfw:commentRss>http://www.blogjava.net/grantbb/comments/commentRss/104917.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/grantbb/services/trackbacks/104917.html</trackback:ping><description><![CDATA[
		<ul>
				<li>数字
<ul><li>MySpace月访问量400亿

</li><li>比喻：粉刷金门大桥，工作完成之时，就是重新来过之日

</li><li>新闻集团2005年5.8亿收购MySpace，现在至少值60亿

</li></ul></li>
				<li>数据缓存
<ul><li>同步问题？

</li></ul></li>
				<li>50万账户
<ul><li>数据库采用主从结构，主负责update，从负责read

</li></ul></li>
				<li>1-2百万账户
<ul><li>I/O并发容量问题

</li><li>不同的数据库服务器服务于不同的服务
<ul><li>博客

</li><li>认证

</li><li>个性信息拆分

</li></ul></li><li>新功能使用新数据库

</li><li>从存储设备与数据库服务器直接交换切换到SAN(Storage Area Network)

</li><li>用高带宽、专门设计的网络将大量磁盘存储设备连接在一起(SAN)

</li></ul></li>
				<li>3百万账户
<ul><li>高度独立，有些信息必须共享
<ul><li>每个数据库必须有各自的用户表副本

</li></ul></li><li>向上和向外扩展的问题
<ul><li>向上：多CPU，大内存
<ul><li>昂贵

</li></ul></li><li>只要增长趋势存在，无论如何都要走向外扩展的道路

</li></ul></li><li>将整个站点作为一个应用看待

</li><li>将用户按百万一组分割
<ul><li>各组的全部数据存放到一个DB实例

</li><li>每台两个DB实例，容纳200万用户

</li></ul></li><li>还有一个特殊的数据库保存用户名和密码
<ul><li>登录、认证

</li><li>功能单一

</li></ul></li></ul></li>
				<li>9百万到1千7百万账户
<ul><li>1千万：存储瓶颈、I/O极限

</li><li>某些数据量会非常大（热门、突发）

</li><li>3PAR:均匀数据访问负荷（负载均衡）

</li><li>数据缓存层
<ul><li>被频繁请求的数据对象的副本

</li><li>不是所有的数据都要放到数据库

</li></ul></li></ul></li>
				<li>2千6百万账户
<ul><li>升级到64位
<ul><li>DB：32G内存

</li><li>升级：64G

</li></ul></li></ul></li>
				<li>可靠性
<ul><li>备用的系统

</li><li>物理隔开

</li></ul></li>
				<li>名言：我们犯过大量的错误，但到头来，我们作对的还是比做错的多

</li>
		</ul>
<img src ="http://www.blogjava.net/grantbb/aggbug/104917.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/grantbb/" target="_blank">我不是张嘎－小兵</a> 2007-03-20 12:16 <a href="http://www.blogjava.net/grantbb/archive/2007/03/20/104917.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>JVM参数优化</title><link>http://www.blogjava.net/grantbb/archive/2007/03/05/101951.html</link><dc:creator>我不是张嘎－小兵</dc:creator><author>我不是张嘎－小兵</author><pubDate>Mon, 05 Mar 2007 08:42:00 GMT</pubDate><guid>http://www.blogjava.net/grantbb/archive/2007/03/05/101951.html</guid><wfw:comment>http://www.blogjava.net/grantbb/comments/101951.html</wfw:comment><comments>http://www.blogjava.net/grantbb/archive/2007/03/05/101951.html#Feedback</comments><slash:comments>4</slash:comments><wfw:commentRss>http://www.blogjava.net/grantbb/comments/commentRss/101951.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/grantbb/services/trackbacks/101951.html</trackback:ping><description><![CDATA[我经常会这样来设置服务器端的JVM:JAVA_OPTS="-server -Xms3000m -Xmx3000m -Xss512k"<br /><br />-server:一定要作为第一个参数，在多个CPU时性能佳<br />-Xms：初始Heap大小，使用的最小内存<br />-Xmx：java heap最大值，使用的最大内存<br />    上面两个值一般设置为同样的大小。<br /><br />-Xss：每个线程的Stack大小<br /><br />-verbose:gc 现实垃圾收集信息<br />-Xloggc:gc.log 指定垃圾收集日志文件<br /><br />刚刚了解到的一些参数（待实践测试）<br /><strike>-Xmn：young generation的heap大小，一般设置为Xmx的3、4分之一</strike><br /><br />-XX:+UseParNewGC ：缩短minor收集的时间<br />-XX:+UseConcMarkSweepGC ：缩短major收集的时间<br />    提示：此选项在Heap Size 比较大而且Major收集时间较长的情况下使用更合适。<br /><br /><img src ="http://www.blogjava.net/grantbb/aggbug/101951.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/grantbb/" target="_blank">我不是张嘎－小兵</a> 2007-03-05 16:42 <a href="http://www.blogjava.net/grantbb/archive/2007/03/05/101951.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Spring整合C3P0的配置</title><link>http://www.blogjava.net/grantbb/archive/2006/12/18/88601.html</link><dc:creator>我不是张嘎－小兵</dc:creator><author>我不是张嘎－小兵</author><pubDate>Mon, 18 Dec 2006 10:24:00 GMT</pubDate><guid>http://www.blogjava.net/grantbb/archive/2006/12/18/88601.html</guid><wfw:comment>http://www.blogjava.net/grantbb/comments/88601.html</wfw:comment><comments>http://www.blogjava.net/grantbb/archive/2006/12/18/88601.html#Feedback</comments><slash:comments>3</slash:comments><wfw:commentRss>http://www.blogjava.net/grantbb/comments/commentRss/88601.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/grantbb/services/trackbacks/88601.html</trackback:ping><description><![CDATA[网上没有找到比较合适的，自己看了看，然后放到项目中实验的一下。<br />很多人都认为比DBCP优秀。<br /><br />&lt;bean id="c3p0DataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource" destroy-method="close"&gt;<br />      &lt;property name="driverClass"&gt;<br />        &lt;value&gt;${jdbc.driverClassName}&lt;/value&gt;<br />      &lt;/property&gt;<br />      &lt;property name="jdbcUrl"&gt;<br />        &lt;value&gt;${jdbc.url}&lt;/value&gt;<br />      &lt;/property&gt;<br />      &lt;property name="user"&gt;<br />       &lt;value&gt;${jdbc.username}&lt;/value&gt;<br />      &lt;/property&gt;<br />      &lt;property name="password"&gt;<br />       &lt;value&gt;${jdbc.password}&lt;/value&gt;<br />      &lt;/property&gt;<br />      &lt;property name="initialPoolSize"&gt;&lt;value&gt;10&lt;/value&gt;&lt;/property&gt;<br />      &lt;property name="minPoolSize"&gt;&lt;value&gt;5&lt;/value&gt;&lt;/property&gt;<br />      &lt;property name="maxPoolSize"&gt;&lt;value&gt;30&lt;/value&gt;&lt;/property&gt;<br />      &lt;property name="acquireIncrement"&gt;&lt;value&gt;5&lt;/value&gt;&lt;/property&gt;<br />      &lt;property name="maxIdleTime"&gt;&lt;value&gt;10&lt;/value&gt;&lt;/property&gt;<br />      &lt;property name="maxStatements"&gt;&lt;value&gt;0&lt;/value&gt;&lt;/property&gt;<br />    &lt;/bean&gt;<br /><br />以下几个参数是使用的基本配置参数：<br />initialPoolSize： <br />Number of Connections a pool will try to acquire upon startup. Should be between minPoolSize and maxPoolSize<br />连接池初始化时获取的链接数，介于minPoolSize和maxPoolSize之间<br /><br />minPoolSize：<br />Minimum number of Connections a pool will maintain at any given time.<br />最小链接数<br /><br />maxPoolSize：<br />Maximum number of Connections a pool will maintain at any given time.<br />最大连接数<br /><br />acquireIncrement：<br />Determines how many connections at a time c3p0 will try to acquire when the pool is exhausted.<br />在当前连接数耗尽的时候，一次获取的新的连接数<br /><br />maxIdleTime：<br />Seconds a Connection can remain pooled but unused before being discarded. Zero means idle connections never expire.<br />最大空闲的时间，单位是秒，无用的链接再过时后会被回收<br /><img src ="http://www.blogjava.net/grantbb/aggbug/88601.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/grantbb/" target="_blank">我不是张嘎－小兵</a> 2006-12-18 18:24 <a href="http://www.blogjava.net/grantbb/archive/2006/12/18/88601.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>P6spy和SQL优化</title><link>http://www.blogjava.net/grantbb/archive/2006/11/01/78445.html</link><dc:creator>我不是张嘎－小兵</dc:creator><author>我不是张嘎－小兵</author><pubDate>Wed, 01 Nov 2006 03:48:00 GMT</pubDate><guid>http://www.blogjava.net/grantbb/archive/2006/11/01/78445.html</guid><wfw:comment>http://www.blogjava.net/grantbb/comments/78445.html</wfw:comment><comments>http://www.blogjava.net/grantbb/archive/2006/11/01/78445.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/grantbb/comments/commentRss/78445.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/grantbb/services/trackbacks/78445.html</trackback:ping><description><![CDATA[
		<p class="MsoNormal">
				<b>
						<span style="font-size: 10pt; font-family: Verdana;" lang="EN-US">P6Spy</span>
				</b>
				<b>
						<span style="font-size: 10pt; font-family: 宋体;">：</span>
				</b>
				<b>
						<span style="font-size: 10pt; font-family: Verdana;" lang="EN-US">
								<a href="http://www.p6spy.com/">http://www.p6spy.com/</a>
								<o:p>
								</o:p>
						</span>
				</b>
		</p>
		<p class="MsoNormal">
				<span style="font-size: 10pt; font-family: 宋体;">是一个可以用来在应用程序中拦截和修改数据操作语句的开源框架。对</span>
				<span style="font-size: 10pt; font-family: Verdana;" lang="EN-US">SQL</span>
				<span style="font-size: 10pt; font-family: 宋体;">进行拦截，相当于一个</span>
				<span style="font-size: 10pt; font-family: Verdana;" lang="EN-US">SQL</span>
				<span style="font-size: 10pt; font-family: 宋体;">语句的记录器。</span>
				<span style="font-size: 10pt; font-family: Verdana;" lang="EN-US">
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal">
				<span style="font-size: 10pt; font-family: 宋体;">使用很简单，只需要在配置中将驱动程序改成</span>
				<span style="font-size: 10pt; font-family: Verdana;" lang="EN-US">P6Sky</span>
				<span style="font-size: 10pt; font-family: 宋体;">的拦截驱动。可能会给系统带来略微的性能下降，但是在开发环境中的影响很小。</span>
				<b>
						<span style="font-size: 10pt; font-family: Verdana;" lang="EN-US">
								<o:p>
								</o:p>
						</span>
				</b>
		</p>
		<p class="MsoNormal">
				<b>
						<span style="font-size: 10pt; font-family: Verdana;" lang="EN-US">
								<o:p> </o:p>
						</span>
				</b>
		</p>
		<p class="MsoNormal">
				<strong>
						<span style="font-size: 10pt; font-family: Verdana;" lang="EN-US">open source GUI versions of P6Spy</span>
				</strong>
				<strong>
						<span style="font-size: 10pt; font-family: 宋体;">：</span>
				</strong>
				<strong>
						<span style="font-size: 10pt; font-family: Verdana;" lang="EN-US">
								<a href="http://www.irongrid.com/">irongrid</a>
								<o:p>
								</o:p>
						</span>
				</strong>
		</p>
		<p class="MsoNormal">
				<strong>
						<span style="font-size: 10pt; font-family: Verdana;" lang="EN-US">
								<o:p> </o:p>
						</span>
				</strong>
		</p>
		<p class="MsoNormal">
				<strong>
						<span style="font-size: 10pt; font-family: Verdana;" lang="EN-US">SQL Profiler<o:p></o:p></span>
				</strong>
		</p>
		<p class="MsoNormal">
				<span lang="EN-US">
						<a href="http://www.jahia.org/jahia/page377.html">http://www.jahia.org/jahia/page377.html</a>
				</span>
		</p>
		<p class="MsoNormal">
				<span style="font-family: 宋体;">是一个基于</span>
				<span lang="EN-US">P6Sky</span>
				<span style="font-family: 宋体;">引擎的快速剖析工具。统计</span>
				<span lang="EN-US">SQL</span>
				<span style="font-family: 宋体;">语句，分析那里是性能瓶颈。在那里创建索引或者采用什么样的方法来提高效率。根据</span>
				<span lang="EN-US">SQL</span>
				<span style="font-family: 宋体;">查询语句帮助生成合适的索引脚本。</span>
		</p>
		<p class="MsoNormal">
				<span lang="EN-US">
						<o:p> </o:p>
				</span>
		</p>
		<p class="MsoNormal">
				<span style="font-family: 宋体;">主要参考：</span>
		</p>
		<p class="MsoNormal">
				<span lang="EN-US">F:\</span>
				<span style="font-family: 宋体;">专题学习</span>
				<span lang="EN-US">\P6spy</span>
		</p>
		<p class="MsoNormal">
				<span style="font-family: 宋体;">用</span>
				<span lang="EN-US">p6spy</span>
				<span style="font-family: 宋体;">和</span>
				<span lang="EN-US">sqlprofiler</span>
				<span style="font-family: 宋体;">来进行</span>
				<span lang="EN-US">jdbc sql</span>
				<span style="font-family: 宋体;">日志记录和分析</span>
		</p>
		<p class="MsoNormal">
				<span lang="EN-US">JDBC SQL Profiling</span>
				<span style="font-family: 宋体;">及</span>
				<span lang="EN-US">p6spy</span>
		</p>
<img src ="http://www.blogjava.net/grantbb/aggbug/78445.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/grantbb/" target="_blank">我不是张嘎－小兵</a> 2006-11-01 11:48 <a href="http://www.blogjava.net/grantbb/archive/2006/11/01/78445.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>我的TDD实践</title><link>http://www.blogjava.net/grantbb/archive/2006/09/21/71028.html</link><dc:creator>我不是张嘎－小兵</dc:creator><author>我不是张嘎－小兵</author><pubDate>Thu, 21 Sep 2006 02:54:00 GMT</pubDate><guid>http://www.blogjava.net/grantbb/archive/2006/09/21/71028.html</guid><wfw:comment>http://www.blogjava.net/grantbb/comments/71028.html</wfw:comment><comments>http://www.blogjava.net/grantbb/archive/2006/09/21/71028.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/grantbb/comments/commentRss/71028.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/grantbb/services/trackbacks/71028.html</trackback:ping><description><![CDATA[
		<p>1.首先定义接口</p>
		<p>2.然后用IDE产生一个实现类.<br />  需要修改Eclipse的模板,使得所有生成的实现类抛出UnsupportedOperationException异常.例如:<br /> public boolean checkUserByUsernameAndLogincode(String username, String logincode) {<br />  // TODO Auto-generated method stub<br />  throw new UnsupportedOperationException();<br />  //return false;<br /> }<br />:DAO类都要抛出DataAccessException</p>
		<p>3.然后针对该类写测试,每次只针对 一个方法 写测试.<br /> 此时运行测试是不能够通过的.会抛出UnsupportedOperationException</p>
		<p>4.然后编写接口的实现,来使得测试获得通过.</p>
<img src ="http://www.blogjava.net/grantbb/aggbug/71028.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/grantbb/" target="_blank">我不是张嘎－小兵</a> 2006-09-21 10:54 <a href="http://www.blogjava.net/grantbb/archive/2006/09/21/71028.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title> 几个著名java开源缓存系统的介绍</title><link>http://www.blogjava.net/grantbb/archive/2006/09/21/71027.html</link><dc:creator>我不是张嘎－小兵</dc:creator><author>我不是张嘎－小兵</author><pubDate>Thu, 21 Sep 2006 02:52:00 GMT</pubDate><guid>http://www.blogjava.net/grantbb/archive/2006/09/21/71027.html</guid><wfw:comment>http://www.blogjava.net/grantbb/comments/71027.html</wfw:comment><comments>http://www.blogjava.net/grantbb/archive/2006/09/21/71027.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/grantbb/comments/commentRss/71027.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/grantbb/services/trackbacks/71027.html</trackback:ping><description><![CDATA[
		<p class="main">下面提到的一些Cache系统，我用过OSCache、EHCache，这两个都是比较轻量级的。感觉OSCache的API比较方便，接口定义比较清楚。<br />而JBossCache会用来做分布式的Cache。<br /><br /><br /><strong>         OSCache </strong><br />　<strong>　</strong>OSCache是个一个广泛采用的高性能的J2EE缓存框架，OSCache能用于任何Java应用程序的普通的缓存解决方案。 <br />　<strong>　</strong>OSCache有以下特点： <br />　<strong>　</strong>缓存任何对象，你可以不受限制的缓存部分jsp页面或HTTP请求，任何java对象都可以缓存。 <br />　<strong>　</strong>拥有全面的API--OSCache API给你全面的程序来控制所有的OSCache特性。 <br />　<strong>　</strong>永久缓存--缓存能随意的写入硬盘，因此允许昂贵的创建（expensive-to-create）数据来保持缓存，甚至能让应用重启。 <br />　<strong>　</strong>支持集群--集群缓存数据能被单个的进行参数配置，不需要修改代码。 <br />缓存记录的过期--你可以有最大限度的控制缓存对象的过期，包括可插入式的刷新策略（如果默认性能不需要时）。 <br />　<strong>　</strong>官方网站 <a href="http://www.opensymphony.com/oscache/">http://www.opensymphony.com/oscache/ </a></p>
		<p class="main">　<strong>　Java Caching System </strong><br />　<strong>　</strong>JSC(Java Caching System)是一个用分布式的缓存系统，是基于服务器的java应用程序。它是通过提供管理各种动态缓存数据来加速动态web应用。 <br />　<strong>　</strong>JCS和其他缓存系统一样，也是一个用于高速读取，低速写入的应用程序。 <br />　<strong>　</strong>动态内容和报表系统能够获得更好的性能。 <br />　<strong>　</strong>如果一个网站，有重复的网站结构，使用间歇性更新方式的数据库（而不是连续不断的更新数据库），被重复搜索出相同结果的，就能够通过执行缓存方式改进其性能和伸缩性。 <br />　<strong>　</strong>官方网站 <a href="http://jakarta.apache.org/turbine/jcs/">http://jakarta.apache.org/turbine/jcs/ </a></p>
		<p class="main">　<strong>　EHCache </strong><br />　<strong>　</strong>EHCache 是一个纯java的在进程中的缓存，它具有以下特性：快速，简单，为Hibernate2.1充当可插入的缓存，最小的依赖性，全面的文档和测试。 </p>
		<p class="main">　<strong>　</strong>官方网站 <a href="http://ehcache.sourceforge.net/">http://ehcache.sourceforge.net/ </a></p>
		<p class="main">　<strong>　JCache </strong><br />　<strong>　</strong>JCache是个开源程序，正在努力成为JSR-107开源规范，JSR-107规范已经很多年没改变了。这个版本仍然是构建在最初的功能定义上。 <br />　<strong>　</strong>官方网站 <a href="http://jcache.sourceforge.net/">http://jcache.sourceforge.net/ </a></p>
		<p class="main">
				<strong>　<strong>　</strong>ShiftOne </strong>
				<br />　<strong>　</strong>ShiftOne Java Object Cache是一个执行一系列严格的对象缓存策略的Java lib，就像一个轻量级的配置缓存工作状态的框架。 <br />　<strong>　</strong>官方网站 <a href="http://jocache.sourceforge.net/">http://jocache.sourceforge.net/</a></p>
		<p class="main">　<strong>　SwarmCache </strong><br />　<strong>　</strong>SwarmCache是一个简单且有效的分布式缓存，它使用IP multicast与同一个局域网的其他主机进行通讯，是特别为集群和数据驱动web应用程序而设计的。SwarmCache能够让典型的读操作大大超过写操作的这类应用提供更好的性能支持。 <br />　<strong>　</strong>SwarmCache使用JavaGroups来管理从属关系和分布式缓存的通讯。 <br />　<strong>　</strong>官方网站 <a href="http://swarmcache.sourceforge.net/">http://swarmcache.sourceforge.net </a></p>
		<p class="main">　<strong>　TreeCache / JBossCache </strong><br />　<strong>　</strong>JBossCache 是一个复制的事务处理缓存，它允许你缓存企业级应用数据来更好的改善性能。缓存数据被自动复制，让你轻松进行JBoss服务器之间的集群工作。 JBossCache能够通过JBoss应用服务或其他J2EE容器来运行一个MBean服务，当然，它也能独立运行。 <br />　<strong>　</strong>JBossCache包括两个模块：TreeCache和TreeCacheAOP。 <br />　<strong>　</strong>TreeCache --是一个树形结构复制的事务处理缓存。 <br />　<strong>　</strong>TreeCacheAOP --是一个“面向对象”缓存，它使用AOP来动态管理POJO(Plain Old Java Objects) <br />　<strong>　</strong>注：AOP是OOP的延续，是Aspect Oriented Programming的缩写，意思是面向方面编程。 <br />　<strong>　</strong>官方网站 <a href="http://www.jboss.org/products/jbosscache">http://www.jboss.org/products/jbosscache </a></p>
		<p class="main">　<strong>　WhirlyCache </strong><br />　<strong>　</strong>Whirlycache是一个快速的、可配置的、存在于内存中的对象的缓存。它能够通过缓存对象来加快网站或应用程序的速度，否则就必须通过查询数据库或其他代价较高的处理程序来建立。 <br />官方网站 <a href="https://whirlycache.dev.java.net/">https://whirlycache.dev.java.net/ </a></p>
<img src ="http://www.blogjava.net/grantbb/aggbug/71027.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/grantbb/" target="_blank">我不是张嘎－小兵</a> 2006-09-21 10:52 <a href="http://www.blogjava.net/grantbb/archive/2006/09/21/71027.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>使用CAS碰到的两个问题,寻求帮助！</title><link>http://www.blogjava.net/grantbb/archive/2006/07/06/56918.html</link><dc:creator>我不是张嘎－小兵</dc:creator><author>我不是张嘎－小兵</author><pubDate>Thu, 06 Jul 2006 03:11:00 GMT</pubDate><guid>http://www.blogjava.net/grantbb/archive/2006/07/06/56918.html</guid><wfw:comment>http://www.blogjava.net/grantbb/comments/56918.html</wfw:comment><comments>http://www.blogjava.net/grantbb/archive/2006/07/06/56918.html#Feedback</comments><slash:comments>3</slash:comments><wfw:commentRss>http://www.blogjava.net/grantbb/comments/commentRss/56918.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/grantbb/services/trackbacks/56918.html</trackback:ping><description><![CDATA[
		<span class="postbody">问题一： <br />在tomcat里面配置好SSL之后，访问相关应用都会弹出一个关于认证的弹出窗口。 <br />有什么办法能够不让这样的认证窗口弹出来呢？ <br />象下面这样就不会有弹出窗口，不知道如何实现？ <br /><a href="https://secure.its.yale.edu/cas/servlet/login" target="_blank">https://secure.its.yale.edu/cas/servlet/login</a><br /><br />问题二： <br />CAS使用的cookie是保存在内存中的,如果浏览器关闭或超过8小时就直接丢弃的，而不是保存硬盘里的。 <br />浏览器：ie <br />1.访问clientA,跳转到 CAS SERVER认证用户密码.通过认证 <br />2.新开一个ie窗口,访问clientB,需再次到CAS SERVER认证用户密码（如果是在同一个窗口则只需认证一次） <br /><br />相反，使用浏览器firefox： <br />1.访问clientA,跳转到 CAS SERVER认证用户密码.通过认证 <br />2.新开一个ie窗口,访问clientB, 不 再到CAS SERVER认证用户密码 <br /><br />感觉ie和firefox的差别还是蛮的，很奇怪！</span>
<img src ="http://www.blogjava.net/grantbb/aggbug/56918.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/grantbb/" target="_blank">我不是张嘎－小兵</a> 2006-07-06 11:11 <a href="http://www.blogjava.net/grantbb/archive/2006/07/06/56918.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>批量处理JDBC语句提高处理速度 </title><link>http://www.blogjava.net/grantbb/archive/2006/06/30/55898.html</link><dc:creator>我不是张嘎－小兵</dc:creator><author>我不是张嘎－小兵</author><pubDate>Fri, 30 Jun 2006 03:19:00 GMT</pubDate><guid>http://www.blogjava.net/grantbb/archive/2006/06/30/55898.html</guid><wfw:comment>http://www.blogjava.net/grantbb/comments/55898.html</wfw:comment><comments>http://www.blogjava.net/grantbb/archive/2006/06/30/55898.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/grantbb/comments/commentRss/55898.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/grantbb/services/trackbacks/55898.html</trackback:ping><description><![CDATA[有时候JDBC运行得不够快，这使得有些程序员使用数据库相关的存储过程。作为一个替代方案，可以试试使用Statement 的批量处理特性看看能否同时执行所有的SQL以提高速度。 <br /><br /><p>存储过程的最简单的形式就是包含一系列SQL语句的过程，将这些语句放在一起便于在同一个地方管理也可以提高速度。Statement 类可以包含一系列SQL语句，因此允许在同一个数据库事务执行所有的那些语句而不是执行对数据库的一系列调用。 </p><p>使用批量处理功能涉及下面的两个方法： </p><p>addBatch(String) 方法 <br />executeBatch方法 <br />如果你正在使用Statement 那么addBatch 方法可以接受一个通常的SQL语句，或者如果你在使用PreparedStatement ，那么也可以什么都不向它增加。 </p><p>executeBatch 方法执行那些SQL语句并返回一个int值的数组，这个数组包含每个语句影响的数据的行数。如果将一个SELECT语句或者其他返回一个ResultSet的SQL语句放入批量处理中就会导致一个SQLException异常。 </p><p>关于java.sql.Statement 的简单范例可以是： </p><pre>  
  Statement stmt = conn.createStatement();<br />
  stmt.insert("DELETE FROM Users");<br />
  stmt.insert("INSERT INTO Users VALUES('rod', 37, 'circle')");<br />
  stmt.insert("INSERT INTO Users VALUES('jane', 33, 'triangle')");<br />
  stmt.insert("INSERT INTO Users VALUES('freddy', 29, 'square')");<p></p>
  int[] counts = stmt.executeBatch(); </pre><p>PreparedStatement 有些不同，它只能处理一部分SQL语法，但是可以有很多参数，因此重写上面的范例的一部分就可以得到下面的结果： </p><p>// 注意这里没有删除语句</p><pre>  PreparedStatement stmt = conn.prepareStatement(<br />
  "INSERT INTO Users VALUES(?,?,?)"<br />
  );<p></p>
  User[ ] users = ...;<br />
  for(int i=0; i&lt;users.length; i++) {<br />
  stmt.setInt(1, users[i].getName());<br />
  stmt.setInt(2, users[i].getAge());<br />
  stmt.setInt(3, users[i].getShape());<br />
  stmt.addBatch( );<br />
  }<p></p>
  int[ ] counts = stmt.executeBatch(); </pre><p>如果你不知道你的语句要运行多少次，那么这是一个很好的处理SQL代码的方法。在不使用批量处理的情况下，如果添加50个用户，那么性能就有影响，如果某个人写了一个脚本添加一万个用户，程序可能变得很糟糕。添加批处理功能就可以帮助提高性能，而且在后面的那种情况下代码的可读性也更好。 <br /></p><img src ="http://www.blogjava.net/grantbb/aggbug/55898.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/grantbb/" target="_blank">我不是张嘎－小兵</a> 2006-06-30 11:19 <a href="http://www.blogjava.net/grantbb/archive/2006/06/30/55898.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title> 利用CAS实现SSO技术</title><link>http://www.blogjava.net/grantbb/archive/2006/06/28/55559.html</link><dc:creator>我不是张嘎－小兵</dc:creator><author>我不是张嘎－小兵</author><pubDate>Wed, 28 Jun 2006 08:19:00 GMT</pubDate><guid>http://www.blogjava.net/grantbb/archive/2006/06/28/55559.html</guid><wfw:comment>http://www.blogjava.net/grantbb/comments/55559.html</wfw:comment><comments>http://www.blogjava.net/grantbb/archive/2006/06/28/55559.html#Feedback</comments><slash:comments>11</slash:comments><wfw:commentRss>http://www.blogjava.net/grantbb/comments/commentRss/55559.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/grantbb/services/trackbacks/55559.html</trackback:ping><description><![CDATA[
		<span class="bright-message-list">
				<span class="bright-message-list">1 安装<br />1.1系统配置<br />以下的软件环境是必需的：<br />1． JDK 1.4.2 or higher<br />2． Tomcat 5.X<br /><br />1.2 Tomcat 配置，启用SSL<br />1. 在要安装CAS的机器上为Tomcat生成用于SSL通讯的密钥：<br /><br />keytool –genkey –alias tomcat –keyalg RSA<br />这时需要输入密钥密码和其他参数（第一个参数CN必须设置为CAS机器名，本机使用localhost测试），会在用户目录中生成.keystore密钥文件。<br /><br />2. 导出密钥文件：<br /><br />keytool –export –file server.crt –alias tomcat<br />这时需要输入上一步设定的密码，结果会在当前目录生成server.crt信任状。<br /><br />3. 为客户端的JVM导入密钥：<br /><br />keytool –import –keystore $JAVA_HOME\jre\lib\security\cacerts <br />–file server.crt –alias tomcat<br />输入密码时注意密码为“changeit”。<br />4. 修改服务端Tomcat配置文件，启用SSL。修改$CATALINA_HOME\conf\server.xml，去掉有关SSL的那一段的注释，需要在connector字段中加入keystorePass="password"（password即为1、2步中的密码），keystoreFile＝ "keystorePath"（可以把第一步生成的.keystore复制到$CATALINA_HOME\conf下，这样keystoreFile＝ "conf/.keystore"）。<br /><br />5. 重启Tomcat，测试https://server:8443是否可以访问（server应换为机器名或IP地址）。<br /><br />1.3 CAS Server安装<br /><br />下载CAS Server 3.0.4，将其中的cas.war复制到$CATALINA_HOME\webapps下，当然现在CAS中的用户密码认证Handler是很简陋的，产品化必须重写这部分代码，生成新的cas.jar。这时可以通过访问https://localhost:8443/cas测试CAS是否成功部署，应看到CAS登陆界面。<br /><br />1.4 CAS Client 部署<br /><br />利用Tomcat自带的servlets-examples （$CATALINA_HOME\webapps\servlets-examples）和jsp-examples（$CATALINA_HOME\ webapps\jsp-examples）进行试验，下载最新版本的Java CAS Client，将casclient.jar复制到这两个项目的WEB-INF目录的lib下（需要新建此目录）。修改两个项目的WEB-INF\ web.xml，添加如下的过滤器：<br /><br />&lt;!-- CAS Filters --&gt;<br />    &lt;filter&gt;<br />        &lt;filter-name&gt;CASFilter&lt;/filter-name&gt;<br />        &lt;filter-class&gt;edu.yale.its.tp.cas.client.filter.CASFilter&lt;/filter-class&gt;<br />        &lt;init-param&gt;<br />            &lt;param-name&gt;edu.yale.its.tp.cas.client.filter.loginUrl&lt;/param-name&gt;<br />            &lt;param-value&gt;https://server:8443/cas/login&lt;/param-value&gt;<br />        &lt;/init-param&gt;&lt;!--这里的server是服务端的IP--&gt;<br />        &lt;init-param&gt;<br />            &lt;param-name&gt;edu.yale.its.tp.cas.client.filter.validateUrl&lt;/param-name&gt;<br />            &lt;param-value&gt;https://serName:8443/cas/proxyValidate&lt;/param-value&gt;<br />        &lt;/init-param&gt;&lt;!--这里的serName是服务端的主机名，而且必须是--&gt;<br />        &lt;init-param&gt;<br />          &lt;param-name&gt;edu.yale.its.tp.cas.client.filter.serverName&lt;/param-name&gt;<br />          &lt;param-value&gt;client:port&lt;/param-value&gt;&lt;!--client:port就是需要CAS需要拦截的地址和端口，一般就是这个TOMCAT所启动的IP和port--&gt;<br />        &lt;/init-param&gt;<br />    &lt;/filter&gt;<br />    <br />    &lt;filter-mapping&gt;<br />        &lt;filter-name&gt;CASFilter&lt;/filter-name&gt;<br />        &lt;url-pattern&gt;/servlet/*&lt;/url-pattern&gt;&lt;!--这里的设置是针对servlets-examples的，针对jsp-examples设置为/*--&gt;<br />    &lt;/filter-mapping&gt;<br /><br />2 测试<br />重启Tomcat，定位到servlets-examples，执行任何一个例子都会被重定向到CAS登陆页；再定位到jsp-examples，也会被重定向到CAS登陆页；此时登陆（默认的认证Handler只要求username=password，可任意选择用户名）；登录后就会进入jsp- examples；继续定位到servlets-examples，执行任何一个例子也不用再输入密码。<br /><br /><br />补充：<br /><br />&amp;#61548; 在多台机器上部署CAS：这些机器必需在同一个域中；服务器端生成证书，客户端导入证书（操作见上）。<br /><br />&amp;#61548; PHP客户端：使用esup-phpcas客户端，验证部分php代码如下：<br />// import phpCAS lib<br />include_once('CAS/CAS.php');<br />// initialize phpCAS<br />phpCAS::client(CAS_VERSION_2_0,'freeserver.test-toodou.com',8443,'/cas');<br />// force CAS authentication<br />phpCAS::forceAuthentication();<br />// at this step, the user has been authenticated by the CAS server<br />// and the user's login name can be read with phpCAS::getUser().<br /><br />// logout if desired<br />if (isset($_REQUEST['logout'])) {<br />phpCAS::logout();<br />}<br />登录结束后，CAS服务器会自动重定向回本页面。<br /><br />&amp;#61548; CAS服务器与数据库连接：实际环境中我们需要到数据库验证用户有效性，在CAS中配置JDBC连接。<br /><br />首先，我们需要创建自己的数据库验证器，当然也可以使用Jasig提供的cas-server-jdbc.jar，这里我们修改了cas-server- jdbc的源码满足自己的需要。并把mysql的jdbc驱动和修改后的jar部署到CAS%/WEB_INF/lib/。<br /><br />修改 %CAS%/WEB_INF/deployerConfigContext..xml，其中关于验证器的一段如下：<br />………………………………..<br />&lt;bean class="org.jasig.cas.adaptors.jdbc.QueryDatabaseAuthenticationHandler"&gt;<br />                            &lt;property name="sql" value="select psw from user where username=?" /&gt;<br />                            &lt;property name="dataSource" ref="dataSource" /&gt;<br />                        &lt;/bean&gt;<br />                    &lt;/list&gt;<br />                &lt;/property&gt;<br />        &lt;/bean&gt;<br /><br />        &lt;bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource" destroy-method="close"&gt;<br />                &lt;property name="driverClassName"&gt;&lt;value&gt;com.mysql.jdbc.Driver&lt;/value&gt;&lt;/property&gt;<br />                &lt;property name="url"&gt;&lt;value&gt;jdbc:mysql://192.168.1.246:3306/toodou&lt;/value&gt;&lt;/property&gt;<br />                &lt;property name="username"&gt;&lt;value&gt;username&lt;/value&gt;&lt;/property&gt;<br />                &lt;property name="password"&gt;&lt;value&gt;********&lt;/value&gt;&lt;/property&gt;<br />        &lt;/bean&gt;<br />&amp;#61548; Jmeter测试：根据目前土豆网的登录流量，我们使用Jmeter对CAS处理性能进行测试，以每分钟20人次登录计，得到平均处理时间为21ms，几次测试中遇到的最长处理时间也仅为78ms。<br />但当登录人次达到500/min时，会出现明显的性能下降，部分登录请求的处理时间会超过3000ms。</span>
		</span>
<img src ="http://www.blogjava.net/grantbb/aggbug/55559.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/grantbb/" target="_blank">我不是张嘎－小兵</a> 2006-06-28 16:19 <a href="http://www.blogjava.net/grantbb/archive/2006/06/28/55559.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>ICTCLAS.dll做网页内容分词的问题</title><link>http://www.blogjava.net/grantbb/archive/2006/05/11/45648.html</link><dc:creator>我不是张嘎－小兵</dc:creator><author>我不是张嘎－小兵</author><pubDate>Thu, 11 May 2006 05:42:00 GMT</pubDate><guid>http://www.blogjava.net/grantbb/archive/2006/05/11/45648.html</guid><wfw:comment>http://www.blogjava.net/grantbb/comments/45648.html</wfw:comment><comments>http://www.blogjava.net/grantbb/archive/2006/05/11/45648.html#Feedback</comments><slash:comments>9</slash:comments><wfw:commentRss>http://www.blogjava.net/grantbb/comments/commentRss/45648.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/grantbb/services/trackbacks/45648.html</trackback:ping><description><![CDATA[我在使用ICTCLAS.dll做网页内容分词的时候，出现一下异常<br />An unexpected exception has been detected in native code outside the VM.<br />Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x18473252<br />Function=Ordinal5+0x3252<br />Library=D:\workspace3\Lucene_191\ICTCLAS.dll<br /><br />Current Java thread:<br />at com.xjt.nlp.word.ICTCLAS.paragraphProcess(Native Method)<br />- locked &lt;0x1003db78&gt; (a com.xjt.nlp.word.ICTCLAS)<br />at org.apache.lucene.analysis.cn.TjuChineseAnalyzer.tokenStream(TjuChineseAnalyzer.java:59)<br />at org.apache.lucene.index.DocumentWriter.invertDocument(DocumentWriter.java:162)<br />at org.apache.lucene.index.DocumentWriter.addDocument(DocumentWriter.java:93)<br />at org.apache.lucene.index.IndexWriter.addDocument(IndexWriter.java:450)<br />at org.apache.lucene.index.IndexWriter.addDocument(IndexWriter.java:436)<br />at ch14.performance.index.IndexPerformanceTest.addDocument(IndexPerformanceTest.java:192)<br />at ch14.performance.index.IndexPerformanceTest.indexFiles(IndexPerformanceTest.java:214)<br />at ch14.performance.index.IndexPerformanceTest.indexFiles(IndexPerformanceTest.java:207)<br />at ch14.performance.index.IndexPerformanceTest.indexFiles(IndexPerformanceTest.java:207)<br />at ch14.performance.index.IndexPerformanceTest.toIndex(IndexPerformanceTest.java:141)<br />at ch14.performance.index.IndexPerformanceTest.toIndex(IndexPerformanceTest.java:127)<br />at ch14.performance.index.IndexPerformanceTest.main(IndexPerformanceTest.java:228)<br /><br />Dynamic libraries:<br />0x00400000 - 0x00407000 C:\j2sdk1.4.2_03\bin\javaw.exe<br />0x77F80000 - 0x77FFC000 C:\WINNT\system32\ntdll.dll<br />0x796D0000 - 0x79735000 C:\WINNT\system32\ADVAPI32.dll<br />0x77E60000 - 0x77F32000 C:\WINNT\system32\KERNEL32.dll<br />0x786F0000 - 0x78768000 C:\WINNT\system32\RPCRT4.dll<br />0x77DF0000 - 0x77E59000 C:\WINNT\system32\USER32.dll<br />0x77F40000 - 0x77F7C000 C:\WINNT\system32\GDI32.dll<br />0x78000000 - 0x78045000 C:\WINNT\system32\MSVCRT.dll<br />0x75E00000 - 0x75E1A000 C:\WINNT\system32\IMM32.DLL<br />0x6C330000 - 0x6C338000 C:\WINNT\system32\LPK.DLL<br />0x65D20000 - 0x65D74000 C:\WINNT\system32\USP10.dll<br />0x08000000 - 0x08138000 C:\j2sdk1.4.2_03\jre\bin\client\jvm.dll<br />0x77530000 - 0x77560000 C:\WINNT\system32\WINMM.dll<br />0x6BD00000 - 0x6BD0D000 C:\WINNT\system32\SYNCOR11.DLL<br />0x10000000 - 0x10007000 C:\j2sdk1.4.2_03\jre\bin\hpi.dll<br />0x007F0000 - 0x007FE000 C:\j2sdk1.4.2_03\jre\bin\verify.dll<br />0x00800000 - 0x00819000 C:\j2sdk1.4.2_03\jre\bin\java.dll<br />0x00820000 - 0x0082D000 C:\j2sdk1.4.2_03\jre\bin\zip.dll<br />0x18470000 - 0x1853F000 D:\workspace3\Lucene_191\ICTCLAS.dll<br />0x777C0000 - 0x777DE000 C:\WINNT\system32\WINSPOOL.DRV<br />0x79B20000 - 0x79B31000 C:\WINNT\system32\MPR.DLL<br />0x71710000 - 0x71794000 C:\WINNT\system32\COMCTL32.dll<br />0x77900000 - 0x77923000 C:\WINNT\system32\imagehlp.dll<br />0x72960000 - 0x7298D000 C:\WINNT\system32\DBGHELP.dll<br />0x687E0000 - 0x687EB000 C:\WINNT\system32\PSAPI.DLL<br /><br />Heap at VM Abort:<br />Heap<br />def new generation total 576K, used 429K [0x10010000, 0x100b0000, 0x104f0000)<br />eden space 512K, 74% used [0x10010000, 0x1006f0f8, 0x10090000)<br />from space 64K, 77% used [0x100a0000, 0x100ac5e0, 0x100b0000)<br />to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000)<br />tenured generation total 1408K, used 128K [0x104f0000, 0x10650000, 0x14010000)<br />the space 1408K, 9% used [0x104f0000, 0x105103e8, 0x10510400, 0x10650000)<br />compacting perm gen total 4096K, used 1782K [0x14010000, 0x14410000, 0x18010000)<br />the space 4096K, 43% used [0x14010000, 0x141cd860, 0x141cda00, 0x14410000)<br /><br />Local Time = Wed May 10 19:19:16 2006<br />Elapsed Time = 8<br />#<br /># The exception above was detected in native code outside the VM<br />#<br /># Java VM: Java HotSpot(TM) Client VM (1.4.2_03-b02 mixed mode)<br />#<br /># An error report file has been saved as hs_err_pid2120.log.<br /># Please refer to the file for further information.<br />#<br /><br />不知作者或者其他朋友有没有遇到，网上也有人遇到这种情况。<br /><br />这个问题很好。。。<br />这个问题是中科院分词工具的BUG<br /><br />举个例子，如果你用这个分词工具分下面的词，就一定会报错<br /><br />“5/”<br />“6/”<br /><br />类似于这样一个数字加一个“/”就会有问题。由于DLL抛出的异常是无法被JVM捕获的，因此JVM就被强行停了下来。。<br /><br />建议是在进行分词前要对句子进行预处理，如<br />1）全角到半角的替换<br />2）去除多余的空格<br />3）一次分词的句子不要太长<br />4）特殊符号的转换<br /><br /><br />不过在新版本的分词工具中，好像这样的BUG已经被改进了。<br />我手上有一个师弟做的JAVA版的仿中科院分词工具，而且把词库也进行了翻译，可以使用TXT文件做词库，并且能添加新词。希望有机会也能拿出来和朋友分享：）这位师弟和我说他打算把这个放到SOURCEFORGE上，到时候大家可以下载了：）<br /><br />如果可能，我也想在我的下一本新的Lucene的书中放上，呵呵。当然得先问问他的意见，哈哈<br /><img src ="http://www.blogjava.net/grantbb/aggbug/45648.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/grantbb/" target="_blank">我不是张嘎－小兵</a> 2006-05-11 13:42 <a href="http://www.blogjava.net/grantbb/archive/2006/05/11/45648.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>[原创]Spring灵活配置</title><link>http://www.blogjava.net/grantbb/archive/2006/05/10/45412.html</link><dc:creator>我不是张嘎－小兵</dc:creator><author>我不是张嘎－小兵</author><pubDate>Wed, 10 May 2006 03:55:00 GMT</pubDate><guid>http://www.blogjava.net/grantbb/archive/2006/05/10/45412.html</guid><wfw:comment>http://www.blogjava.net/grantbb/comments/45412.html</wfw:comment><comments>http://www.blogjava.net/grantbb/archive/2006/05/10/45412.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.blogjava.net/grantbb/comments/commentRss/45412.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/grantbb/services/trackbacks/45412.html</trackback:ping><description><![CDATA[
		<p>1.原来在我开发的项目中由于是多人协作开发，所以我会把Spring的配置文件按人分成多个。然后不论是单元测试还是通过web集成测试，都会把所有的文件装载进来。 </p>
		<p>单元测试的时候（或者其他不通过ｗｅｂ装载的情况），使用DefaultBeanFactory类和beanRefFactory.xml配置文件<br />有的时候单元测试相关的类很少的时候，我会单独写一个bean的配置文件，进行单元测试。<br />web集成测试的时候直接在web.xml中配置<br />&lt;context-param&gt;<br />  &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt;<br />  &lt;param-value&gt;<br />   /WEB-INF/classes/WebApplicationContext.xml<br />   /WEB-INF/classes/HibernateContext.xml<br />   /WEB-INF/classes/WebApplicationContext_C.xml<br />.......<br />  &lt;/param-value&gt;<br /> &lt;/context-param&gt; </p>
		<p>2.通过观察jpetstore项目，它的配置文件是按照web/service/dao这样的层次进行划分。<br />对于一些web services接口也会有专门的配置文件。<br />这样的话结构就会非常的清晰，所以在项目稳定，进入维护期的时候，可以把配置文件按照业务逻辑的层次进行划分。 </p>
		<p>3.为了能够灵活配置，例如向一些数据库连接的配置，因为大部分情况都是本地、测试服务器、正式服务器的配置是不同的，所以一般会通过写一个jdbc.properties，在属性文件中进行配置。 </p>
		<p>4.在同时加在多个spring的配置文件的时候，也是有好多灵活的方法，这方面spring做的真强。上面说了两种，还可以在applicationContext.xml文件中&lt;beans&gt;标签的后面，紧接着加入：<br />&lt;import resource="dataAccessContext-local.xml"/&gt;这样的导入资源的语句。然后不同的环境可以使用不同的配置，不过这还需要每次都修改applicationContext.xml文件。该方法不如直接在web.xml中配置多个方便，但是也不是绝对。 </p>
		<p>5.最后还有一种更加方便的方法，可以不用修改applicationContext.xml文件，然后就能够自动装载相关的配置文件。<br />首先，写一个类：<br />package com.xiebing.spring.util; </p>
		<p>import java.net.InetAddress; </p>
		<p>import org.springframework.web.context.support.XmlWebApplicationContext; </p>
		<p>/** <br /> * TODO file description * <br /> *<br /> * @author bing.xie <br /> *<br /> * @version 1.0, 2006-5-10  create<br /> */<br />/**<br /> * @author bing.xie<br /> * 2006-5-10<br /> */<br />public class PerHostXmlWebApplicationContext extends XmlWebApplicationContext {<br /> protected String[] getDefaultConfigLocations(){<br />  String hostname = "localhost";<br />  <br />  try{<br />   hostname = InetAddress.getLocalHost().getHostName();<br />  }catch(Exception e){<br />   <br />  }<br />  String perHostConfiguration = DEFAULT_CONFIG_LOCATION_PREFIX<br />      + "applicationContext-"<br />      + hostname<br />      + DEFAULT_CONFIG_LOCATION_SUFFIX;<br />  if(getNamespace() != null){<br />   return new String[]{<br />     DEFAULT_CONFIG_LOCATION_PREFIX<br />     + this.getNamespace()<br />     + DEFAULT_CONFIG_LOCATION_SUFFIX<br />     ,perHostConfiguration};<br />  }else{<br />   return new String[]{<br />    DEFAULT_CONFIG_LOCATION,perHostConfiguration};<br />  }<br /> }<br />} </p>
		<p>这种主要是通过动态的获取主机名来动态配置的。所以对于不同的环境使用applicationContext-[hostname].xml就可以封装变化了。当然了，也可以不用hostname（如果发现其他方便的方式） </p>
		<p>接下来，就是在web.xml中增加配置： </p>
		<p>&lt;context-param&gt;<br />  &lt;param-name&gt;contextClass&lt;/param-name&gt;<br />  &lt;param-value&gt;com.xiebing.spring.util.PerHostXmlWebApplicationContext&lt;/param-value&gt;<br /> &lt;/context-param&gt; </p>
		<p>这种方法就是要求在不同的环境下有不同的applicationContext-[hostname].xml文件<br /><br /></p>
<img src ="http://www.blogjava.net/grantbb/aggbug/45412.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/grantbb/" target="_blank">我不是张嘎－小兵</a> 2006-05-10 11:55 <a href="http://www.blogjava.net/grantbb/archive/2006/05/10/45412.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Lucene 1.9 改进特性列表</title><link>http://www.blogjava.net/grantbb/archive/2006/04/30/44183.html</link><dc:creator>我不是张嘎－小兵</dc:creator><author>我不是张嘎－小兵</author><pubDate>Sun, 30 Apr 2006 05:51:00 GMT</pubDate><guid>http://www.blogjava.net/grantbb/archive/2006/04/30/44183.html</guid><wfw:comment>http://www.blogjava.net/grantbb/comments/44183.html</wfw:comment><comments>http://www.blogjava.net/grantbb/archive/2006/04/30/44183.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/grantbb/comments/commentRss/44183.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/grantbb/services/trackbacks/44183.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: Lucene 1.9 改进特性列表						1.9 RC1 		注：lucene2.0发布版本并不是100%的和1.4.3版兼容。也就是说在你用2.0版本的Lucene开发包替换原来的1.4.3版本时，应该让你的应用程序首先和1.9的兼容。		使用前提： 		 1. 编译和使用Lucene需要  Java1.4 或以上版本。 		Lucene 1.9 在运行时的变化： ...&nbsp;&nbsp;<a href='http://www.blogjava.net/grantbb/archive/2006/04/30/44183.html'>阅读全文</a><img src ="http://www.blogjava.net/grantbb/aggbug/44183.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/grantbb/" target="_blank">我不是张嘎－小兵</a> 2006-04-30 13:51 <a href="http://www.blogjava.net/grantbb/archive/2006/04/30/44183.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>BEA UserGroup极限编程总结</title><link>http://www.blogjava.net/grantbb/archive/2006/04/25/42948.html</link><dc:creator>我不是张嘎－小兵</dc:creator><author>我不是张嘎－小兵</author><pubDate>Tue, 25 Apr 2006 02:06:00 GMT</pubDate><guid>http://www.blogjava.net/grantbb/archive/2006/04/25/42948.html</guid><wfw:comment>http://www.blogjava.net/grantbb/comments/42948.html</wfw:comment><comments>http://www.blogjava.net/grantbb/archive/2006/04/25/42948.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/grantbb/comments/commentRss/42948.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/grantbb/services/trackbacks/42948.html</trackback:ping><description><![CDATA[
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<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>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US">ThoughtWorks</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">敏捷的核心：是一种理念、方法论、技巧</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">项目：确定目标</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">迭代：核实目标</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">日常：走向目标</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US"> <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /?><o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">团队内一定要有一致的认识，做法（打通关节、人员调整、进行培训），开发环境（房间、硬件、人员布置）</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span style="COLOR: red; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">不断观察，定期总结流程的缺点，不断改进完善，使之适合团队</span>
				<span lang="EN-US" style="COLOR: red">
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US"> <o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">关于<span style="COLOR: red">环境</span>（无挡板、光线明亮、带轮子的椅子、无线鼠或者键盘、大桌子、圈坐）</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US"> <o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">迭代：一个</span>
				<span lang="EN-US">story</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>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">项目大的时候需要专门的迭代经理，对内负责</span>
				<span lang="EN-US">checking</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">（<span style="COLOR: red">迭代报告</span>），对外交流汇报（功能演示）</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US"> <o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<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 style="COLOR: red">从项目的第一天就开始做起</span></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"> 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"> 4</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">）频繁发布，自动测试</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US"> <o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">测试驱动开发：</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 style="COLOR: red">永远都要先写测试</span>（先定义接口，然后再写单元测试）</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"> 4</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">）避免缺陷重现</span>
				<span lang="EN-US"> 5</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">）监督开发</span>
				<span lang="EN-US"> 6</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">）不仅仅是单元测试</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US"> <o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span style="COLOR: red; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">考虑用</span>
				<span lang="EN-US" style="COLOR: red">wiki</span>
				<span style="COLOR: red; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">管理文档，方便迭代</span>
				<span lang="EN-US" style="COLOR: red">
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US" style="COLOR: red"> <o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">实施</span>
				<span lang="EN-US">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">10</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">人，</span>
				<span lang="EN-US">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">10</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">人最合适</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US"> <o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US" style="COLOR: #ff6600">web</span>
				<span style="COLOR: #ff6600; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">测试的工具：</span>
				<span lang="EN-US" style="COLOR: #ff6600">salenium jwebunit junit (Fit jwebfit watir)<o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US"> <o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">阿里巴巴：</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 style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">陈日俊（落叶夏日）</span>
				<span lang="EN-US">
						<br />
				</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">LoadRunner</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">是开发人员玩的</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US"> <o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span style="COLOR: #ff6600; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">使用</span>
				<span lang="EN-US" style="COLOR: #ff6600">JProfile</span>
				<span style="COLOR: #ff6600; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">测试性能</span>
				<span lang="EN-US" style="COLOR: #ff6600">
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span style="COLOR: #ff6600; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">优先级考虑的是数据库调优（</span>
				<span lang="EN-US" style="COLOR: #ff6600">index</span>
				<span style="COLOR: #ff6600; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">），最后考虑算法调优</span>
				<span lang="EN-US" style="COLOR: #ff6600">
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US" style="COLOR: #ff6600">Resin</span>
				<span style="COLOR: #ff6600; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">研究使用，性能更好</span>
				<span lang="EN-US" style="COLOR: #ff6600">
						<o:p>
						</o:p>
				</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US"> <o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US">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"> 3</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">）数据量分析</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US"> <o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l0 level1 lfo1; tab-stops: list 18.0pt">
				<span lang="EN-US">1、<span style="FONT: 7pt 'Times New Roman'">  </span></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 18pt; TEXT-INDENT: -18pt; mso-list: l0 level1 lfo1; tab-stops: list 18.0pt">
				<span lang="EN-US">2、<span style="FONT: 7pt 'Times New Roman'">  </span></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 18pt; TEXT-INDENT: -18pt; mso-list: l0 level1 lfo1; tab-stops: list 18.0pt">
				<span lang="EN-US">3、<span style="FONT: 7pt 'Times New Roman'">  </span></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 18pt; TEXT-INDENT: -18pt; mso-list: l0 level1 lfo1; tab-stops: list 18.0pt">
				<span lang="EN-US">4、<span style="FONT: 7pt 'Times New Roman'">  </span></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 18pt; TEXT-INDENT: -18pt; mso-list: l0 level1 lfo1; tab-stops: list 18.0pt">
				<span lang="EN-US">5、<span style="FONT: 7pt 'Times New Roman'">  </span></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 18pt; TEXT-INDENT: -18pt; mso-list: l0 level1 lfo1; tab-stops: list 18.0pt">
				<span lang="EN-US">6、<span style="FONT: 7pt 'Times New Roman'">  </span></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 18pt; TEXT-INDENT: -18pt; mso-list: l0 level1 lfo1; tab-stops: list 18.0pt">
				<span lang="EN-US">7、<span style="FONT: 7pt 'Times New Roman'">  </span></span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">用户行为分析</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US"> <o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">红工厂</span>
				<span lang="EN-US"> JDO</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">专家组成员</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">黄海波</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">一个</span>
				<span lang="EN-US">Xper</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的心路历程</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US"> <o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">上班玩游戏，爽！――培养</span>
				<span lang="EN-US">TeamWork</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">40</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">岁的程序员，活到老，编到老，知道的多，平等，平和，可以良好的沟通</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US"> <o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">真正的</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>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US"> <o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">只有<b style="mso-bidi-font-weight: normal"><span style="COLOR: #ff6600">沟通</span></b>不够的项目，没有沟通过度的项目</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US"> <o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<b style="mso-bidi-font-weight: normal">
						<span style="COLOR: #ff6600; 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>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US"> <o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">以人为本：每个开发人员都能充分参与到软件开发中，都以每一行代码为己任，做到我为人人，人人为我。</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US"> <o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">最高境界：以人为本，而不是以流程为本</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<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>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<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"> 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"> 4</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">）主动沟通</span>
				<span lang="EN-US">5</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">）杜绝懒惰</span>
				<span lang="EN-US"> 6</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">）反省自己的开发流程</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">在</span>
				<span lang="EN-US">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">google</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US"> <o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US">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" style="COLOR: #ff6600">3</span>
				<span style="COLOR: #ff6600; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">）一个人的价值不在于知道多少，在于能知道多少</span>
				<span lang="EN-US"> 4</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">）永远测试先行</span>
				<span lang="EN-US"> 5</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"><span style="COLOR: #ff6600">不要吝啬问题</span></b></span>
				<span lang="EN-US"> 6</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">）尽可能得让别人知道自己在做什么</span>
				<span lang="EN-US"> 7</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">）不要重复代码</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US"> <o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US">XP</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"><span style="COLOR: #ff6600">惰性－永远都不要</span></b>、<b style="mso-bidi-font-weight: normal"><span style="COLOR: #ff6600">自尊－知道什么时候应该放下</span></b>）</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US"> <o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US">Xper</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">＝合格的程序员</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">对于</span>
				<span lang="EN-US">XP</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">团队，招聘的时候对性格也是有一些要求</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">说白了：</span>
				<span lang="EN-US">XP</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">是一种更加剥削的方式</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span lang="EN-US"> <o:p></o:p></span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">但是对个人成长和对公司发展都是有利的，只能说可能对公司的益处更加明显。</span>
		</p>
		<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt">
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">如果我是老板我一定会选择</span>
				<span lang="EN-US">XP</span>
				<span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，</span>
		</p>
		<span style="FONT-SIZE: 10.5pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt; mso-font-kerning: 1.0pt; mso-bidi-font-family: 'Times New Roman'; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">如果碰到实施</span>
		<span lang="EN-US" style="FONT-SIZE: 10.5pt; FONT-FAMILY: 'Times New Roman'; mso-bidi-font-size: 12.0pt; mso-fareast-font-family: 宋体; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">XP</span>
		<span style="FONT-SIZE: 10.5pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt; mso-font-kerning: 1.0pt; mso-bidi-font-family: 'Times New Roman'; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">的老板，那么就努力跟老板学习，尽快让自己也成为老板。<br /><br />顺便推荐两篇文章：<br /><span class="h1b"><font size="3"><a class="" title="" href="http://dev2dev.bea.com.cn/bbsdoc/2006040419241.html" target="">极限编程（XP）发布工具</a><br /><span class="h1b"><a class="" title="" href="http://dev2dev.bea.com.cn/bbsdoc/20060411232.html" target="">Step by Step CruiseControl入门</a></span></font></span></span>
<img src ="http://www.blogjava.net/grantbb/aggbug/42948.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/grantbb/" target="_blank">我不是张嘎－小兵</a> 2006-04-25 10:06 <a href="http://www.blogjava.net/grantbb/archive/2006/04/25/42948.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Java代码质量检查工具</title><link>http://www.blogjava.net/grantbb/archive/2006/03/19/36081.html</link><dc:creator>我不是张嘎－小兵</dc:creator><author>我不是张嘎－小兵</author><pubDate>Sun, 19 Mar 2006 09:12:00 GMT</pubDate><guid>http://www.blogjava.net/grantbb/archive/2006/03/19/36081.html</guid><wfw:comment>http://www.blogjava.net/grantbb/comments/36081.html</wfw:comment><comments>http://www.blogjava.net/grantbb/archive/2006/03/19/36081.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/grantbb/comments/commentRss/36081.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/grantbb/services/trackbacks/36081.html</trackback:ping><description><![CDATA[
		<p>findbugs：插件可以提供发现bug的功能。 </p>
		<p>jupiter：插件是一个提供个人或者小组的代码review的Eclipse插件 </p>
		<p>checkstyle：插件可以检查代码是否标准，是否存在一些常见错误的功能。 </p>
		<p>together：还有一个代码审查和检验的功能。 <br /><br />有了以上的工具，在进行代码review的工作中会方便很多。</p>
<img src ="http://www.blogjava.net/grantbb/aggbug/36081.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/grantbb/" target="_blank">我不是张嘎－小兵</a> 2006-03-19 17:12 <a href="http://www.blogjava.net/grantbb/archive/2006/03/19/36081.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Java项目常用测试工具</title><link>http://www.blogjava.net/grantbb/archive/2006/03/19/36080.html</link><dc:creator>我不是张嘎－小兵</dc:creator><author>我不是张嘎－小兵</author><pubDate>Sun, 19 Mar 2006 09:11:00 GMT</pubDate><guid>http://www.blogjava.net/grantbb/archive/2006/03/19/36080.html</guid><wfw:comment>http://www.blogjava.net/grantbb/comments/36080.html</wfw:comment><comments>http://www.blogjava.net/grantbb/archive/2006/03/19/36080.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/grantbb/comments/commentRss/36080.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/grantbb/services/trackbacks/36080.html</trackback:ping><description><![CDATA[
		<p>jwebunit和httpunit用于集成测试web的功能。 </p>
		<p>jwebunit是对httpunit的进一步包装，使用起来更加简单。</p>
		<p>Cactus主要是测试服务器端的组件的工具。可以测试：Servlets, EJBs, Tag Libs, Filters等 </p>
		<p>以上三者都是在junit基础之上开发的。 </p>
		<p>jmeter是一个纯java的压力测试工具。 </p>
		<p>StrutsTestCase专门用来测试struts应用程序的。</p>
		<p>junitperf可以为JUnit增加一层测试负载和性能的包装。 </p>
		<p>eclipse.plugins.profiler该插件为Eclipse提供了性能测试的功能。 </p>
<img src ="http://www.blogjava.net/grantbb/aggbug/36080.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/grantbb/" target="_blank">我不是张嘎－小兵</a> 2006-03-19 17:11 <a href="http://www.blogjava.net/grantbb/archive/2006/03/19/36080.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>说说嵌入式数据库</title><link>http://www.blogjava.net/grantbb/archive/2006/03/14/35285.html</link><dc:creator>我不是张嘎－小兵</dc:creator><author>我不是张嘎－小兵</author><pubDate>Tue, 14 Mar 2006 12:23:00 GMT</pubDate><guid>http://www.blogjava.net/grantbb/archive/2006/03/14/35285.html</guid><wfw:comment>http://www.blogjava.net/grantbb/comments/35285.html</wfw:comment><comments>http://www.blogjava.net/grantbb/archive/2006/03/14/35285.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.blogjava.net/grantbb/comments/commentRss/35285.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/grantbb/services/trackbacks/35285.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'">最有名的<A name=OLE_LINK1>嵌入式数据库</A>：</SPAN><SPAN lang=EN-US>Berkeley DB 4.4 </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>&nbsp;<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US>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>Firebird</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>&nbsp;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><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>HSQLDB</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">和</SPAN><SPAN lang=EN-US>Apache-Derby</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US>&nbsp;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">嵌入式数据库的优点：</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><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></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><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></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">没有进程间通讯，</SPAN><SPAN lang=EN-US>TCP/IP</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>3</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>4</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>5</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">、</SPAN><SPAN lang=EN-US>HSQLDB</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">和</SPAN><SPAN lang=EN-US>Apache Derby</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">都支持标准的</SPAN><SPAN lang=EN-US>SQL92</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，促使写出兼容性更好的</SPAN><SPAN lang=EN-US>SQL</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US>&nbsp;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">下载地址：</SPAN><SPAN lang=EN-US><A href="http://db.apache.org/derby/derby_downloads.html">http://db.apache.org/derby/derby_downloads.html</A></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US>&nbsp;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">推荐几篇文章：</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><B><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Arial"><A href="http://www.ibm.com/developerworks/cn/db2/library/techarticles/dm-0501roux/"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial">在</SPAN> Eclipse <SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial">中开发</SPAN> Apache Derby <SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial">应用程序</SPAN></A><o:p></o:p></SPAN></B></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><B><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Arial"><A href="http://www.ibm.com/developerworks/cn/db2/library/techarticles/dm-0510cline/"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial">基于</SPAN> Eclipse <SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial">的</SPAN> Apache Derby <SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial">工具</SPAN></A><o:p></o:p></SPAN></B></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><B><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Arial"><A href="http://www.ibm.com/developerworks/cn/db2/library/techarticles/dm-0509bradbury/"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial">在</SPAN> J2EE <SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial">服务器环境中使用</SPAN> Derby</A><o:p></o:p></SPAN></B></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><B><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Arial"><A href="http://www.ibm.com/developerworks/cn/db2/library/techarticles/dm-0509cline/"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial">用</SPAN> Eclipse<SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial">、</SPAN>WTP <SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial">和</SPAN> Derby <SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial">构建</SPAN> Web <SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial">应用程序</SPAN></A><o:p></o:p></SPAN></B></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><B><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Arial"><A href="http://www.ibm.com/developerworks/cn/db2/library/techarticles/dm-0412snell/"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial">用</SPAN> Apache Ant <SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial">进行</SPAN> Derby <SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial">数据库开发</SPAN></A></SPAN></B></P><img src ="http://www.blogjava.net/grantbb/aggbug/35285.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/grantbb/" target="_blank">我不是张嘎－小兵</a> 2006-03-14 20:23 <a href="http://www.blogjava.net/grantbb/archive/2006/03/14/35285.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>读Joel_给计算机系学生的建议_有感</title><link>http://www.blogjava.net/grantbb/archive/2006/02/28/32787.html</link><dc:creator>我不是张嘎－小兵</dc:creator><author>我不是张嘎－小兵</author><pubDate>Tue, 28 Feb 2006 01:17:00 GMT</pubDate><guid>http://www.blogjava.net/grantbb/archive/2006/02/28/32787.html</guid><wfw:comment>http://www.blogjava.net/grantbb/comments/32787.html</wfw:comment><comments>http://www.blogjava.net/grantbb/archive/2006/02/28/32787.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.blogjava.net/grantbb/comments/commentRss/32787.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/grantbb/services/trackbacks/32787.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 看了Joel的《给计算机系学生的建议》这篇文章,觉得讲的还是比较精辟的.Joel正好也是我刚听到的名字.因为最近一本热门的图书《Joel说软件》,手边就有这本书,大家的评价很高.我也正在看.&nbsp;Joel对于计算机系的学生给出了七条建议:1.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 毕业前学会写作2.&nbsp;&nbsp;&nbsp;&nbs...&nbsp;&nbsp;<a href='http://www.blogjava.net/grantbb/archive/2006/02/28/32787.html'>阅读全文</a><img src ="http://www.blogjava.net/grantbb/aggbug/32787.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/grantbb/" target="_blank">我不是张嘎－小兵</a> 2006-02-28 09:17 <a href="http://www.blogjava.net/grantbb/archive/2006/02/28/32787.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>使用Log4j记录异常的细微之处</title><link>http://www.blogjava.net/grantbb/archive/2006/02/09/30042.html</link><dc:creator>我不是张嘎－小兵</dc:creator><author>我不是张嘎－小兵</author><pubDate>Thu, 09 Feb 2006 07:28:00 GMT</pubDate><guid>http://www.blogjava.net/grantbb/archive/2006/02/09/30042.html</guid><wfw:comment>http://www.blogjava.net/grantbb/comments/30042.html</wfw:comment><comments>http://www.blogjava.net/grantbb/archive/2006/02/09/30042.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/grantbb/comments/commentRss/30042.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/grantbb/services/trackbacks/30042.html</trackback:ping><description><![CDATA[<P>在现在的项目中，使用Log4j进行日志记录，对于异常的记录有点细微的之处需要说明。<BR><BR>对于如下代码：<BR>Exception e2 = new Exception("&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;Test Exception!");<BR>（1）&nbsp;&nbsp;e2.printStackTrace();<BR>（2）&nbsp;&nbsp;logger.info(e2);<BR>（3）&nbsp;&nbsp;logger.info("Exception : ",e2);<BR><BR>说明：<BR>（1）直接在终端打印出来异常。<BR>（2）记录在log4j的日志中，但是只会打印出简单的描述信息，不会打印整个异常堆栈。<BR>（3）可以打印出指定的信息，还有完整的堆栈信息。<BR><BR>所以对于重要的异常处理，使用第三种方式比较好。</P><img src ="http://www.blogjava.net/grantbb/aggbug/30042.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/grantbb/" target="_blank">我不是张嘎－小兵</a> 2006-02-09 15:28 <a href="http://www.blogjava.net/grantbb/archive/2006/02/09/30042.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>DBCP数据库连接池的参数理解</title><link>http://www.blogjava.net/grantbb/archive/2006/01/09/27298.html</link><dc:creator>我不是张嘎－小兵</dc:creator><author>我不是张嘎－小兵</author><pubDate>Mon, 09 Jan 2006 11:03:00 GMT</pubDate><guid>http://www.blogjava.net/grantbb/archive/2006/01/09/27298.html</guid><wfw:comment>http://www.blogjava.net/grantbb/comments/27298.html</wfw:comment><comments>http://www.blogjava.net/grantbb/archive/2006/01/09/27298.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/grantbb/comments/commentRss/27298.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/grantbb/services/trackbacks/27298.html</trackback:ping><description><![CDATA[<P>maxActive<BR>The maximum number of active connections that can be allocated from this pool at the same time, or zero for no limit.<BR>理解：同一时间能够从池中获取的最大的活动链接数。（也就是一个池的最大并发量），为0表示不限制。</P>
<P>maxIdle<BR>The maximum number of active connections that can remain idle in the pool, without extra ones being released, or zero for no limit. <BR>理解：能够在池中保存的处于空闲状态的活动链接的最大数目。前提是没有额外的链接被释放。（也就是说没有他的使用中的链接被释放的情况下，连接池中保存的最大空闲链接数）为0表示不限制。</P>
<P>maxWait<BR>The maximum number of milliseconds that the pool will wait (when there are no available connections) for a connection to be returned before throwing an exception, or -1 to wait indefinitely.<BR>当没有可以使用的数据库链接的时候，连接池将要等待一个链接被返回的最长时间（毫秒），超过这个时间就要抛出异常。－1表示不受限制。</P><img src ="http://www.blogjava.net/grantbb/aggbug/27298.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/grantbb/" target="_blank">我不是张嘎－小兵</a> 2006-01-09 19:03 <a href="http://www.blogjava.net/grantbb/archive/2006/01/09/27298.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Laszlo入门三_简述优缺点</title><link>http://www.blogjava.net/grantbb/archive/2005/12/26/25491.html</link><dc:creator>我不是张嘎－小兵</dc:creator><author>我不是张嘎－小兵</author><pubDate>Mon, 26 Dec 2005 12:31:00 GMT</pubDate><guid>http://www.blogjava.net/grantbb/archive/2005/12/26/25491.html</guid><wfw:comment>http://www.blogjava.net/grantbb/comments/25491.html</wfw:comment><comments>http://www.blogjava.net/grantbb/archive/2005/12/26/25491.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.blogjava.net/grantbb/comments/commentRss/25491.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/grantbb/services/trackbacks/25491.html</trackback:ping><description><![CDATA[<SPAN style="FONT-SIZE: 10.5pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt; mso-bidi-font-family: 'Times New Roman'; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><STRONG><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Tahoma; mso-hansi-font-family: Tahoma; mso-bidi-font-family: Tahoma">优点</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Tahoma">:<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></STRONG></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l2 level1 lfo4; tab-stops: list 18.0pt"><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Tahoma">1.<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Tahoma; mso-hansi-font-family: Tahoma; mso-bidi-font-family: Tahoma">交互能力强</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Tahoma">,</SPAN><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Tahoma; mso-hansi-font-family: Tahoma; mso-bidi-font-family: Tahoma">完全可能超过</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Tahoma">C/S</SPAN><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Tahoma; mso-hansi-font-family: Tahoma; mso-bidi-font-family: Tahoma">结构的表现</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Tahoma"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l2 level1 lfo4; tab-stops: list 18.0pt"><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Tahoma">2.<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Tahoma; mso-hansi-font-family: Tahoma; mso-bidi-font-family: Tahoma">兼容性高</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Tahoma">,</SPAN><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Tahoma; mso-hansi-font-family: Tahoma; mso-bidi-font-family: Tahoma">几乎所有的浏览器都装有</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Tahoma">flash</SPAN><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Tahoma; mso-hansi-font-family: Tahoma; mso-bidi-font-family: Tahoma">插件</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Tahoma"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l2 level1 lfo4; tab-stops: list 18.0pt"><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Tahoma">3.<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Tahoma; mso-hansi-font-family: Tahoma; mso-bidi-font-family: Tahoma">与</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Tahoma">jsp</SPAN><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Tahoma; mso-hansi-font-family: Tahoma; mso-bidi-font-family: Tahoma">和</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Tahoma">servlet</SPAN><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Tahoma; mso-hansi-font-family: Tahoma; mso-bidi-font-family: Tahoma">结合动态产生能力强</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Tahoma"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l2 level1 lfo4; tab-stops: list 18.0pt"><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Tahoma">4.<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Tahoma">Laszlo</SPAN><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Tahoma; mso-hansi-font-family: Tahoma; mso-bidi-font-family: Tahoma">相当于一个</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Tahoma">framework,</SPAN><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Tahoma; mso-hansi-font-family: Tahoma; mso-bidi-font-family: Tahoma">方便在不同的容器间移植</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Tahoma"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l2 level1 lfo4; tab-stops: list 18.0pt"><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Tahoma">5.<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Tahoma; mso-hansi-font-family: Tahoma; mso-bidi-font-family: Tahoma">学习曲线不高</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Tahoma">,XML+JavaScript，做web的很容易上手<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Tahoma">&nbsp;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><STRONG><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Tahoma; mso-hansi-font-family: Tahoma; mso-bidi-font-family: Tahoma">缺点</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Tahoma">:<o:p></o:p></SPAN></STRONG></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l3 level1 lfo5; tab-stops: list 18.0pt"><SPAN class=tpccontent1><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Tahoma; mso-bidi-font-size: 10.0pt">1.<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><SPAN class=tpccontent1><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Verdana">xml</SPAN></SPAN><SPAN class=tpccontent1><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">文件解码并编译为</SPAN></SPAN><SPAN class=tpccontent1><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Verdana">flash</SPAN></SPAN><SPAN class=tpccontent1><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">的代价较大，尽管对编译结果做了</SPAN></SPAN><SPAN class=tpccontent1><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Verdana">cache</SPAN></SPAN><SPAN class=tpccontent1><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">，如果有大量动态部分，仍然需要反复编译，对</SPAN></SPAN><SPAN class=tpccontent1><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Verdana">WEB</SPAN></SPAN><SPAN class=tpccontent1><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">服务器的压力比传统的大出不少</SPAN></SPAN><SPAN class=tpccontent1><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Verdana"><o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l3 level1 lfo5; tab-stops: list 18.0pt"><SPAN class=tpccontent1><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Tahoma">2.<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><SPAN class=tpccontent1><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Verdana">flash</SPAN></SPAN><SPAN class=tpccontent1><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">文件本身体积较大，对网络带宽的要求较高</SPAN></SPAN><SPAN class=tpccontent1><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Tahoma"><o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l3 level1 lfo5; tab-stops: list 18.0pt"><SPAN class=tpccontent1><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Tahoma">3.<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><SPAN class=tpccontent1><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Verdana">flash</SPAN></SPAN><SPAN class=tpccontent1><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">运行时的消耗也大</SPAN></SPAN><SPAN class=tpccontent1><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Verdana">,</SPAN></SPAN><SPAN class=tpccontent1><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">对客户端要求也较高</SPAN></SPAN><SPAN class=tpccontent1><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Verdana">,</SPAN></SPAN><SPAN class=tpccontent1><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">不过现在的机器配置问题不大</SPAN></SPAN><SPAN class=tpccontent1><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Tahoma"><o:p></o:p></SPAN></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l3 level1 lfo5; tab-stops: list 18.0pt"><SPAN class=tpccontent1><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Tahoma">4.<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><SPAN class=tpccontent1><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">现在还不够完善</SPAN></SPAN><SPAN class=tpccontent1><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Verdana">/</SPAN></SPAN><SPAN class=tpccontent1><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">稳定</SPAN></SPAN><SPAN class=tpccontent1><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Verdana">,</SPAN></SPAN><SPAN class=tpccontent1><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">实际应用的比较少</SPAN></SPAN><SPAN class=tpccontent1><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Verdana">.</SPAN></SPAN><SPAN class=tpccontent1><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Tahoma"><o:p></o:p></SPAN></SPAN></P><SPAN class=postbody1><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 'Times New Roman'; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">5.&nbsp; 推荐开发环境需要</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana; mso-bidi-font-family: 'Times New Roman'; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-fareast-font-family: 宋体">1G</SPAN><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 'Times New Roman'; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">内存以上，我用512M内存开发，勉强可以的。<BR><BR>希望有更多的人来补充，发表观点！</SPAN></SPAN></SPAN><img src ="http://www.blogjava.net/grantbb/aggbug/25491.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/grantbb/" target="_blank">我不是张嘎－小兵</a> 2005-12-26 20:31 <a href="http://www.blogjava.net/grantbb/archive/2005/12/26/25491.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Struts中DownloadAction的使用</title><link>http://www.blogjava.net/grantbb/archive/2005/12/23/25244.html</link><dc:creator>我不是张嘎－小兵</dc:creator><author>我不是张嘎－小兵</author><pubDate>Fri, 23 Dec 2005 09:13:00 GMT</pubDate><guid>http://www.blogjava.net/grantbb/archive/2005/12/23/25244.html</guid><wfw:comment>http://www.blogjava.net/grantbb/comments/25244.html</wfw:comment><comments>http://www.blogjava.net/grantbb/archive/2005/12/23/25244.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/grantbb/comments/commentRss/25244.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/grantbb/services/trackbacks/25244.html</trackback:ping><description><![CDATA[1.自从Struts 1.2.6版本，就出现了DownloadAction类，主要就是用于处理web应用的下载。<BR>使用DownloadAction也是很简单的。<BR>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"><BR>2.自定义的</SPAN><SPAN lang=EN-US>Action</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">继承</SPAN><SPAN lang=EN-US>DownloadAction</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">然后实现：</SPAN><SPAN lang=EN-US>getStreamInfo()</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>protected StreamInfo <FONT style="BACKGROUND-COLOR: #ffffff" color=#008000>getStreamInfo</FONT>(ActionMapping mapping, ActionForm form,</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>HttpServletRequest request, HttpServletResponse response)</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">可以覆盖：</SPAN><SPAN lang=EN-US>getBufferSize</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">方法，用于自定义向</SPAN><SPAN lang=EN-US>servlet</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 stream</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">传输数据的缓冲区大小（</SPAN><SPAN lang=EN-US>bytes</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">字节数）。</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US>DownloadAction</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">中有一个内部的接口</SPAN><SPAN lang=EN-US>StreamInfo</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></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US>public static interface StreamInfo {</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>public abstract String getContentType();//</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">得到下载文件的</SPAN><SPAN lang=EN-US>MIME</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><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>public abstract InputStream getInputStream() throws IOException;</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US>}</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">其中</SPAN><SPAN lang=EN-US>DownloadAction</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">提供了两个</SPAN><SPAN lang=EN-US>StreamInfo</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>FileStreamInfo </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>ResourceStreamInfo </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></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">当然，我们自己还可以实现自己特定的类，比如从数据库中取得流的类，或者从</SPAN><SPAN lang=EN-US>FTP</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>&nbsp;<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">下面写一个简单的覆盖</SPAN><SPAN lang=EN-US>getStreamInfo</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>/images/bbg.gif</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>public StreamInfo getStreamInfo(ActionMapping mapping, ActionForm form,</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 63.75pt"><SPAN lang=EN-US>HttpServletRequest request, HttpServletResponse response){</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><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>response.setHeader("Content-disposition",</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>"attachment; filename=" + "bbg2.gif");//</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><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>StreamInfo si = new ResourceStreamInfo("image/gif",this.servlet.getServletContext(),"/images/bbg.gif");</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>return si;</SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US>}</SPAN></P><SPAN style="FONT-SIZE: 10.5pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt; mso-bidi-font-family: 'Times New Roman'; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">使用非常方便，而且能够保持程序一致的结构。原来我开发的系统中下载都是统一使用</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10.5pt; FONT-FAMILY: 'Times New Roman'; 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; mso-fareast-font-family: 宋体">Servlet</SPAN><SPAN style="FONT-SIZE: 10.5pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt; mso-bidi-font-family: 'Times New Roman'; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">的，由于项目中整合了</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10.5pt; FONT-FAMILY: 'Times New Roman'; 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; mso-fareast-font-family: 宋体">Spring,</SPAN><SPAN style="FONT-SIZE: 10.5pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt; mso-bidi-font-family: 'Times New Roman'; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">所以对于</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10.5pt; FONT-FAMILY: 'Times New Roman'; 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; mso-fareast-font-family: 宋体">Servlet</SPAN><SPAN style="FONT-SIZE: 10.5pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt; mso-bidi-font-family: 'Times New Roman'; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">还需要单独的方法来获取相应的服务层的</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10.5pt; FONT-FAMILY: 'Times New Roman'; 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; mso-fareast-font-family: 宋体">Bean</SPAN><SPAN style="FONT-SIZE: 10.5pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt; mso-bidi-font-family: 'Times New Roman'; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">，使用</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10.5pt; FONT-FAMILY: 'Times New Roman'; 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; mso-fareast-font-family: 宋体">DownloadAction</SPAN><SPAN style="FONT-SIZE: 10.5pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt; mso-bidi-font-family: 'Times New Roman'; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">之后，所有的</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10.5pt; FONT-FAMILY: 'Times New Roman'; 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; mso-fareast-font-family: 宋体">Action</SPAN><SPAN style="FONT-SIZE: 10.5pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt; mso-bidi-font-family: 'Times New Roman'; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">都是由</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10.5pt; FONT-FAMILY: 'Times New Roman'; 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; mso-fareast-font-family: 宋体">Spring</SPAN><SPAN style="FONT-SIZE: 10.5pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt; mso-bidi-font-family: 'Times New Roman'; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">进行管理的，非常方便。</SPAN><img src ="http://www.blogjava.net/grantbb/aggbug/25244.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/grantbb/" target="_blank">我不是张嘎－小兵</a> 2005-12-23 17:13 <a href="http://www.blogjava.net/grantbb/archive/2005/12/23/25244.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>在Spring的项目中配置Log4j</title><link>http://www.blogjava.net/grantbb/archive/2005/09/15/13103.html</link><dc:creator>我不是张嘎－小兵</dc:creator><author>我不是张嘎－小兵</author><pubDate>Thu, 15 Sep 2005 09:54:00 GMT</pubDate><guid>http://www.blogjava.net/grantbb/archive/2005/09/15/13103.html</guid><wfw:comment>http://www.blogjava.net/grantbb/comments/13103.html</wfw:comment><comments>http://www.blogjava.net/grantbb/archive/2005/09/15/13103.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.blogjava.net/grantbb/comments/commentRss/13103.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/grantbb/services/trackbacks/13103.html</trackback:ping><description><![CDATA[<P>1.在classpath的根目录下面不放置log4j.properties<BR>在用junit本地测试的时候会提示： </P>
<P><FONT color=red>log4j:WARN No appenders could be found for logger (org.springframework.beans.factory.access.SingletonBeanFactoryLocator).<BR>log4j:WARN Please initialize the log4j system properly.</FONT> </P>
<P><FONT color=black>然后我们是看不到spring加载bean的配置信息的。<BR>在classpath路径下加入：log4j.properties，则能够显示bean的加载信息</FONT> </P>
<P>2. 在web应用中为Spring配置log4j<BR>Spring的做法是使用一个Servlet Listener，在Web Container启动时把ROOT的绝对路径写到系统变量里，这样log4j的配置文件里就可以用${myAppfuse.root}来表示刚刚设进去的系统变量：log4j.appender.logfile.File=${myAppfuse.root}/logs/mylog.log<BR>在Web.xml中配置语句如下：</P>
<P>&lt;!--如果不设，默认为web.root,但最好设置，以免项目间冲突--&gt;<BR>&lt;context-param&gt;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&lt;param-name&gt;webAppRootKey&lt;/param-name&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&lt;param-value&gt;myappfuse.root&lt;/param-value&gt; <BR>&lt;/context-param&gt;<BR>&lt;context-param&gt;&nbsp;&nbsp; <BR>&nbsp;&lt;param-name&gt;log4jConfigLocation&lt;/param-name&gt;&nbsp;&nbsp; <BR>&nbsp;&lt;param-value&gt;/WEB-INF/classes/log4j.properties&lt;/param-value&gt;<BR>&lt;/context-param&gt;<BR>&lt;listener&gt;&nbsp;&nbsp; <BR>&nbsp;&lt;listener-class&gt;org.springframework.web.util.Log4jConfigListener&lt;/listener-class&gt;<BR>&lt;/listener&gt; <BR>这里配置了一个listener，也可以配置servlet:<BR>&lt;servlet&gt;<BR>&nbsp;&nbsp;&lt;servlet-name&gt;log4j&lt;/servlet-name&gt;<BR>&nbsp;&nbsp;&lt;servlet-class&gt;<BR>&nbsp;&nbsp;&nbsp;org.springframework.web.util.Log4jConfigServlet<BR>&nbsp;&nbsp;&lt;/servlet-class&gt;<BR>&nbsp;&nbsp;&lt;load-on-startup&gt;1&lt;/load-on-startup&gt;<BR>&nbsp;&lt;/servlet&gt;<BR>配置好了以后我们就可以在当前应用的logs目录下找到日志记录文件：mylog.log<BR>属性log4jConfigLocation的值建议还是设置为：/WEB-INF/classes/log4j.properties，这样我们在不启动web应用的时候，做一些测试这能够正确地记录日志信息。</P><img src ="http://www.blogjava.net/grantbb/aggbug/13103.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/grantbb/" target="_blank">我不是张嘎－小兵</a> 2005-09-15 17:54 <a href="http://www.blogjava.net/grantbb/archive/2005/09/15/13103.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>使用JK配置Tomcat的中文问题</title><link>http://www.blogjava.net/grantbb/archive/2005/09/07/12317.html</link><dc:creator>我不是张嘎－小兵</dc:creator><author>我不是张嘎－小兵</author><pubDate>Wed, 07 Sep 2005 07:26:00 GMT</pubDate><guid>http://www.blogjava.net/grantbb/archive/2005/09/07/12317.html</guid><wfw:comment>http://www.blogjava.net/grantbb/comments/12317.html</wfw:comment><comments>http://www.blogjava.net/grantbb/archive/2005/09/07/12317.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/grantbb/comments/commentRss/12317.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/grantbb/services/trackbacks/12317.html</trackback:ping><description><![CDATA[<P style="LINE-HEIGHT: 150%"><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: #303030; FONT-FAMILY: Verdana; mso-font-kerning: 1.0pt">JK2</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: #303030; mso-font-kerning: 1.0pt; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana"><FONT face=宋体>流行了短暂的时间现在又要停止更新了，主要原因是没有人感兴趣，使用配置起来太麻烦。</FONT></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: #303030; FONT-FAMILY: Verdana; mso-font-kerning: 1.0pt"><BR></SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: #303030; mso-font-kerning: 1.0pt; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana"><FONT face=宋体>一开始我们的项目使用</FONT></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: #303030; FONT-FAMILY: Verdana; mso-font-kerning: 1.0pt">tomcat4.1.3+Apache2+jk2</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: #303030; mso-font-kerning: 1.0pt; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana"><FONT face=宋体>，但是总是发生链接失败的错误，后果非常严重。然后我们又换了：</FONT></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: #303030; FONT-FAMILY: Verdana; mso-font-kerning: 1.0pt">tomcat4.1.3+Apache2+jk</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: #303030; mso-font-kerning: 1.0pt; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana"><FONT face=宋体>（新版），此时，当</FONT></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: #303030; FONT-FAMILY: Verdana; mso-font-kerning: 1.0pt">get</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: #303030; mso-font-kerning: 1.0pt; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana"><FONT face=宋体>方法的</FONT></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: #303030; FONT-FAMILY: Verdana; mso-font-kerning: 1.0pt">url</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: #303030; mso-font-kerning: 1.0pt; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana"><FONT face=宋体>带有中文参数的时候就会出现乱码。</FONT></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: #303030; FONT-FAMILY: Verdana; mso-font-kerning: 1.0pt"><BR></SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: #303030; mso-font-kerning: 1.0pt; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana"><FONT face=宋体>接下来我们升级了</FONT></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: #303030; FONT-FAMILY: Verdana; mso-font-kerning: 1.0pt">tomcat</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: #303030; mso-font-kerning: 1.0pt; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana"><FONT face=宋体>的版本，采用的组合是：</FONT></SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: #303030; FONT-FAMILY: Verdana; mso-font-kerning: 1.0pt"><BR>Tomcat5.0.28<BR>Apache2.0.53<BR>mod_jk_1.2.6_2.0.50.dll<BR></SPAN><FONT face=宋体><SPAN style="FONT-SIZE: 10pt; COLOR: #303030; mso-font-kerning: 1.0pt; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana">这样再通过以下的三步就可以，解决所有的中文乱麻问题。</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l0 level1 lfo1; tab-stops: list 18.0pt"><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana; mso-bidi-font-size: 12.0pt">1.<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana; mso-bidi-font-size: 12.0pt">jsp</SPAN><SPAN style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-size: 12.0pt">页面：</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #0000aa; FONT-FAMILY: Verdana; mso-bidi-font-size: 12.0pt">&lt;%@ page contentType="text/html;charset=gb2312"%&gt;<?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 18pt; TEXT-INDENT: -18pt; mso-list: l0 level1 lfo1; tab-stops: list 18.0pt"><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana; mso-bidi-font-size: 12.0pt">2.<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #0000aa; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-size: 12.0pt">加过滤器：</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana; mso-bidi-font-size: 12.0pt"><BR>&lt;filter&gt;<BR>&lt;filter-name&gt;Set Character Encoding&lt;/filter-name&gt;<BR>&lt;filter-<B>class</B>&gt;filters.SetCharacterEncodingFilter&lt;/filter-<B>class</B>&gt;<BR>&lt;init-param&gt;<BR>&lt;param-name&gt;encoding&lt;/param-name&gt;<BR>&lt;param-value&gt;GBK&lt;/param-value&gt;<BR>&lt;/init-param&gt;<BR>&lt;/filter&gt;<BR><BR>&lt;filter-mapping&gt;<BR>&lt;filter-name&gt;Set Character Encoding&lt;/filter-name&gt;<BR>&lt;url-pattern&gt;<SPAN style="COLOR: #0000aa">/*&lt;/url-pattern&gt;<BR>&lt;/filter-mapping&gt;</SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: -18pt; mso-list: l0 level1 lfo1; tab-stops: list 18.0pt"><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana; mso-bidi-font-size: 12.0pt">3.<SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #0000aa; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-size: 12.0pt">修改</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #0000aa; FONT-FAMILY: Verdana; mso-bidi-font-size: 12.0pt">server.xml</SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #0000aa; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-size: 12.0pt">文件</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana; mso-bidi-font-size: 12.0pt"><BR>&lt;Connector port="8080"<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana; mso-bidi-font-size: 12.0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>maxThreads="150" minSpareThreads="25" maxSpareThreads="75"<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana; mso-bidi-font-size: 12.0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>enableLookups="false" redirectPort="8443" acceptCount="100"<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana; mso-bidi-font-size: 12.0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>debug="0" connectionTimeout="20000" <o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 79.5pt"><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana; mso-bidi-font-size: 12.0pt">disableUploadTimeout="true"<SPAN style="mso-spacerun: yes">&nbsp; </SPAN><SPAN style="COLOR: red">URIEncoding="GBK" </SPAN>/&gt;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana; mso-bidi-font-size: 12.0pt"><SPAN style="mso-tab-count: 1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>&lt;Connector port="8009" <o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana; mso-bidi-font-size: 12.0pt"><SPAN style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>enableLookups="false" redirectPort="8443" debug="0"<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 79.5pt"><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana; mso-bidi-font-size: 12.0pt">protocol="AJP/1.3"<SPAN style="mso-spacerun: yes">&nbsp; </SPAN><SPAN style="COLOR: red">URIEncoding="GBK"</SPAN> /&gt;</SPAN></P><SPAN style="FONT-SIZE: 10.5pt; COLOR: #303030; FONT-FAMILY: 宋体; mso-bidi-font-family: 'Times New Roman'; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt">提示：如果采用</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10.5pt; COLOR: #303030; FONT-FAMILY: 'Times New Roman'; mso-fareast-font-family: 宋体; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-bidi-font-size: 12.0pt">JK</SPAN><SPAN style="FONT-SIZE: 10.5pt; COLOR: #303030; FONT-FAMILY: 宋体; mso-bidi-font-family: 'Times New Roman'; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt">的方式整合，只需要在第二个</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10.5pt; COLOR: #303030; FONT-FAMILY: 'Times New Roman'; mso-fareast-font-family: 宋体; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-bidi-font-size: 12.0pt">Connetor</SPAN><SPAN style="FONT-SIZE: 10.5pt; COLOR: #303030; FONT-FAMILY: 宋体; mso-bidi-font-family: 'Times New Roman'; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt">处修改即可。可能在某些环境下两个地方都需要设置，好多网上的教程都是两个地方都需要设置，我实际操作告诉我只要加第二个。</SPAN><img src ="http://www.blogjava.net/grantbb/aggbug/12317.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/grantbb/" target="_blank">我不是张嘎－小兵</a> 2005-09-07 15:26 <a href="http://www.blogjava.net/grantbb/archive/2005/09/07/12317.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>使用Commons Digester轻松解析RSS</title><link>http://www.blogjava.net/grantbb/archive/2005/09/07/12315.html</link><dc:creator>我不是张嘎－小兵</dc:creator><author>我不是张嘎－小兵</author><pubDate>Wed, 07 Sep 2005 07:07:00 GMT</pubDate><guid>http://www.blogjava.net/grantbb/archive/2005/09/07/12315.html</guid><wfw:comment>http://www.blogjava.net/grantbb/comments/12315.html</wfw:comment><comments>http://www.blogjava.net/grantbb/archive/2005/09/07/12315.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/grantbb/comments/commentRss/12315.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/grantbb/services/trackbacks/12315.html</trackback:ping><description><![CDATA[<P>在学习Struts的example：tiles-documentation应用的时候，发现了用Commons Digester组件可以轻松的实现对rss的解析，解析完成之后会自动生成一个Channel对象，使用起来非常简单方便，所以想想以后有时间一定好好研读Commons里面的开源项目。<BR>写个简单的测试程序如下：<BR>import java.io.IOException; </P>
<P>import org.apache.commons.digester.rss.Channel;<BR>import org.apache.commons.digester.rss.RSSDigester;<BR>import org.xml.sax.SAXException; </P>
<P>/**<BR>&nbsp;* @author bing.xie<BR>&nbsp;*<BR>&nbsp;*/<BR>public class ParseRssChannel {<BR>&nbsp;public static void main(String[] args) {<BR>&nbsp;&nbsp;String url = "<A href="http://xml.linktone.com/rss/xml/14.xml">http://xml.linktone.com/rss/xml/14.xml</A>";<BR>&nbsp;&nbsp;RSSDigester digester = new RSSDigester();<BR>&nbsp;&nbsp;try {<BR>&nbsp;&nbsp;&nbsp;Channel obj = (Channel) digester.parse(url);<BR>&nbsp;&nbsp;&nbsp;System.out.println(obj.getTitle());<BR>&nbsp;&nbsp;} catch (IOException e) {<BR>&nbsp;&nbsp;&nbsp;e.printStackTrace();<BR>&nbsp;&nbsp;} catch (SAXException e) {<BR>&nbsp;&nbsp;&nbsp;e.printStackTrace();<BR>&nbsp;&nbsp;}<BR>&nbsp;}<BR>}<BR>这样真的是很方便。这篇只是抛砖引玉，希望大家共同发掘！<BR></P><img src ="http://www.blogjava.net/grantbb/aggbug/12315.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/grantbb/" target="_blank">我不是张嘎－小兵</a> 2005-09-07 15:07 <a href="http://www.blogjava.net/grantbb/archive/2005/09/07/12315.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>