??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲AV无码久久久久网站蜜桃 ,在线看亚洲十八禁网站,亚洲黄色在线网站http://m.tkk7.com/grantbb/category/3231.html期待交流zh-cnMon, 21 May 2007 11:27:37 GMTMon, 21 May 2007 11:27:37 GMT60BooleanQuery$TooManyClauses的问?/title><link>http://m.tkk7.com/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://m.tkk7.com/grantbb/archive/2007/05/21/118939.html</guid><wfw:comment>http://m.tkk7.com/grantbb/comments/118939.html</wfw:comment><comments>http://m.tkk7.com/grantbb/archive/2007/05/21/118939.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.tkk7.com/grantbb/comments/commentRss/118939.html</wfw:commentRss><trackback:ping>http://m.tkk7.com/grantbb/services/trackbacks/118939.html</trackback:ping><description><![CDATA[org.apache.lucene.search.BooleanQuery$TooManyClauses: maxClauseCount is set to 1024<br>     at org.apache.lucene.search.BooleanQuery.add(BooleanQuery.java:165)<br>     at org.apache.lucene.search.BooleanQuery.add(BooleanQuery.java:156)<br>     at org.apache.lucene.search.PrefixQuery.rewrite(PrefixQuery.java:53)<br>     at org.apache.lucene.search.BooleanQuery.rewrite(BooleanQuery.java:408)<br>     at org.apache.lucene.search.IndexSearcher.rewrite(IndexSearcher.java:138)<br>     at org.apache.lucene.search.Query.weight(Query.java:94)<br>     at org.apache.lucene.search.Hits.<init>(Hits.java:42)<br>     at org.apache.lucene.search.Searcher.search(Searcher.java:45)<br>     at org.apache.lucene.search.Searcher.search(Searcher.java:37)<br>     at com.toodou.searcher.search.PodcasterSearcher.searchPodcaster(PodcasterSearcher.java:238)<br>     at com.toodou.searcher.search.PodcasterSearcher.doPodcasterSearch(PodcasterSearcher.java:66)<br>     at test.com.toodou.searcher.search.PodcasterSearcherTest.testdoPodcasterSearch(PodcasterSearcherTest.java:57)<br>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br>     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)<br>     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br>     at java.lang.reflect.Method.invoke(Method.java:585)<br>     at junit.framework.TestCase.runTest(TestCase.java:154)<br>     at junit.framework.TestCase.runBare(TestCase.java:127)<br>     at junit.framework.TestResult$1.protect(TestResult.java:106)<br>     at junit.framework.TestResult.runProtected(TestResult.java:124)<br>     at junit.framework.TestResult.run(TestResult.java:109)<br>     at junit.framework.TestCase.run(TestCase.java:118)<br>     at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)<br>     at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)<br>     at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)<br>     at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)<br>     at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)<br>     at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)<br> <br> 可以通过讄Q?br> BooleanQuery.setMaxClauseCount(10000);<br> 来解决问题,但是q样带来的问题是会得内存开销加大。容易出现OutOfMemory的异?br> 所以需要非常}慎处理?img src ="http://m.tkk7.com/grantbb/aggbug/118939.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/grantbb/" target="_blank">我不是张嘎-兵</a> 2007-05-21 17:21 <a href="http://m.tkk7.com/grantbb/archive/2007/05/21/118939.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>异常Q?java.sql.SQLException: Server shutdown in progress"http://m.tkk7.com/grantbb/archive/2007/05/15/117641.html我不是张嘎-兵我不是张嘎-兵Tue, 15 May 2007 08:20:00 GMThttp://m.tkk7.com/grantbb/archive/2007/05/15/117641.htmlhttp://m.tkk7.com/grantbb/comments/117641.htmlhttp://m.tkk7.com/grantbb/archive/2007/05/15/117641.html#Feedback0http://m.tkk7.com/grantbb/comments/commentRss/117641.htmlhttp://m.tkk7.com/grantbb/services/trackbacks/117641.html
问题原因Q数据有自动脚本Q会执行时间超q?0U的q程杀掉?br>q样的话QJava的应用就会抛L异常?br>


我不是张嘎-兵 2007-05-15 16:20 发表评论
]]>
CAS最q的更新http://m.tkk7.com/grantbb/archive/2007/04/23/112907.html我不是张嘎-兵我不是张嘎-兵Mon, 23 Apr 2007 03:19:00 GMThttp://m.tkk7.com/grantbb/archive/2007/04/23/112907.htmlhttp://m.tkk7.com/grantbb/comments/112907.htmlhttp://m.tkk7.com/grantbb/archive/2007/04/23/112907.html#Feedback0http://m.tkk7.com/grantbb/comments/commentRss/112907.htmlhttp://m.tkk7.com/grantbb/services/trackbacks/112907.htmlCAS Server 3.1 M2 Released

CAS Server and Client 3.1 Milestone 1 Released

phpCAS 0.5.0 RC5 Release

CAS 3.0.7 Final Release

Inclusion of Abstract Ticket Registry

CAS 3.0.6 Final

q里面有几个更新很重要:
1.Upgrade to Spring 2.0.1, Spring Web Flow 1.0 and Spring LDAP 1.1.1

2.Introduction of JBossCacheTicketRegistry
    支持后JBossCacheTicketRegistry可以方便大q发量的|站的水qx展问题?br>


我不是张嘎-兵 2007-04-23 11:19 发表评论
]]>
从项目管理的九大知识领域来说明如何完成项?/title><link>http://m.tkk7.com/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://m.tkk7.com/grantbb/archive/2007/04/18/111728.html</guid><wfw:comment>http://m.tkk7.com/grantbb/comments/111728.html</wfw:comment><comments>http://m.tkk7.com/grantbb/archive/2007/04/18/111728.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.tkk7.com/grantbb/comments/commentRss/111728.html</wfw:commentRss><trackback:ping>http://m.tkk7.com/grantbb/services/trackbacks/111728.html</trackback:ping><description><![CDATA[<p class="MsoNormal"><span style="font-size: 9pt; font-family: 宋体;">我主要结合项目管理的九大知识领域来说明,需要说明的是在我接触的目中,九个领域的内Ҏ一些没有接触过的我qq?o:p></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: 宋体;">范围理Q?o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 9pt; font-family: 宋体;"><span>     </span>首先会有产品l理提出我们要开发一个什么样的YӞ有那些功能,基本上就是一些FeatureListQ然后给出vision and scope文。Y件开发的目l理会根据这份文档,通过沟通,来写出SRS。其中主要包括了UseCase和非功能性需求以及一些约束条件。有了这些内容后Q会开一个需求确认会Q来认已经明确的需求,会议上可以对不明的需求进行讨论和完善?o:p></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: 宋体;">旉理Q?o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 9pt; font-family: 宋体;"><span>     </span>目l理在接到Y仉目开发Q务后Q就要制定出一个大致的目计划Q然后有了Y件的需求文之后,可以q一步细化项目的计划。在做项目计划的时候同时会牉|CQ务的分工。在目q行的过E中严格按照目计划q行?o:p></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: 宋体;">采购理<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 9pt; font-family: 宋体;"><span>     </span>目的前期,目l理需要明Y件安装需要多服务器Q服务器的配|是什么样的。什么时候必d货,预算的经Ҏ多少{。如果项目的人手不够Q同时要考虑q行软g外包?o:p></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: 宋体;">人力资源理<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 9pt; font-family: 宋体;"><span>     </span>主要是提高团队的士气和凝聚力Q让每一位团队成员都有清C致的目标Q从生活{各个方面关心开发h员,帮助他们解决一些实实在在的问题。如果有软g外包Q还要统一得管理好外包的Y件开发h员?o:p></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: 宋体;">沟通管?o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 9pt; font-family: 宋体;"><span>     </span>l常开目组会议Q保持信息畅通,通过wiki{工具保持信息共享。每天都有晨会,周报发给组的所有成员。通过聚餐、喝茶等方式增进交流。针对不同的员工可能需要采用不同的方式Q例如:有的人喜Ƣ面寚w的沟通,有的喜欢email沟通,有得喜欢msn{等?o:p></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: 宋体;">风险理<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 9pt; font-family: 宋体;"><span>     </span>我认为比较重要的是抓住开发过E的几个环节Q例如:需求分析、界面的设计、接口的设计、数据库的设计等。每天项目经理都要确认项目的q度是否正常Q检查项目的质量Q尽可能早的发现一些问题。经常得跟品经理交,保开发的软g产品W合需求?o:p></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: 宋体;">成本理<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size: 9pt; font-family: 宋体;"><span>     </span>对于我接触的目Q牵扯到成本理的主要就是开发h员的成本Q分配好dQ把握住q度Q提高开发团队的效率p够ؓ公司节省开支,从而达到控制成本的目的?o:p></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: 宋体;">质量理<o:p></o:p></span></p> <span style="font-size: 9pt; font-family: 宋体;"><span>     </span>我认量管理应该诏I于整个的Y件开发过E中。比较典型的有,首先是要保证SRS的质量,只有需求的质量控制住了Q整个项目才有保障。Y件的~码要规范,有详l清楚的注释Q要求写单元试Q定期的q行代码review会议Q要有集成测试和pȝ试。对于我们的互联|品,׃产品环境比较复杂Q所以一定要有相应的pȝ试Q也可以UCؓU上试?/span><img src ="http://m.tkk7.com/grantbb/aggbug/111728.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/grantbb/" target="_blank">我不是张嘎-兵</a> 2007-04-18 20:03 <a href="http://m.tkk7.com/grantbb/archive/2007/04/18/111728.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>developerworks上关于泛型的文章http://m.tkk7.com/grantbb/archive/2007/04/18/111727.html我不是张嘎-兵我不是张嘎-兵Wed, 18 Apr 2007 11:57:00 GMThttp://m.tkk7.com/grantbb/archive/2007/04/18/111727.htmlhttp://m.tkk7.com/grantbb/comments/111727.htmlhttp://m.tkk7.com/grantbb/archive/2007/04/18/111727.html#Feedback0http://m.tkk7.com/grantbb/comments/commentRss/111727.htmlhttp://m.tkk7.com/grantbb/services/trackbacks/111727.html诊断 Java 代码: L掌握 Java 泛型

诊断 Java 代码: L掌握 Java 泛型cdQ第 2 部分

诊断 Java 代码: L掌握 Java 泛型Q第 3 部分

诊断 Java 代码: L掌握 Java 泛型Q第 4 部分

Java 理论和实? 了解泛型

多角度看 Java 中的泛型

Eclipse V3.1 中的 Java 泛型支持

介绍 JDK 5.0 中的泛型

~译时?Generic Java 捕获更多的错?/a>


我不是张嘎-兵 2007-04-18 19:57 发表评论
]]>
Lucene2.1的新变化http://m.tkk7.com/grantbb/archive/2007/03/22/105669.html我不是张嘎-兵我不是张嘎-兵Thu, 22 Mar 2007 14:46:00 GMThttp://m.tkk7.com/grantbb/archive/2007/03/22/105669.htmlhttp://m.tkk7.com/grantbb/comments/105669.htmlhttp://m.tkk7.com/grantbb/archive/2007/03/22/105669.html#Feedback1http://m.tkk7.com/grantbb/comments/commentRss/105669.htmlhttp://m.tkk7.com/grantbb/services/trackbacks/105669.html 1.9 ?/span> 2.0 的改动不是很多,主要是废弃了一?/span> API Q?/span> 2.0 起了一个过渡的作用?/span>

2.1 是在 2.0 基础上做了很多的改进Q提升了性能Q修复了一?/span> Bug {?/span>

 

Lucene2.1 在烦引的格式上做了一些改q,所以旧版本?/span> Lucene 是无法访?/span> 2.1 版的索引文g。但?/span> 2.1 版本的可以读写旧版本的烦引文件。保持向下的兼容性。这炚w要我们在使用时注意?/span>

 

下面单的列出一些新的特性:

1.       's' ?/span> 't' 从默认的 stopwords 中移掉了。但是依然还?/span> 'a' 也可以会有同L问题Q所以分词需要针对自q应用q行自定义?/span>

2.       更新?/span> StandardAnalyzer 中的针对 CJK ?/span> Unicode 代码范围。用处不大,因ؓ我们中文需要自己开发分词?/span>

3.       允许?/span> QueryParser 的最前面使用通配W?/span> (*, ?) Q之前是不允许的。这个比较有意义Q可以实C些模p搜索?/span>

4.       QueryParser 默认使用 ConstantScoreRangeQuery 执行范围查询。增加了 useOldRangeQuery 属性允许在需要的情况下用旧?/span> RangeQuery

5.       对于 WildcardQuery Q如果一?/span> term 不包含Q何的 ? 或?/span> * Q之前会抛出异常Q现在会执行一?/span> TermQuery ?/span>

6.       L?/span> deprecated ?/span> doc.fields() Ҏ?/span> Enumeration

7.       write lock 现在默认的位|是索引的目录,单命名ؓ write.lock

8.       新的 FieldSelector API Q相关的 IndexReader 和实现都发生了变化。新?/span> Fieldable 接口被用作字D늚延迟加蝲上?/span>

9.       使用 MultiFieldQueryParser 的时候可以ؓ不同?/span> field 指定不同?/span> boosts

10.   新的Ҏ IndexWriter.addIndexesNoOptimize() 在新d一个新?/span> segments 的时候,只进行合qӞ不进行优化?/span>

11.   QueryParser 允许在引号和短语中用反斜线

12.   增加了方?/span> RAMDirectory.sizeInBytes(), IndexWriter.ramSizeInBytes() ?/span> IndexWriter.flushRamSegments() Q允许应用程序控制烦引时~存文对内存的使用Q这些蛮有用的,可以用于监控索引的过E?/span>

13.   QueryParser 解析 *:* 为匹配所有的内容

14.   可以通过命o行在已经存在的烦引文件中修改和删?/span> field

15.   IndexWriter 增加了方法来高效得更?/span> documents 。增?/span> IndexWriter.flush() Ҏ内存的内容h到文件系l?/span>

                                  兵 2007-3-22


]]>
MySpace的成功经?/title><link>http://m.tkk7.com/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://m.tkk7.com/grantbb/archive/2007/03/20/104917.html</guid><wfw:comment>http://m.tkk7.com/grantbb/comments/104917.html</wfw:comment><comments>http://m.tkk7.com/grantbb/archive/2007/03/20/104917.html#Feedback</comments><slash:comments>3</slash:comments><wfw:commentRss>http://m.tkk7.com/grantbb/comments/commentRss/104917.html</wfw:commentRss><trackback:ping>http://m.tkk7.com/grantbb/services/trackbacks/104917.html</trackback:ping><description><![CDATA[ <ul> <li>数字 <ul><li>MySpace月访问量400? </li><li>比喻Q粉刷金门大桥,工作完成之时Q就是重新来q之? </li><li>新闻集团2005q?.8亿收购MySpaceQ现在至?0? </li></ul></li> <li>数据~存 <ul><li>同步问题Q? </li></ul></li> <li>50万̎? <ul><li>数据库采用主从结构,主负责updateQ从负责read </li></ul></li> <li>1-2百万账户 <ul><li>I/Oq发定w问题 </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>高度独立Q有些信息必d? <ul><li>每个数据库必L各自的用戯副本 </li></ul></li><li>向上和向外扩展的问题 <ul><li>向上Q多CPUQ大内存 <ul><li>昂贵 </li></ul></li><li>只要增长势存在Q无论如何都要走向外扩展的道? </li></ul></li><li>整个站点作Z个应用看? </li><li>用h百万一l分? <ul><li>各组的全部数据存攑ֈ一个DB实例 </li><li>每台两个DB实例Q容U?00万用? </li></ul></li><li>q有一个特D的数据库保存用户名和密? <ul><li>d、认? </li><li>功能单一 </li></ul></li></ul></li> <li>9百万??百万账户 <ul><li>1千万Q存储瓶颈、I/O极限 </li><li>某些数据量会非常大(热门、突发) </li><li>3PAR:均匀数据讉K负荷Q负载均衡) </li><li>数据~存? <ul><li>被频J请求的数据对象的副? </li><li>不是所有的数据都要攑ֈ数据? </li></ul></li></ul></li> <li>2?百万账户 <ul><li>升?4? <ul><li>DBQ?2G内存 </li><li>升Q?4G </li></ul></li></ul></li> <li>可靠? <ul><li>备用的系l? </li><li>物理隔开 </li></ul></li> <li>名言Q我们犯q大量的错误Q但到头来,我们作对的还是比做错的多 </li> </ul> <img src ="http://m.tkk7.com/grantbb/aggbug/104917.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/grantbb/" target="_blank">我不是张嘎-兵</a> 2007-03-20 12:16 <a href="http://m.tkk7.com/grantbb/archive/2007/03/20/104917.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>JVM参数优化http://m.tkk7.com/grantbb/archive/2007/03/05/101951.html我不是张嘎-兵我不是张嘎-兵Mon, 05 Mar 2007 08:42:00 GMThttp://m.tkk7.com/grantbb/archive/2007/03/05/101951.htmlhttp://m.tkk7.com/grantbb/comments/101951.htmlhttp://m.tkk7.com/grantbb/archive/2007/03/05/101951.html#Feedback4http://m.tkk7.com/grantbb/comments/commentRss/101951.htmlhttp://m.tkk7.com/grantbb/services/trackbacks/101951.html
-server:一定要作ؓW一个参敎ͼ在多个CPU时性能?br />-XmsQ初始Heap大小Q用的最内?br />-XmxQjava heap最大|使用的最大内?br />    上面两个g般设|ؓ同样的大?br />
-XssQ每个线E的Stack大小

-verbose:gc 现实垃圾攉信息
-Xloggc:gc.log 指定垃圾攉日志文g

刚刚了解到的一些参敎ͼ待实跉|试)
-XmnQyoung generation的heap大小Q一般设|ؓXmx??分之一

-XX:+UseParNewGC Q羃短minor攉的时?br />-XX:+UseConcMarkSweepGC Q羃短major攉的时?br />    提示Q此选项在Heap Size 比较大而且Major攉旉较长的情况下使用更合适?br />


我不是张嘎-兵 2007-03-05 16:42 发表评论
]]>
Spring整合C3P0的配|?/title><link>http://m.tkk7.com/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://m.tkk7.com/grantbb/archive/2006/12/18/88601.html</guid><wfw:comment>http://m.tkk7.com/grantbb/comments/88601.html</wfw:comment><comments>http://m.tkk7.com/grantbb/archive/2006/12/18/88601.html#Feedback</comments><slash:comments>3</slash:comments><wfw:commentRss>http://m.tkk7.com/grantbb/comments/commentRss/88601.html</wfw:commentRss><trackback:ping>http://m.tkk7.com/grantbb/services/trackbacks/88601.html</trackback:ping><description><![CDATA[|上没有扑ֈ比较合适的Q自q了看Q然后放到项目中实验的一下?br />很多人都认ؓ比DBCP优秀?br /><br /><bean id="c3p0DataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource" destroy-method="close"><br />      <property name="driverClass"><br />        <value>${jdbc.driverClassName}</value><br />      </property><br />      <property name="jdbcUrl"><br />        <value>${jdbc.url}</value><br />      </property><br />      <property name="user"><br />       <value>${jdbc.username}</value><br />      </property><br />      <property name="password"><br />       <value>${jdbc.password}</value><br />      </property><br />      <property name="initialPoolSize"><value>10</value></property><br />      <property name="minPoolSize"><value>5</value></property><br />      <property name="maxPoolSize"><value>30</value></property><br />      <property name="acquireIncrement"><value>5</value></property><br />      <property name="maxIdleTime"><value>10</value></property><br />      <property name="maxStatements"><value>0</value></property><br />    </bean><br /><br />以下几个参数是用的基本配置参数Q?br />initialPoolSizeQ?<br />Number of Connections a pool will try to acquire upon startup. Should be between minPoolSize and maxPoolSize<br />q接池初始化时获取的链接敎ͼ介于minPoolSize和maxPoolSize之间<br /><br />minPoolSizeQ?br />Minimum number of Connections a pool will maintain at any given time.<br />最链接数<br /><br />maxPoolSizeQ?br />Maximum number of Connections a pool will maintain at any given time.<br />最大连接数<br /><br />acquireIncrementQ?br />Determines how many connections at a time c3p0 will try to acquire when the pool is exhausted.<br />在当前连接数耗尽的时候,一ơ获取的新的q接?br /><br />maxIdleTimeQ?br />Seconds a Connection can remain pooled but unused before being discarded. Zero means idle connections never expire.<br />最大空闲的旉Q单位是U,无用的链接再q时后会被回?br /><img src ="http://m.tkk7.com/grantbb/aggbug/88601.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/grantbb/" target="_blank">我不是张嘎-兵</a> 2006-12-18 18:24 <a href="http://m.tkk7.com/grantbb/archive/2006/12/18/88601.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>P6spy和SQL优化http://m.tkk7.com/grantbb/archive/2006/11/01/78445.html我不是张嘎-兵我不是张嘎-兵Wed, 01 Nov 2006 03:48:00 GMThttp://m.tkk7.com/grantbb/archive/2006/11/01/78445.htmlhttp://m.tkk7.com/grantbb/comments/78445.htmlhttp://m.tkk7.com/grantbb/archive/2006/11/01/78445.html#Feedback0http://m.tkk7.com/grantbb/comments/commentRss/78445.htmlhttp://m.tkk7.com/grantbb/services/trackbacks/78445.html P6Spy Q?/span> http://www.p6spy.com/

是一个可以用来在应用E序中拦截和修改数据操作语句的开源框架。对 SQL q行拦截Q相当于一?/span> SQL 语句的记录器?/span>

使用很简单,只需要在配置中将驱动E序Ҏ P6Sky 的拦截驱动。可能会l系l带来略微的性能下降Q但是在开发环境中的媄响很?/span>

 

open source GUI versions of P6Spy Q?/span> irongrid

 

SQL Profiler

http://www.jahia.org/jahia/page377.html

是一个基?/span> P6Sky 引擎的快速剖析工兗统?/span> SQL 语句Q分析那里是性能瓉。在那里创徏索引或者采用什么样的方法来提高效率。根?/span> SQL 查询语句帮助生成合适的索引脚本?/span>

 

主要参考:

F:\ 专题学习 \P6spy

?/span> p6spy ?/span> sqlprofiler 来进?/span> jdbc sql 日志记录和分?/span>

JDBC SQL Profiling ?/span> p6spy



我不是张嘎-兵 2006-11-01 11:48 发表评论
]]>
我的TDD实践http://m.tkk7.com/grantbb/archive/2006/09/21/71028.html我不是张嘎-兵我不是张嘎-兵Thu, 21 Sep 2006 02:54:00 GMThttp://m.tkk7.com/grantbb/archive/2006/09/21/71028.htmlhttp://m.tkk7.com/grantbb/comments/71028.htmlhttp://m.tkk7.com/grantbb/archive/2006/09/21/71028.html#Feedback0http://m.tkk7.com/grantbb/comments/commentRss/71028.htmlhttp://m.tkk7.com/grantbb/services/trackbacks/71028.html1.首先定义接口

2.然后用IDE产生一个实现类.
  需要修改Eclipse的模?使得所有生成的实现cL出UnsupportedOperationException异常.例如:
 public boolean checkUserByUsernameAndLogincode(String username, String logincode) {
  // TODO Auto-generated method stub
  throw new UnsupportedOperationException();
  //return false;
 }
:DAOc都要抛出DataAccessException

3.然后针对该类写测?每次只针?一个方?写测?
 此时q行试是不能够通过?会抛出UnsupportedOperationException

4.然后~写接口的实?来得测试获得通过.



我不是张嘎-兵 2006-09-21 10:54 发表评论
]]>
几个著名java开源缓存系l的介绍http://m.tkk7.com/grantbb/archive/2006/09/21/71027.html我不是张嘎-兵我不是张嘎-兵Thu, 21 Sep 2006 02:52:00 GMThttp://m.tkk7.com/grantbb/archive/2006/09/21/71027.htmlhttp://m.tkk7.com/grantbb/comments/71027.htmlhttp://m.tkk7.com/grantbb/archive/2006/09/21/71027.html#Feedback0http://m.tkk7.com/grantbb/comments/commentRss/71027.htmlhttp://m.tkk7.com/grantbb/services/trackbacks/71027.html下面提到的一些CachepȝQ我用过OSCache、EHCacheQ这两个都是比较轻量U的。感觉OSCache的API比较方便Q接口定义比较清楚?br />而JBossCache会用来做分布式的Cache?br />

         OSCache
  OSCache是个一个广泛采用的高性能的J2EE~存框架QOSCache能用于Q何Java应用E序的普通的~存解决Ҏ?
  OSCache有以下特点:
  ~存M对象Q你可以不受限制的缓存部分jsp面或HTTPhQQ何java对象都可以缓存?
  拥有全面的API--OSCache APIl你全面的程序来控制所有的OSCacheҎ?
  怹~存--~存能随意的写入盘Q因此允许昂늚创徏Qexpensive-to-createQ数据来保持~存Q甚臌让应用重启?
  支持集群--集群~存数据能被单个的进行参数配|,不需要修改代码?
~存记录的过?-你可以有最大限度的控制~存对象的过期,包括可插入式的刷新策略(如果默认性能不需要时Q?
  官方|站 http://www.opensymphony.com/oscache/

  Java Caching System
  JSC(Java Caching System)是一个用分布式的~存pȝQ是Z服务器的java应用E序。它是通过提供理各种动态缓存数据来加速动态web应用?
  JCS和其他缓存系l一P也是一个用于高速读取,低速写入的应用E序?
  动态内容和报表pȝ能够获得更好的性能?
  如果一个网站,有重复的|站l构Q用间歇性更新方式的数据库(而不是连l不断的更新数据库)Q被重复搜烦出相同结果的Q就能够通过执行~存方式改进其性能和׾~性?
  官方|站 http://jakarta.apache.org/turbine/jcs/

  EHCache
  EHCache 是一个纯java的在q程中的~存Q它h以下Ҏ:快速,单,为Hibernate2.1充当可插入的~存Q最的依赖性,全面的文档和试?

  官方|站 http://ehcache.sourceforge.net/

  JCache
  JCache是个开源程序,正在努力成ؓJSR-107开源规范,JSR-107规范已经很多q没改变了。这个版本仍然是构徏在最初的功能定义上?
  官方|站 http://jcache.sourceforge.net/

  ShiftOne
  ShiftOne Java Object Cache是一个执行一pd严格的对象缓存策略的Java libQ就像一个轻量的配|缓存工作状态的框架?
  官方|站 http://jocache.sourceforge.net/

  SwarmCache
  SwarmCache是一个简单且有效的分布式~存Q它使用IP multicast与同一个局域网的其他主行通讯Q是特别为集和数据驱动web应用E序而设计的。SwarmCache能够让典型的L作大大超q写操作的这cd用提供更好的性能支持?
  SwarmCache使用JavaGroups来管理从属关pd分布式缓存的通讯?
  官方|站 http://swarmcache.sourceforge.net

  TreeCache / JBossCache
  JBossCache 是一个复制的事务处理~存Q它允许你缓存企业应用数据来更好的改善性能。缓存数据被自动复制Q让你轻松进行JBoss服务器之间的集群工作?JBossCache能够通过JBoss应用服务或其他J2EE容器来运行一个MBean服务Q当Ӟ它也能独立运行?
  JBossCache包括两个模块QTreeCache和TreeCacheAOP?
  TreeCache --是一个树形结构复制的事务处理~存?
  TreeCacheAOP --是一个“面向对象”缓存,它用AOP来动态管理POJO(Plain Old Java Objects)
  注:AOP是OOP的gl,是Aspect Oriented Programming的羃写,意思是面向斚w~程?
  官方|站 http://www.jboss.org/products/jbosscache

  WhirlyCache
  Whirlycache是一个快速的、可配置的、存在于内存中的对象的缓存。它能够通过~存对象来加快网站或应用E序的速度Q否则就必须通过查询数据库或其他代h较高的处理程序来建立?
官方|站 https://whirlycache.dev.java.net/



我不是张嘎-兵 2006-09-21 10:52 发表评论
]]>
使用CAS到的两个问?L帮助Q?/title><link>http://m.tkk7.com/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://m.tkk7.com/grantbb/archive/2006/07/06/56918.html</guid><wfw:comment>http://m.tkk7.com/grantbb/comments/56918.html</wfw:comment><comments>http://m.tkk7.com/grantbb/archive/2006/07/06/56918.html#Feedback</comments><slash:comments>3</slash:comments><wfw:commentRss>http://m.tkk7.com/grantbb/comments/commentRss/56918.html</wfw:commentRss><trackback:ping>http://m.tkk7.com/grantbb/services/trackbacks/56918.html</trackback:ping><description><![CDATA[ <span id="4esusek" class="postbody">问题一Q?<br />在tomcat里面配置好SSL之后Q访问相兛_用都会弹Z个关于认证的弹出H口?<br />有什么办法能够不让这L认证H口弹出来呢Q?<br />象下面这样就不会有弹出窗口,不知道如何实玎ͼ <br /><a target="_blank">https://secure.its.yale.edu/cas/servlet/login</a><br /><br />问题二: <br />CAS使用的cookie是保存在内存中的,如果览器关闭或过8时q接丢弃的Q而不是保存硬盘里的?<br />览器:ie <br />1.讉KclientA,跌{?CAS SERVER认证用户密码.通过认证 <br />2.新开一个ieH口,讉KclientB,需再次到CAS SERVER认证用户密码Q如果是在同一个窗口则只需认证一ơ) <br /><br />相反Q用浏览器firefoxQ?<br />1.讉KclientA,跌{?CAS SERVER认证用户密码.通过认证 <br />2.新开一个ieH口,讉KclientB, ?再到CAS SERVER认证用户密码 <br /><br />感觉ie和firefox的差别还是蛮的,很奇怪!</span> <img src ="http://m.tkk7.com/grantbb/aggbug/56918.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/grantbb/" target="_blank">我不是张嘎-兵</a> 2006-07-06 11:11 <a href="http://m.tkk7.com/grantbb/archive/2006/07/06/56918.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>扚w处理JDBC语句提高处理速度 http://m.tkk7.com/grantbb/archive/2006/06/30/55898.html我不是张嘎-兵我不是张嘎-兵Fri, 30 Jun 2006 03:19:00 GMThttp://m.tkk7.com/grantbb/archive/2006/06/30/55898.htmlhttp://m.tkk7.com/grantbb/comments/55898.htmlhttp://m.tkk7.com/grantbb/archive/2006/06/30/55898.html#Feedback0http://m.tkk7.com/grantbb/comments/commentRss/55898.htmlhttp://m.tkk7.com/grantbb/services/trackbacks/55898.html

存储q程的最单的形式是包含一pdSQL语句的过E,这些语句放在一起便于在同一个地方管理也可以提高速度。Statement cd以包含一pdSQL语句Q因此允许在同一个数据库事务执行所有的那些语句而不是执行对数据库的一pd调用?

使用扚w处理功能涉及下面的两个方法:

addBatch(String) Ҏ
executeBatchҎ
如果你正在用Statement 那么addBatch Ҏ可以接受一个通常的SQL语句Q或者如果你在用PreparedStatement Q那么也可以什么都不向它增加?

executeBatch Ҏ执行那些SQL语句q返回一个int值的数组Q这个数l包含每个语句媄响的数据的行数。如果将一个SELECT语句或者其他返回一个ResultSet的SQL语句攑օ扚w处理中就会导致一个SQLException异常?

关于java.sql.Statement 的简单范例可以是Q?

  
  Statement stmt = conn.createStatement();
stmt.insert("DELETE FROM Users");
stmt.insert("INSERT INTO Users VALUES('rod', 37, 'circle')");
stmt.insert("INSERT INTO Users VALUES('jane', 33, 'triangle')");
stmt.insert("INSERT INTO Users VALUES('freddy', 29, 'square')");

int[] counts = stmt.executeBatch();

PreparedStatement 有些不同Q它只能处理一部分SQL语法Q但是可以有很多参数Q因此重写上面的范例的一部分可以得C面的l果Q?

// 注意q里没有删除语句

  PreparedStatement stmt = conn.prepareStatement(
"INSERT INTO Users VALUES(?,?,?)"
);

User[ ] users = ...;
for(int i=0; i<users.length; i++) {
stmt.setInt(1, users[i].getName());
stmt.setInt(2, users[i].getAge());
stmt.setInt(3, users[i].getShape());
stmt.addBatch( );
}

int[ ] counts = stmt.executeBatch();

如果你不知道你的语句要运行多次Q那么这是一个很好的处理SQL代码的方法。在不用批量处理的情况下,如果d50个用P那么性能有影响Q如果某个h写了一个脚本添加一万个用户Q程序可能变得很p糕。添加批处理功能可以帮助提高性能Q而且在后面的那种情况下代码的可读性也更好?



我不是张嘎-兵 2006-06-30 11:19 发表评论
]]>
利用CAS实现SSO技?/title><link>http://m.tkk7.com/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://m.tkk7.com/grantbb/archive/2006/06/28/55559.html</guid><wfw:comment>http://m.tkk7.com/grantbb/comments/55559.html</wfw:comment><comments>http://m.tkk7.com/grantbb/archive/2006/06/28/55559.html#Feedback</comments><slash:comments>11</slash:comments><wfw:commentRss>http://m.tkk7.com/grantbb/comments/commentRss/55559.html</wfw:commentRss><trackback:ping>http://m.tkk7.com/grantbb/services/trackbacks/55559.html</trackback:ping><description><![CDATA[ <span id="qgeuy4c" class="bright-message-list"> <span id="2qcq44y" class="bright-message-list">1 安装<br />1.1pȝ配置<br />以下的Y件环境是必需的:<br />1Q?JDK 1.4.2 or higher<br />2Q?Tomcat 5.X<br /><br />1.2 Tomcat 配置Q启用SSL<br />1. 在要安装CAS的机器上为Tomcat生成用于SSL通讯的密钥:<br /><br />keytool –genkey –alias tomcat –keyalg RSA<br />q时需要输入密钥密码和其他参数Q第一个参数CN必须讄为CAS机器名,本机使用localhost试Q,会在用户目录中生?keystore密钥文g?br /><br />2. 导出密钥文gQ?br /><br />keytool –export –file server.crt –alias tomcat<br />q时需要输入上一步设定的密码Q结果会在当前目录生成server.crt信Q状?br /><br />3. 为客L的JVM导入密钥Q?br /><br />keytool –import –keystore $JAVA_HOME\jre\lib\security\cacerts <br />–file server.crt –alias tomcat<br />输入密码时注意密码ؓ“changeit”?br />4. 修改服务端Tomcat配置文gQ启用SSL。修?CATALINA_HOME\conf\server.xmlQ去掉有关SSL的那一D늚注释Q需要在connector字段中加入keystorePass="password"Qpassword即ؓ1?步中的密码)QkeystoreFileQ?"keystorePath"Q可以把W一步生成的.keystore复制?CATALINA_HOME\conf下,q样keystoreFileQ?"conf/.keystore"Q?br /><br />5. 重启TomcatQ测试https://server:8443是否可以讉KQserver应换为机器名或IP地址Q?br /><br />1.3 CAS Server安装<br /><br />下蝲CAS Server 3.0.4Q将其中的cas.war复制?CATALINA_HOME\webapps下,当然现在CAS中的用户密码认证Handler是很陋的Q品化必须重写q部分代码,生成新的cas.jar。这时可以通过讉Khttps://localhost:8443/cas试CAS是否成功部vQ应看到CAS登陆界面?br /><br />1.4 CAS Client 部v<br /><br />利用Tomcat自带的servlets-examples Q?CATALINA_HOME\webapps\servlets-examplesQ和jsp-examplesQ?CATALINA_HOME\ webapps\jsp-examplesQ进行试验,下蝲最新版本的Java CAS ClientQ将casclient.jar复制到这两个目的WEB-INF目录的lib下(需要新建此目录Q。修改两个项目的WEB-INF\ web.xmlQ添加如下的qo器:<br /><br /><!-- CAS Filters --><br />    <filter><br />        <filter-name>CASFilter</filter-name><br />        <filter-class>edu.yale.its.tp.cas.client.filter.CASFilter</filter-class><br />        <init-param><br />            <param-name>edu.yale.its.tp.cas.client.filter.loginUrl</param-name><br />            <param-value>https://server:8443/cas/login</param-value><br />        </init-param><!--q里的server是服务端的IP--><br />        <init-param><br />            <param-name>edu.yale.its.tp.cas.client.filter.validateUrl</param-name><br />            <param-value>https://serName:8443/cas/proxyValidate</param-value><br />        </init-param><!--q里的serName是服务端的主机名Q而且必须?-><br />        <init-param><br />          <param-name>edu.yale.its.tp.cas.client.filter.serverName</param-name><br />          <param-value>client:port</param-value><!--client:port是需要CAS需要拦截的地址和端口,一般就是这个TOMCAT所启动的IP和port--><br />        </init-param><br />    </filter><br />    <br />    <filter-mapping><br />        <filter-name>CASFilter</filter-name><br />        <url-pattern>/servlet/*</url-pattern><!--q里的设|是针对servlets-examples的,针对jsp-examples讄?*--><br />    </filter-mapping><br /><br />2 试<br />重启TomcatQ定位到servlets-examplesQ执行Q何一个例子都会被重定向到CAS登陆;再定位到jsp-examplesQ也会被重定向到CAS登陆;此时登陆Q默认的认证Handler只要求username=passwordQ可L选择用户名)Q登录后׃q入jsp- examplesQl定位到servlets-examplesQ执行Q何一个例子也不用再输入密码?br /><br /><br />补充Q?br /><br />&#61548; 在多台机器上部vCASQ这些机器必需在同一个域中;服务器端生成证书Q客L导入证书Q操作见上)?br /><br />&#61548; PHP客户端:使用esup-phpcas客户端,验证部分php代码如下Q?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 />dl束后,CAS服务器会自动重定向回本页面?br /><br />&#61548; CAS服务器与数据库连接:实际环境中我们需要到数据库验证用h效性,在CAS中配|JDBCq接?br /><br />首先Q我们需要创q数据库验证器Q当然也可以使用Jasig提供的cas-server-jdbc.jarQ这里我们修改了cas-server- jdbc的源码满q需要。ƈ把mysql的jdbc驱动和修改后的jar部v到CAS%/WEB_INF/lib/?br /><br />修改 %CAS%/WEB_INF/deployerConfigContext..xmlQ其中关于验证器的一D如下:<br />……………………………?.<br /><bean class="org.jasig.cas.adaptors.jdbc.QueryDatabaseAuthenticationHandler"><br />                            <property name="sql" value="select psw from user where username=?" /><br />                            <property name="dataSource" ref="dataSource" /><br />                        </bean><br />                    </list><br />                </property><br />        </bean><br /><br />        <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource" destroy-method="close"><br />                <property name="driverClassName"><value>com.mysql.jdbc.Driver</value></property><br />                <property name="url"><value>jdbc:mysql://192.168.1.246:3306/toodou</value></property><br />                <property name="username"><value>username</value></property><br />                <property name="password"><value>********</value></property><br />        </bean><br />&#61548; Jmeter试Q根据目前土豆网的登录流量,我们使用Jmeter对CAS处理性能q行试Q以每分?0人次d计,得到q_处理旉?1msQ几ơ测试中遇到的最长处理时间也仅ؓ78ms?br />但当d人次辑ֈ500/minӞ会出现明昄性能下降Q部分登录请求的处理旉会超q?000ms?/span> </span> <img src ="http://m.tkk7.com/grantbb/aggbug/55559.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/grantbb/" target="_blank">我不是张嘎-兵</a> 2006-06-28 16:19 <a href="http://m.tkk7.com/grantbb/archive/2006/06/28/55559.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>ICTCLAS.dll做网内容分词的问题http://m.tkk7.com/grantbb/archive/2006/05/11/45648.html我不是张嘎-兵我不是张嘎-兵Thu, 11 May 2006 05:42:00 GMThttp://m.tkk7.com/grantbb/archive/2006/05/11/45648.htmlhttp://m.tkk7.com/grantbb/comments/45648.htmlhttp://m.tkk7.com/grantbb/archive/2006/05/11/45648.html#Feedback9http://m.tkk7.com/grantbb/comments/commentRss/45648.htmlhttp://m.tkk7.com/grantbb/services/trackbacks/45648.htmlAn unexpected exception has been detected in native code outside the VM.
Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x18473252
Function=Ordinal5+0x3252
Library=D:\workspace3\Lucene_191\ICTCLAS.dll

Current Java thread:
at com.xjt.nlp.word.ICTCLAS.paragraphProcess(Native Method)
- locked <0x1003db78> (a com.xjt.nlp.word.ICTCLAS)
at org.apache.lucene.analysis.cn.TjuChineseAnalyzer.tokenStream(TjuChineseAnalyzer.java:59)
at org.apache.lucene.index.DocumentWriter.invertDocument(DocumentWriter.java:162)
at org.apache.lucene.index.DocumentWriter.addDocument(DocumentWriter.java:93)
at org.apache.lucene.index.IndexWriter.addDocument(IndexWriter.java:450)
at org.apache.lucene.index.IndexWriter.addDocument(IndexWriter.java:436)
at ch14.performance.index.IndexPerformanceTest.addDocument(IndexPerformanceTest.java:192)
at ch14.performance.index.IndexPerformanceTest.indexFiles(IndexPerformanceTest.java:214)
at ch14.performance.index.IndexPerformanceTest.indexFiles(IndexPerformanceTest.java:207)
at ch14.performance.index.IndexPerformanceTest.indexFiles(IndexPerformanceTest.java:207)
at ch14.performance.index.IndexPerformanceTest.toIndex(IndexPerformanceTest.java:141)
at ch14.performance.index.IndexPerformanceTest.toIndex(IndexPerformanceTest.java:127)
at ch14.performance.index.IndexPerformanceTest.main(IndexPerformanceTest.java:228)

Dynamic libraries:
0x00400000 - 0x00407000 C:\j2sdk1.4.2_03\bin\javaw.exe
0x77F80000 - 0x77FFC000 C:\WINNT\system32\ntdll.dll
0x796D0000 - 0x79735000 C:\WINNT\system32\ADVAPI32.dll
0x77E60000 - 0x77F32000 C:\WINNT\system32\KERNEL32.dll
0x786F0000 - 0x78768000 C:\WINNT\system32\RPCRT4.dll
0x77DF0000 - 0x77E59000 C:\WINNT\system32\USER32.dll
0x77F40000 - 0x77F7C000 C:\WINNT\system32\GDI32.dll
0x78000000 - 0x78045000 C:\WINNT\system32\MSVCRT.dll
0x75E00000 - 0x75E1A000 C:\WINNT\system32\IMM32.DLL
0x6C330000 - 0x6C338000 C:\WINNT\system32\LPK.DLL
0x65D20000 - 0x65D74000 C:\WINNT\system32\USP10.dll
0x08000000 - 0x08138000 C:\j2sdk1.4.2_03\jre\bin\client\jvm.dll
0x77530000 - 0x77560000 C:\WINNT\system32\WINMM.dll
0x6BD00000 - 0x6BD0D000 C:\WINNT\system32\SYNCOR11.DLL
0x10000000 - 0x10007000 C:\j2sdk1.4.2_03\jre\bin\hpi.dll
0x007F0000 - 0x007FE000 C:\j2sdk1.4.2_03\jre\bin\verify.dll
0x00800000 - 0x00819000 C:\j2sdk1.4.2_03\jre\bin\java.dll
0x00820000 - 0x0082D000 C:\j2sdk1.4.2_03\jre\bin\zip.dll
0x18470000 - 0x1853F000 D:\workspace3\Lucene_191\ICTCLAS.dll
0x777C0000 - 0x777DE000 C:\WINNT\system32\WINSPOOL.DRV
0x79B20000 - 0x79B31000 C:\WINNT\system32\MPR.DLL
0x71710000 - 0x71794000 C:\WINNT\system32\COMCTL32.dll
0x77900000 - 0x77923000 C:\WINNT\system32\imagehlp.dll
0x72960000 - 0x7298D000 C:\WINNT\system32\DBGHELP.dll
0x687E0000 - 0x687EB000 C:\WINNT\system32\PSAPI.DLL

Heap at VM Abort:
Heap
def new generation total 576K, used 429K [0x10010000, 0x100b0000, 0x104f0000)
eden space 512K, 74% used [0x10010000, 0x1006f0f8, 0x10090000)
from space 64K, 77% used [0x100a0000, 0x100ac5e0, 0x100b0000)
to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000)
tenured generation total 1408K, used 128K [0x104f0000, 0x10650000, 0x14010000)
the space 1408K, 9% used [0x104f0000, 0x105103e8, 0x10510400, 0x10650000)
compacting perm gen total 4096K, used 1782K [0x14010000, 0x14410000, 0x18010000)
the space 4096K, 43% used [0x14010000, 0x141cd860, 0x141cda00, 0x14410000)

Local Time = Wed May 10 19:19:16 2006
Elapsed Time = 8
#
# The exception above was detected in native code outside the VM
#
# Java VM: Java HotSpot(TM) Client VM (1.4.2_03-b02 mixed mode)
#
# An error report file has been saved as hs_err_pid2120.log.
# Please refer to the file for further information.
#

不知作者或者其他朋友有没有遇到Q网上也有h遇到q种情况?br />
q个问题很好。。?br />q个问题是中U院分词工具的BUG

举个例子Q如果你用这个分词工具分下面的词Q就一定会报错

?/?br />?/?br />
cM于这样一个数字加一个?”就会有问题。由于DLL抛出的异常是无法被JVM捕获的,因此JVMp停了下来。?br />
是在q行分词前要对句子进行预处理Q如
1Q全角到半角的替?br />2Q去除多余的I格
3Q一ơ分词的句子不要太长
4Q特D符L转换


不过在新版本的分词工具中Q好像这LBUG已经被改q了?br />我手上有一个师弟做的JAVA版的仿中U院分词工具Q而且把词库也q行了翻译,可以使用TXT文g做词库,q且能添加新词。希望有Z也能拿出来和朋友分nQ)q位师弟和我说他打算把这个放到SOURCEFORGE上,到时候大家可以下载了Q)

如果可能Q我也想在我的下一本新的Lucene的书中放上,呵呵。当然得先问问他的意见,哈哈


我不是张嘎-兵 2006-05-11 13:42 发表评论
]]>
[原创]Spring灉|配置http://m.tkk7.com/grantbb/archive/2006/05/10/45412.html我不是张嘎-兵我不是张嘎-兵Wed, 10 May 2006 03:55:00 GMThttp://m.tkk7.com/grantbb/archive/2006/05/10/45412.htmlhttp://m.tkk7.com/grantbb/comments/45412.htmlhttp://m.tkk7.com/grantbb/archive/2006/05/10/45412.html#Feedback1http://m.tkk7.com/grantbb/comments/commentRss/45412.htmlhttp://m.tkk7.com/grantbb/services/trackbacks/45412.html1.原来在我开发的目中由于是多h协作开发,所以我会把Spring的配|文件按人分成多个。然后不论是单元试q是通过web集成试Q都会把所有的文g装蝲q来?

单元试的时候(或者其他不通过web装载的情况Q,使用DefaultBeanFactorycdbeanRefFactory.xml配置文g
有的时候单元测试相关的cd的时候,我会单独写一个bean的配|文Ӟq行单元试?br />web集成试的时候直接在web.xml中配|?br /><context-param>
  <param-name>contextConfigLocation</param-name>
  <param-value>
   /WEB-INF/classes/WebApplicationContext.xml
   /WEB-INF/classes/HibernateContext.xml
   /WEB-INF/classes/WebApplicationContext_C.xml
.......
  </param-value>
 </context-param>

2.通过观察jpetstore目Q它的配|文件是按照web/service/daoq样的层ơ进行划分?br />对于一些web services接口也会有专门的配置文g?br />q样的话l构׃非常的清晎ͼ所以在目E_Q进入维护期的时候,可以把配|文件按照业务逻辑的层ơ进行划分?

3.Z能够灉|配置Q例如向一些数据库q接的配|,因ؓ大部分情况都是本地、测试服务器、正式服务器的配|是不同的,所以一般会通过写一个jdbc.propertiesQ在属性文件中q行配置?

4.在同时加在多个spring的配|文件的时候,也是有好多灵zȝҎQ这斚wspring做的真强。上面说了两U,q可以在applicationContext.xml文g?lt;beans>标签的后面,紧接着加入Q?br /><import resource="dataAccessContext-local.xml"/>q样的导入资源的语句。然后不同的环境可以使用不同的配|,不过q还需要每ơ都修改applicationContext.xml文g。该Ҏ不如直接在web.xml中配|多个方便,但是也不是绝寏V?

5.最后还有一U更加方便的ҎQ可以不用修改applicationContext.xml文gQ然后就能够自动装蝲相关的配|文件?br />首先Q写一个类Q?br />package com.xiebing.spring.util;

import java.net.InetAddress;

import org.springframework.web.context.support.XmlWebApplicationContext;

/**
 * TODO file description *
 *
 * @author bing.xie
 *
 * @version 1.0, 2006-5-10  create
 */
/**
 * @author bing.xie
 * 2006-5-10
 */
public class PerHostXmlWebApplicationContext extends XmlWebApplicationContext {
 protected String[] getDefaultConfigLocations(){
  String hostname = "localhost";
  
  try{
   hostname = InetAddress.getLocalHost().getHostName();
  }catch(Exception e){
   
  }
  String perHostConfiguration = DEFAULT_CONFIG_LOCATION_PREFIX
      + "applicationContext-"
      + hostname
      + DEFAULT_CONFIG_LOCATION_SUFFIX;
  if(getNamespace() != null){
   return new String[]{
     DEFAULT_CONFIG_LOCATION_PREFIX
     + this.getNamespace()
     + DEFAULT_CONFIG_LOCATION_SUFFIX
     ,perHostConfiguration};
  }else{
   return new String[]{
    DEFAULT_CONFIG_LOCATION,perHostConfiguration};
  }
 }
}

q种主要是通过动态的获取L名来动态配|的。所以对于不同的环境使用applicationContext-[hostname].xml可以封装变化了。当然了Q也可以不用hostnameQ如果发现其他方便的方式Q?

接下来,是在web.xml中增加配|:

<context-param>
  <param-name>contextClass</param-name>
  <param-value>com.xiebing.spring.util.PerHostXmlWebApplicationContext</param-value>
 </context-param>

q种Ҏ是要求在不同的环境下有不同的applicationContext-[hostname].xml文g



我不是张嘎-兵 2006-05-10 11:55 发表评论
]]>
Lucene 1.9 改进Ҏ列?/title><link>http://m.tkk7.com/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://m.tkk7.com/grantbb/archive/2006/04/30/44183.html</guid><wfw:comment>http://m.tkk7.com/grantbb/comments/44183.html</wfw:comment><comments>http://m.tkk7.com/grantbb/archive/2006/04/30/44183.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.tkk7.com/grantbb/comments/commentRss/44183.html</wfw:commentRss><trackback:ping>http://m.tkk7.com/grantbb/services/trackbacks/44183.html</trackback:ping><description><![CDATA[     摘要: Lucene 1.9 改进Ҏ列? 1.9 RC1 注:lucene2.0发布版本q不?00%的和1.4.3版兼宏V也是说在你用2.0版本的Lucene开发包替换原来?.4.3版本Ӟ应该让你的应用程序首先和1.9的兼宏V? 使用前提Q?  1. ~译和用Lucene需要?Java1.4 或以上版本? Lucene 1.9 在运行时的变化: ...  <a href='http://m.tkk7.com/grantbb/archive/2006/04/30/44183.html'>阅读全文</a><img src ="http://m.tkk7.com/grantbb/aggbug/44183.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/grantbb/" target="_blank">我不是张嘎-兵</a> 2006-04-30 13:51 <a href="http://m.tkk7.com/grantbb/archive/2006/04/30/44183.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>BEA UserGroup极限~程ȝhttp://m.tkk7.com/grantbb/archive/2006/04/25/42948.html我不是张嘎-兵我不是张嘎-兵Tue, 25 Apr 2006 02:06:00 GMThttp://m.tkk7.com/grantbb/archive/2006/04/25/42948.htmlhttp://m.tkk7.com/grantbb/comments/42948.htmlhttp://m.tkk7.com/grantbb/archive/2006/04/25/42948.html#Feedback0http://m.tkk7.com/grantbb/comments/commentRss/42948.htmlhttp://m.tkk7.com/grantbb/services/trackbacks/42948.html XP 实战

ThoughtWorks

敏捷的核心:是一U理c方法论、技?/span>

目Q确定目?/span>

q代Q核实目?/span>

日常Q走向目?/span>

 

团队内一定要有一致的认识Q做法(打通关节、h员调整、进行培训)Q开发环境(戉K、硬件、h员布|)

不断观察Q定期ȝ程的缺点,不断改进完善Q之适合团队

 

关于环境Q无挡板、光U明亮、带轮子的椅子、无UK或者键盘、大桌子、圈坐)

 

q代Q一?/span> story q_ 2 天,q踪、ȝ、分析、对事不对h

目大的时候需要专门的q代l理Q对内负?/span> checking Q?span style="COLOR: red">q代报告Q,对外交流汇报Q功能演C)

 

持箋集成Q?/span> 1 Q?span style="COLOR: red">从项目的W一天就开始做?/span> 2 Q发散性广播(声音Q哦。。。。。。,哦你妈个_Q熔岩灯 3 Q如果集成失败就必须立即解决 4 Q频J发布,自动试

 

试驱动开发: 1 Q增加测试范?/span> 2 Q?span style="COLOR: red">永远都要先写试Q先定义接口Q然后再写单元测试) 3 Q提高测试效?/span> 4 Q避免缺陷重?/span> 5 Q监督开?/span> 6 Q不仅仅是单元测?/span>

 

考虑?/span> wiki 理文Q方便P?/span>

 

实施 XP 的项目团队不要超q?/span> 10 人, 8 Q?/span> 10 人最合?/span>

 

web 试的工P salenium jwebunit junit (Fit jwebfit watir)

 

阉K巴巴Q?/span> web 性能试 陈日俊(落叶夏日Q?/span>
包括Q阿里巴巴、淘宝、支付宝、雅?/span>

LoadRunner 是开发h员玩?/span>

 

使用 JProfile 试性能

优先U考虑的是数据库调优( index Q,最后考虑法调优

Resin 研究使用Q性能更好

 

1 Q用戯为分?/span> 2 Q应用网l分?/span> 3 Q数据量分析

 

1?span style="FONT: 7pt 'Times New Roman'">  场景设计源自需?/span>

2?span style="FONT: 7pt 'Times New Roman'">  q发用户?/span>

3?span style="FONT: 7pt 'Times New Roman'">  峰倹{^均ƈ发、时间分?/span>

4?span style="FONT: 7pt 'Times New Roman'">  用户I间分布Q系l不同模块的用户I间分布Q?/span>

5?span style="FONT: 7pt 'Times New Roman'">  E_性要?/span>

6?span style="FONT: 7pt 'Times New Roman'">  数据库数量的大小、增长方式、访问方?/span>

7?span style="FONT: 7pt 'Times New Roman'">  用户行ؓ分析

 

U工?/span> JDO 专家l成?/span> 黄v?/span> 一?/span> Xper 的心路历E?/span>

 

上班玩游戏,爽!――培?/span> TeamWork 的能?/span>

40 岁的E序员,zd老,~到老,知道的多Q^{,q_Q可以良好的沟?/span>

 

真正?/span> XP 可以辑ֈQ工作节奏^E뀁有效率、有节奏

 

只有沟?/span>不够的项目,没有沟通过度的目

 

d汇报 上司

 

以h为本Q每个开发h员都能充分参与到软g开发中Q都以每一行代码ؓ׃QQ做到我Zh人,Zh为我?/span>

 

最高境界:以h为本Q而不是以程为本

XP Q改变h的思维品质

1 Q敢于面Ҏ?/span> 2 Q不怕暴露自q不 3 Q主动承认不?/span> 4 Q主动沟?/span> 5 Q杜l懒?/span> 6 Q反省自q开发流E?/span>

?/span> XP 中,到问题应该是先问谁会,如果没有会的?/span> google

 

1 Q结队一定更加高效、高?/span> 2 Q从别hw上学习Q看别h的优点,重伙伴 3 Q一个h的hg在于知道多少Q在于能知道多少 4 Q永q测试先?/span> 5 Q?b style="mso-bidi-font-weight: normal">不要吝啬问题 6 Q尽可能得让别h知道自己在做什?/span> 7 Q不要重复代?/span>

 

XP 挑战人性的阴暗面(惰性-永远都不?/span>?b style="mso-bidi-font-weight: normal">自尊Q知道什么时候应该放?/span>Q?/span>

 

Xper Q合格的E序?/span>

对于 XP 团队Q招聘的时候对性格也是有一些要?/span>

说白了: XP 是一U更加剥削的方式

 

但是对个人成长和对公司发展都是有利的Q只能说可能对公司的益处更加明显?/span>

如果我是老板我一定会选择 XP Q?/span>

如果到实施 XP 的老板Q那么就努力跟老板学习Q尽快让自己也成板?br />
Z推荐两篇文章Q?br />极限~程QXPQ发布工?/a>
Step by Step CruiseControl入门


我不是张嘎-兵 2006-04-25 10:06 发表评论
]]>
Java代码质量查工?/title><link>http://m.tkk7.com/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://m.tkk7.com/grantbb/archive/2006/03/19/36081.html</guid><wfw:comment>http://m.tkk7.com/grantbb/comments/36081.html</wfw:comment><comments>http://m.tkk7.com/grantbb/archive/2006/03/19/36081.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.tkk7.com/grantbb/comments/commentRss/36081.html</wfw:commentRss><trackback:ping>http://m.tkk7.com/grantbb/services/trackbacks/36081.html</trackback:ping><description><![CDATA[ <p>findbugsQ插件可以提供发现bug的功能?</p> <p>jupiterQ插件是一个提供个人或者小l的代码review的Eclipse插g </p> <p>checkstyleQ插件可以检查代码是否标准,是否存在一些常见错误的功能?</p> <p>togetherQ还有一个代码审查和验的功能?<br /><br />有了以上的工P在进行代码review的工作中会方便很多?/p> <img src ="http://m.tkk7.com/grantbb/aggbug/36081.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/grantbb/" target="_blank">我不是张嘎-兵</a> 2006-03-19 17:12 <a href="http://m.tkk7.com/grantbb/archive/2006/03/19/36081.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Java目常用试工具http://m.tkk7.com/grantbb/archive/2006/03/19/36080.html我不是张嘎-兵我不是张嘎-兵Sun, 19 Mar 2006 09:11:00 GMThttp://m.tkk7.com/grantbb/archive/2006/03/19/36080.htmlhttp://m.tkk7.com/grantbb/comments/36080.htmlhttp://m.tkk7.com/grantbb/archive/2006/03/19/36080.html#Feedback0http://m.tkk7.com/grantbb/comments/commentRss/36080.htmlhttp://m.tkk7.com/grantbb/services/trackbacks/36080.htmljwebunit和httpunit用于集成试web的功能?

jwebunit是对httpunit的进一步包装,使用h更加单?/p>

Cactus主要是测试服务器端的lg的工兗可以测试:Servlets, EJBs, Tag Libs, Filters{?

以上三者都是在junit基础之上开发的?

jmeter是一个纯java的压力测试工兗?

StrutsTestCase专门用来试struts应用E序的?/p>

junitperf可以为JUnit增加一层测试负载和性能的包装?

eclipse.plugins.profiler该插件ؓEclipse提供了性能试的功能?



我不是张嘎-兵 2006-03-19 17:11 发表评论
]]>
说说嵌入式数据库http://m.tkk7.com/grantbb/archive/2006/03/14/35285.html我不是张嘎-兵我不是张嘎-兵Tue, 14 Mar 2006 12:23:00 GMThttp://m.tkk7.com/grantbb/archive/2006/03/14/35285.htmlhttp://m.tkk7.com/grantbb/comments/35285.htmlhttp://m.tkk7.com/grantbb/archive/2006/03/14/35285.html#Feedback1http://m.tkk7.com/grantbb/comments/commentRss/35285.htmlhttp://m.tkk7.com/grantbb/services/trackbacks/35285.html最有名?A name=OLE_LINK1>嵌入式数据库Q?/SPAN>Berkeley DB 4.4 Q但不是关系数据库?/SPAN>

 

MySQL?/SPAN>Firebird也是开始提供嵌入式版本?/SPAN>

 

Java语言的嵌入式数据库:HSQLDB?/SPAN>Apache-Derby

 

嵌入式数据库的优点:

1、能够编译进用户的应用程序中

2、客L序和数据库引擎运行在同一q程中,期间的数据交换仅依赖函数调用可完成Q?/SPAN>

没有q程间通讯Q?/SPAN>TCP/IPq接Q性能大大提升

3、不需要单独安装部|数据库

4、测试驱动开发,单元试要求快速而且频繁执行E序Q嵌入式的数据库更适合q样的单元测?/SPAN>

5?/SPAN>HSQLDB?/SPAN>Apache Derby都支持标准的SQL92Q促使写出兼Ҏ更好的SQL

 

下蝲地址Q?/SPAN>http://db.apache.org/derby/derby_downloads.html

 

推荐几篇文章Q?/SPAN>

?/SPAN> Eclipse 中开?/SPAN> Apache Derby 应用E序

Z Eclipse ?/SPAN> Apache Derby 工具

?/SPAN> J2EE 服务器环境中使用 Derby

?/SPAN> Eclipse?/SPAN>WTP ?/SPAN> Derby 构徏 Web 应用E序

?/SPAN> Apache Ant q行 Derby 数据库开?/SPAN>



]]>
读Joel_l计机pd生的_有感http://m.tkk7.com/grantbb/archive/2006/02/28/32787.html我不是张嘎-兵我不是张嘎-兵Tue, 28 Feb 2006 01:17:00 GMThttp://m.tkk7.com/grantbb/archive/2006/02/28/32787.htmlhttp://m.tkk7.com/grantbb/comments/32787.htmlhttp://m.tkk7.com/grantbb/archive/2006/02/28/32787.html#Feedback1http://m.tkk7.com/grantbb/comments/commentRss/32787.htmlhttp://m.tkk7.com/grantbb/services/trackbacks/32787.html阅读全文

我不是张嘎-兵 2006-02-28 09:17 发表评论
]]>
使用Log4j记录异常的细微之?/title><link>http://m.tkk7.com/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://m.tkk7.com/grantbb/archive/2006/02/09/30042.html</guid><wfw:comment>http://m.tkk7.com/grantbb/comments/30042.html</wfw:comment><comments>http://m.tkk7.com/grantbb/archive/2006/02/09/30042.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.tkk7.com/grantbb/comments/commentRss/30042.html</wfw:commentRss><trackback:ping>http://m.tkk7.com/grantbb/services/trackbacks/30042.html</trackback:ping><description><![CDATA[<P>在现在的目中,使用Log4jq行日志记录Q对于异常的记录有点l微的之处需要说明?BR><BR>对于如下代码Q?BR>Exception e2 = new Exception(">>>>>>>>>>>>>Test Exception!");<BR>Q?Q?nbsp; e2.printStackTrace();<BR>Q?Q?nbsp; logger.info(e2);<BR>Q?Q?nbsp; logger.info("Exception : ",e2);<BR><BR>说明Q?BR>Q?Q直接在l端打印出来异常?BR>Q?Q记录在log4j的日志中Q但是只会打印出单的描述信息Q不会打印整个异常堆栈?BR>Q?Q可以打印出指定的信息,q有完整的堆栈信息?BR><BR>所以对于重要的异常处理Q用第三种方式比较好?/P><img src ="http://m.tkk7.com/grantbb/aggbug/30042.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/grantbb/" target="_blank">我不是张嘎-兵</a> 2006-02-09 15:28 <a href="http://m.tkk7.com/grantbb/archive/2006/02/09/30042.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>DBCP数据库连接池的参数理?/title><link>http://m.tkk7.com/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://m.tkk7.com/grantbb/archive/2006/01/09/27298.html</guid><wfw:comment>http://m.tkk7.com/grantbb/comments/27298.html</wfw:comment><comments>http://m.tkk7.com/grantbb/archive/2006/01/09/27298.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.tkk7.com/grantbb/comments/commentRss/27298.html</wfw:commentRss><trackback:ping>http://m.tkk7.com/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>理解Q同一旉能够从池中获取的最大的zd链接数。(也就是一个池的最大ƈ发量Q,?表示不限制?/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>理解Q能够在池中保存的处于空闲状态的zd链接的最大数目。前提是没有额外的链接被释放。(也就是说没有他的使用中的链接被释攄情况下,q接池中保存的最大空闲链接数Qؓ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>当没有可以用的数据库链接的时候,q接池将要等待一个链接被q回的最长时_毫秒Q,过q个旉p抛出异常。-1表示不受限制?/P><img src ="http://m.tkk7.com/grantbb/aggbug/27298.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/grantbb/" target="_blank">我不是张嘎-兵</a> 2006-01-09 19:03 <a href="http://m.tkk7.com/grantbb/archive/2006/01/09/27298.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Laszlo入门三_qC~点http://m.tkk7.com/grantbb/archive/2005/12/26/25491.html我不是张嘎-兵我不是张嘎-兵Mon, 26 Dec 2005 12:31:00 GMThttp://m.tkk7.com/grantbb/archive/2005/12/26/25491.htmlhttp://m.tkk7.com/grantbb/comments/25491.htmlhttp://m.tkk7.com/grantbb/archive/2005/12/26/25491.html#Feedback1http://m.tkk7.com/grantbb/comments/commentRss/25491.htmlhttp://m.tkk7.com/grantbb/services/trackbacks/25491.html

优点:

1.       交互能力?/SPAN>,完全可能过C/Sl构的表?/SPAN>

2.       兼容性高,几乎所有的览器都装有flash插g

3.       ?/SPAN>jsp?/SPAN>servletl合动态生能力强

4.       Laszlo相当于一?/SPAN>framework,方便在不同的容器间移?/SPAN>

5.       学习曲线不高,XML+JavaScriptQ做web的很Ҏ上手

 

~点:

1.       xml文g解码q编译ؓflash的代仯大,管对编译结果做?/SPAN>cacheQ如果有大量动态部分,仍然需要反复编译,?/SPAN>WEB服务器的压力比传l的大出不少

2.       flash文g本n体积较大Q对|络带宽的要求较?/SPAN>

3.       flashq行时的消耗也?/SPAN>,对客L要求也较?/SPAN>,不过现在的机器配|问题不?/SPAN>

4.       现在q不够完?/SPAN>/E_,实际应用的比较少.

5.  推荐开发环境需?/SPAN>1G内存以上Q我?12M内存开发,勉强可以的?BR>
希望有更多的人来补充Q发表观点!


我不是张嘎-兵 2005-12-26 20:31 发表评论
]]>
Struts中DownloadAction的?/title><link>http://m.tkk7.com/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://m.tkk7.com/grantbb/archive/2005/12/23/25244.html</guid><wfw:comment>http://m.tkk7.com/grantbb/comments/25244.html</wfw:comment><comments>http://m.tkk7.com/grantbb/archive/2005/12/23/25244.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.tkk7.com/grantbb/comments/commentRss/25244.html</wfw:commentRss><trackback:ping>http://m.tkk7.com/grantbb/services/trackbacks/25244.html</trackback:ping><description><![CDATA[1.自从Struts 1.2.6版本Q就出现了DownloadActionc,主要是用于处理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'">l承</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'">然后实现Q?/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'">ҎQ该Ҏ用于q回文g或者流的信息?/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">            </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'">可以覆盖Q?/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'">ҎQ用于自定义?/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'">传输数据的缓冲区大小Q?/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'">代表着不同的抽象信息Q定义了两个ҎQ?/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">       </SPAN>public abstract String getContentType();//</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">得到下蝲文g?/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'">cd</SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-tab-count: 1">       </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'">当然Q我们自p可以实现自己特定的类Q比如从数据库中取得的c,或者从</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'">取得文g的流的类?/SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US> <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">下面写一个简单的覆盖</SPAN><SPAN lang=EN-US>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'">囄Q?/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">        </SPAN>response.setHeader("Content-disposition",</SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">        </SPAN><SPAN style="mso-tab-count: 1">       </SPAN><SPAN style="mso-tab-count: 1">      </SPAN>"attachment; filename=" + "bbg2.gif");//</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">讄文g名称</SPAN></P> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">        </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">        </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">使用非常方便Q而且能够保持E序一致的l构。原来我开发的pȝ中下载都是统一使用</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">q需要单独的Ҏ来获取相应的服务层的</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">Q?/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">之后Q所有的</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">q行理的,非常方便?/SPAN><img src ="http://m.tkk7.com/grantbb/aggbug/25244.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/grantbb/" target="_blank">我不是张嘎-兵</a> 2005-12-23 17:13 <a href="http://m.tkk7.com/grantbb/archive/2005/12/23/25244.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>在Spring的项目中配置Log4jhttp://m.tkk7.com/grantbb/archive/2005/09/15/13103.html我不是张嘎-兵我不是张嘎-兵Thu, 15 Sep 2005 09:54:00 GMThttp://m.tkk7.com/grantbb/archive/2005/09/15/13103.htmlhttp://m.tkk7.com/grantbb/comments/13103.htmlhttp://m.tkk7.com/grantbb/archive/2005/09/15/13103.html#Feedback1http://m.tkk7.com/grantbb/comments/commentRss/13103.htmlhttp://m.tkk7.com/grantbb/services/trackbacks/13103.html1.在classpath的根目录下面不放|log4j.properties
在用junit本地试的时候会提示Q?

log4j:WARN No appenders could be found for logger (org.springframework.beans.factory.access.SingletonBeanFactoryLocator).
log4j:WARN Please initialize the log4j system properly.

然后我们是看不到spring加蝲bean的配|信息的?BR>在classpath路径下加入:log4j.propertiesQ则能够昄bean的加载信?/FONT>

2. 在web应用中ؓSpring配置log4j
Spring的做法是使用一个Servlet ListenerQ在Web Container启动时把ROOT的绝对\径写到系l变量里Q这样log4j的配|文仉可以用${myAppfuse.root}来表C刚刚设q去的系l变量:log4j.appender.logfile.File=${myAppfuse.root}/logs/mylog.log
在Web.xml中配|语句如下:

<!--如果不设Q默认ؓweb.root,但最好设|,以免目间冲H?->
<context-param>    
 <param-name>webAppRootKey</param-name>     
 <param-value>myappfuse.root</param-value>
</context-param>
<context-param>  
 <param-name>log4jConfigLocation</param-name>  
 <param-value>/WEB-INF/classes/log4j.properties</param-value>
</context-param>
<listener>  
 <listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
</listener>
q里配置了一个listenerQ也可以配置servlet:
<servlet>
  <servlet-name>log4j</servlet-name>
  <servlet-class>
   org.springframework.web.util.Log4jConfigServlet
  </servlet-class>
  <load-on-startup>1</load-on-startup>
 </servlet>
配置好了以后我们可以在当前应用的logs目录下找到日志记录文Ӟmylog.log
属性log4jConfigLocation的值徏议还是设|ؓQ?WEB-INF/classes/log4j.propertiesQ这h们在不启动web应用的时候,做一些测试这能够正确地记录日志信息?/P>

]]>
使用JK配置Tomcat的中文问?/title><link>http://m.tkk7.com/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://m.tkk7.com/grantbb/archive/2005/09/07/12317.html</guid><wfw:comment>http://m.tkk7.com/grantbb/comments/12317.html</wfw:comment><comments>http://m.tkk7.com/grantbb/archive/2005/09/07/12317.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.tkk7.com/grantbb/comments/commentRss/12317.html</wfw:commentRss><trackback:ping>http://m.tkk7.com/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=宋体>行了短暂的旉现在又要停止更新了,主要原因是没有h感兴,使用配置h太麻烦?/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=宋体>Q但是L发生链接p|的错误,后果非常严重。然后我们又换了Q?/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=宋体>Q新版)Q此Ӟ?/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=宋体>带有中文参数的时候就会出Cؕ码?/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=宋体>接下来我们升U了</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=宋体>的版本,采用的组合是Q?/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">q样再通过以下的三步就可以Q解x有的中文乱麻问题?/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'">      </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">面Q?/SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; COLOR: #0000aa; FONT-FAMILY: Verdana; mso-bidi-font-size: 12.0pt"><%@ page contentType="text/html;charset=gb2312"%><?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'">      </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">加过滤器Q?/SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana; mso-bidi-font-size: 12.0pt"><BR><filter><BR><filter-name>Set Character Encoding</filter-name><BR><filter-<B>class</B>>filters.SetCharacterEncodingFilter</filter-<B>class</B>><BR><init-param><BR><param-name>encoding</param-name><BR><param-value>GBK</param-value><BR></init-param><BR></filter><BR><BR><filter-mapping><BR><filter-name>Set Character Encoding</filter-name><BR><url-pattern><SPAN style="COLOR: #0000aa">/*</url-pattern><BR></filter-mapping></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'">      </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">文g</SPAN><SPAN lang=EN-US style="FONT-SIZE: 9pt; FONT-FAMILY: Verdana; mso-bidi-font-size: 12.0pt"><BR><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">               </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">               </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">               </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">  </SPAN><SPAN style="COLOR: red">URIEncoding="GBK" </SPAN>/><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">       </SPAN><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">               </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">  </SPAN><SPAN style="COLOR: red">URIEncoding="GBK"</SPAN> /></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">提示Q如果采?/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">的方式整合,只需要在W二?/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">处修改即可。可能在某些环境下两个地斚w需要设|,好多|上的教E都是两个地斚w需要设|,我实际操作告诉我只要加第二个?/SPAN><img src ="http://m.tkk7.com/grantbb/aggbug/12317.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/grantbb/" target="_blank">我不是张嘎-兵</a> 2005-09-07 15:26 <a href="http://m.tkk7.com/grantbb/archive/2005/09/07/12317.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>使用Commons DigesterL解析RSShttp://m.tkk7.com/grantbb/archive/2005/09/07/12315.html我不是张嘎-兵我不是张嘎-兵Wed, 07 Sep 2005 07:07:00 GMThttp://m.tkk7.com/grantbb/archive/2005/09/07/12315.htmlhttp://m.tkk7.com/grantbb/comments/12315.htmlhttp://m.tkk7.com/grantbb/archive/2005/09/07/12315.html#Feedback0http://m.tkk7.com/grantbb/comments/commentRss/12315.htmlhttp://m.tkk7.com/grantbb/services/trackbacks/12315.html在学习Struts的exampleQtiles-documentation应用的时候,发现了用Commons Digesterlg可以L的实现对rss的解析,解析完成之后会自动生成一个Channel对象Q用v来非常简单方便,所以想想以后有旉一定好好研读Commons里面的开源项目?BR>写个单的试E序如下Q?BR>import java.io.IOException;

import org.apache.commons.digester.rss.Channel;
import org.apache.commons.digester.rss.RSSDigester;
import org.xml.sax.SAXException;

/**
 * @author bing.xie
 *
 */
public class ParseRssChannel {
 public static void main(String[] args) {
  String url = "  RSSDigester digester = new RSSDigester();
  try {
   Channel obj = (Channel) digester.parse(url);
   System.out.println(obj.getTitle());
  } catch (IOException e) {
   e.printStackTrace();
  } catch (SAXException e) {
   e.printStackTrace();
  }
 }
}
q样真的是很方便。这只是抛砖引玉,希望大家共同发掘Q?BR>



]]>
վ֩ģ壺 츾AV| ˳ɴƬ߹ۿ| Ʒѹۿþ| ޾ƷƬ| ɫվwwwһ| 99ѹƷ| ͵͵߳վý| ޳777777Ʒ| պƷһ| ˳www߲| Ʒxxxxˮ޹Ʒþһ | ĻƵ| ۹һ| Ʒ_˳߸| 69˳鶹Ƶ| ԻȫƵѿ| ޻ɫվƵ| ˵va| jyzzjyzz鶹| պ߹ۿƵ| ˾Ʒձר| ޾Ʒ| AV| ѳ˸Ƶ| avպר߹ۿ| ޹Ʒþþþ| ߲Ѳ| ѲƵ| ؼAƬëƬѿ| ˾Ʒձ | Ƶ˳߲| պav| þŮƵ| ؼëƬȫѲ| պŷƷ| ۺһƷ| þŷ޹ۺ| ƷۺһƵ| ƵƷѹۿ99| þþþùƷѿ | ҹѸ|