﻿<?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/chelsea/</link><description /><language>zh-cn</language><lastBuildDate>Sun, 07 Sep 2008 14:43:04 GMT</lastBuildDate><pubDate>Sun, 07 Sep 2008 14:43:04 GMT</pubDate><ttl>60</ttl><item><title>敏捷质疑: 结对编程, 代码集体所有权</title><link>http://www.blogjava.net/chelsea/archive/2008/07/27/217886.html</link><dc:creator>切尔斯基</dc:creator><author>切尔斯基</author><pubDate>Sun, 27 Jul 2008 14:25:00 GMT</pubDate><guid>http://www.blogjava.net/chelsea/archive/2008/07/27/217886.html</guid><wfw:comment>http://www.blogjava.net/chelsea/comments/217886.html</wfw:comment><comments>http://www.blogjava.net/chelsea/archive/2008/07/27/217886.html#Feedback</comments><slash:comments>6</slash:comments><wfw:commentRss>http://www.blogjava.net/chelsea/comments/commentRss/217886.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/chelsea/services/trackbacks/217886.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: Q: 结对编程、责任共享，完全是胡说，代码找不到作者，开发人员哪里会有责任心! <br><br>Q: 我干嘛要把辛辛苦苦很多年积累的经验白白告诉别人? 我喜欢不可替代的感觉.<br><br>Q: 有些老手不喜欢结对, 觉得新人不劳而获对他们不利, 不情愿, 怎么办?<br><br>Q: 那互不相让怎么办?<br><br>Q: 我想修改某段代码, 想找原作者了解一下思路, 可根本不知道是谁&nbsp;&nbsp;<a href='http://www.blogjava.net/chelsea/archive/2008/07/27/217886.html'>阅读全文</a><img src ="http://www.blogjava.net/chelsea/aggbug/217886.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/chelsea/" target="_blank">切尔斯基</a> 2008-07-27 22:25 <a href="http://www.blogjava.net/chelsea/archive/2008/07/27/217886.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>敏捷质疑: 持续集成</title><link>http://www.blogjava.net/chelsea/archive/2008/07/20/216246.html</link><dc:creator>切尔斯基</dc:creator><author>切尔斯基</author><pubDate>Sun, 20 Jul 2008 13:55:00 GMT</pubDate><guid>http://www.blogjava.net/chelsea/archive/2008/07/20/216246.html</guid><wfw:comment>http://www.blogjava.net/chelsea/comments/216246.html</wfw:comment><comments>http://www.blogjava.net/chelsea/archive/2008/07/20/216246.html#Feedback</comments><slash:comments>6</slash:comments><wfw:commentRss>http://www.blogjava.net/chelsea/comments/commentRss/216246.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/chelsea/services/trackbacks/216246.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: Q: 我的产品是电信级的设备, 几百人分成几十个项目组在开发, 各个项目组进度不统一, 如何集成?<br>Q: CI的愿景是好的, 但我们这里根本不可能, 我们的产品需要复杂的运行环境, 运行时需要人工干预, 怎么测?&nbsp;&nbsp;<a href='http://www.blogjava.net/chelsea/archive/2008/07/20/216246.html'>阅读全文</a><img src ="http://www.blogjava.net/chelsea/aggbug/216246.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/chelsea/" target="_blank">切尔斯基</a> 2008-07-20 21:55 <a href="http://www.blogjava.net/chelsea/archive/2008/07/20/216246.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>敏捷质疑: TDD</title><link>http://www.blogjava.net/chelsea/archive/2008/07/13/214623.html</link><dc:creator>切尔斯基</dc:creator><author>切尔斯基</author><pubDate>Sun, 13 Jul 2008 13:40:00 GMT</pubDate><guid>http://www.blogjava.net/chelsea/archive/2008/07/13/214623.html</guid><wfw:comment>http://www.blogjava.net/chelsea/comments/214623.html</wfw:comment><comments>http://www.blogjava.net/chelsea/archive/2008/07/13/214623.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.blogjava.net/chelsea/comments/commentRss/214623.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/chelsea/services/trackbacks/214623.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: Q: 为什么通过单元测试发现的 Bug 很少 ?<br><br>Q: 你们说验收测试应该由客户来编写, 可在我们这里根本不可能.<br>&nbsp;&nbsp;<a href='http://www.blogjava.net/chelsea/archive/2008/07/13/214623.html'>阅读全文</a><img src ="http://www.blogjava.net/chelsea/aggbug/214623.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/chelsea/" target="_blank">切尔斯基</a> 2008-07-13 21:40 <a href="http://www.blogjava.net/chelsea/archive/2008/07/13/214623.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>假冒的艺术</title><link>http://www.blogjava.net/chelsea/archive/2008/07/07/213168.html</link><dc:creator>切尔斯基</dc:creator><author>切尔斯基</author><pubDate>Mon, 07 Jul 2008 14:14:00 GMT</pubDate><guid>http://www.blogjava.net/chelsea/archive/2008/07/07/213168.html</guid><wfw:comment>http://www.blogjava.net/chelsea/comments/213168.html</wfw:comment><comments>http://www.blogjava.net/chelsea/archive/2008/07/07/213168.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/chelsea/comments/commentRss/213168.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/chelsea/services/trackbacks/213168.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: Working Effectively with Legacy Code&nbsp;&nbsp;<a href='http://www.blogjava.net/chelsea/archive/2008/07/07/213168.html'>阅读全文</a><img src ="http://www.blogjava.net/chelsea/aggbug/213168.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/chelsea/" target="_blank">切尔斯基</a> 2008-07-07 22:14 <a href="http://www.blogjava.net/chelsea/archive/2008/07/07/213168.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>CruiseControl Enterprise 最佳实践 (6) : Scaling up</title><link>http://www.blogjava.net/chelsea/archive/2008/04/12/192481.html</link><dc:creator>切尔斯基</dc:creator><author>切尔斯基</author><pubDate>Sat, 12 Apr 2008 15:09:00 GMT</pubDate><guid>http://www.blogjava.net/chelsea/archive/2008/04/12/192481.html</guid><wfw:comment>http://www.blogjava.net/chelsea/comments/192481.html</wfw:comment><comments>http://www.blogjava.net/chelsea/archive/2008/04/12/192481.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/chelsea/comments/commentRss/192481.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/chelsea/services/trackbacks/192481.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 挖掘你 CI server 的能力&nbsp;&nbsp;<a href='http://www.blogjava.net/chelsea/archive/2008/04/12/192481.html'>阅读全文</a><img src ="http://www.blogjava.net/chelsea/aggbug/192481.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/chelsea/" target="_blank">切尔斯基</a> 2008-04-12 23:09 <a href="http://www.blogjava.net/chelsea/archive/2008/04/12/192481.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>CruiseControl Enterprise 最佳实践 (5) : Refactor your configuration file</title><link>http://www.blogjava.net/chelsea/archive/2008/03/06/184374.html</link><dc:creator>切尔斯基</dc:creator><author>切尔斯基</author><pubDate>Thu, 06 Mar 2008 15:26:00 GMT</pubDate><guid>http://www.blogjava.net/chelsea/archive/2008/03/06/184374.html</guid><wfw:comment>http://www.blogjava.net/chelsea/comments/184374.html</wfw:comment><comments>http://www.blogjava.net/chelsea/archive/2008/03/06/184374.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/chelsea/comments/commentRss/184374.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/chelsea/services/trackbacks/184374.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 希望这能帮助让你的CruiseControl的配置文件更容易维护. 我相信持续集成应该很简单, 即使这会让我失业.&nbsp;&nbsp;<a href='http://www.blogjava.net/chelsea/archive/2008/03/06/184374.html'>阅读全文</a><img src ="http://www.blogjava.net/chelsea/aggbug/184374.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/chelsea/" target="_blank">切尔斯基</a> 2008-03-06 23:26 <a href="http://www.blogjava.net/chelsea/archive/2008/03/06/184374.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>CruiseControl Enterprise 最佳实践 (4) : Bootstrap with a Bootstrapper</title><link>http://www.blogjava.net/chelsea/archive/2008/02/17/180326.html</link><dc:creator>切尔斯基</dc:creator><author>切尔斯基</author><pubDate>Sun, 17 Feb 2008 08:09:00 GMT</pubDate><guid>http://www.blogjava.net/chelsea/archive/2008/02/17/180326.html</guid><wfw:comment>http://www.blogjava.net/chelsea/comments/180326.html</wfw:comment><comments>http://www.blogjava.net/chelsea/archive/2008/02/17/180326.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.blogjava.net/chelsea/comments/commentRss/180326.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/chelsea/services/trackbacks/180326.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 突然之间多了点对你的构建破坏者同事们的容忍, 你盯着那个 build.xml, 它依然显示在你的IDE里面. 就是它了, 文件结尾处有一个多余的大大的 '#' 号&nbsp;&nbsp;<a href='http://www.blogjava.net/chelsea/archive/2008/02/17/180326.html'>阅读全文</a><img src ="http://www.blogjava.net/chelsea/aggbug/180326.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/chelsea/" target="_blank">切尔斯基</a> 2008-02-17 16:09 <a href="http://www.blogjava.net/chelsea/archive/2008/02/17/180326.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Ant: 大规模应用中的应用</title><link>http://www.blogjava.net/chelsea/archive/2008/01/12/174901.html</link><dc:creator>切尔斯基</dc:creator><author>切尔斯基</author><pubDate>Sat, 12 Jan 2008 14:03:00 GMT</pubDate><guid>http://www.blogjava.net/chelsea/archive/2008/01/12/174901.html</guid><wfw:comment>http://www.blogjava.net/chelsea/comments/174901.html</wfw:comment><comments>http://www.blogjava.net/chelsea/archive/2008/01/12/174901.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/chelsea/comments/commentRss/174901.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/chelsea/services/trackbacks/174901.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: Ant脚本如何适应大规模的项目, Large Scale 的项目意味着: 目录较多, 层次较深 依赖较多, 构建脚本依赖的第三方Ant Task, 项目依赖的第三方库等 测试较多, 构建时间反馈周期较长 需要在不同操作系统上运行 需要在不同团队成员的机器上运行 Ant脚本较长如何维护&nbsp;&nbsp;<a href='http://www.blogjava.net/chelsea/archive/2008/01/12/174901.html'>阅读全文</a><img src ="http://www.blogjava.net/chelsea/aggbug/174901.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/chelsea/" target="_blank">切尔斯基</a> 2008-01-12 22:03 <a href="http://www.blogjava.net/chelsea/archive/2008/01/12/174901.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>CruiseControl 的 108 种调度模式</title><link>http://www.blogjava.net/chelsea/archive/2008/01/05/173004.html</link><dc:creator>切尔斯基</dc:creator><author>切尔斯基</author><pubDate>Sat, 05 Jan 2008 10:29:00 GMT</pubDate><guid>http://www.blogjava.net/chelsea/archive/2008/01/05/173004.html</guid><wfw:comment>http://www.blogjava.net/chelsea/comments/173004.html</wfw:comment><comments>http://www.blogjava.net/chelsea/archive/2008/01/05/173004.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/chelsea/comments/commentRss/173004.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/chelsea/services/trackbacks/173004.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: "拥抱变化" 是敏捷的态度之一, CruiseControl 正是来实证这种态度的作品. 多种类型的"变化"都会触发CruiseControl的一次构建过程.<br><br><br>我们知道CruiseControl能根据源代码的变化来调度一次构建, 但你知道CruiseControl支持多少种调度模式吗?<br>&nbsp;&nbsp;<a href='http://www.blogjava.net/chelsea/archive/2008/01/05/173004.html'>阅读全文</a><img src ="http://www.blogjava.net/chelsea/aggbug/173004.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/chelsea/" target="_blank">切尔斯基</a> 2008-01-05 18:29 <a href="http://www.blogjava.net/chelsea/archive/2008/01/05/173004.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Ivy: 搭建本地仓库</title><link>http://www.blogjava.net/chelsea/archive/2007/12/23/169880.html</link><dc:creator>切尔斯基</dc:creator><author>切尔斯基</author><pubDate>Sun, 23 Dec 2007 15:22:00 GMT</pubDate><guid>http://www.blogjava.net/chelsea/archive/2007/12/23/169880.html</guid><wfw:comment>http://www.blogjava.net/chelsea/comments/169880.html</wfw:comment><comments>http://www.blogjava.net/chelsea/archive/2007/12/23/169880.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/chelsea/comments/commentRss/169880.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/chelsea/services/trackbacks/169880.html</trackback:ping><description><![CDATA[<p>基本上, 搭建一个本地的ivy仓库, 包含两件独立的事情: 搭建仓库本身, 和配置如何使用这个仓库</p>
<h3>仓库本身</h3>
<p>Ivy的Repository是由一个个Module组成的, Module则包含自身的artifacts(通常是jar文件)和描述文件.</p>
<p>Module的描述文件是ivy的核心, 里面记录了这个module包含哪些artifacts和这个module对其它module的依赖. 这样就能顺藤摸瓜,
牵出所有的依赖来</p>
<blockquote>
<p align="left"><font color="#008080" size="2">&lt;</font><font color="#3f7f7f" size="2">ivy-module </font>
<font color="#7f007f" size="2">version</font><font size="2">=</font><font color="#2a00ff" size="2">"1.0"</font><font color="#008080" size="2">&gt;</font></p>
<p align="left"><font color="#008080" size="2">&lt;</font><font color="#3f7f7f" size="2">info
</font><font color="#7f007f" size="2">organisation</font><font size="2">=</font><font color="#2a00ff" size="2">"your.company"
</font><font color="#7f007f" size="2">module</font><font size="2">=</font><font color="#2a00ff" size="2">"your.project"
</font><font color="#008080" size="2">/&gt;</font></p>
<p align="left"><font color="#008080" size="2">&lt;</font><font color="#3f7f7f" size="2">configurations</font><font color="#008080" size="2">&gt;</font></p>
<blockquote>
<p align="left"><font color="#008080" size="2">&lt;</font><font color="#3f7f7f" size="2">conf
</font><font color="#7f007f" size="2">name</font><font size="2">=</font><font color="#2a00ff" size="2">"release"
</font><font color="#008080" size="2">/&gt;</font></p>
<p align="left"><font color="#008080" size="2">&lt;</font><font color="#3f7f7f" size="2">conf
</font><font color="#7f007f" size="2">name</font><font size="2">=</font><font color="#2a00ff" size="2">"testing"
</font><font color="#7f007f" size="2">extends</font><font size="2">=</font><font color="#2a00ff" size="2">"release"
</font><font color="#008080" size="2">/&gt;</font></p>
</blockquote>
<p align="left"><font color="#008080" size="2">&lt;/</font><font color="#3f7f7f" size="2">configurations</font><font color="#008080" size="2">&gt;</font></p>
<p align="left"><font color="#008080" size="2">&lt;</font><font color="#3f7f7f" size="2">publications</font><font color="#008080" size="2">&gt;</font></p>
<blockquote>
<p align="left"><font color="#008080" size="2">&lt;</font><font color="#3f7f7f" size="2">artifact
</font><font color="#7f007f" size="2">name</font><font size="2">=</font><font color="#2a00ff" size="2">"common"
</font><font color="#008080" size="2">/&gt;</font></p>
<p align="left"><font color="#008080" size="2">&lt;</font><font color="#3f7f7f" size="2">artifact
</font><font color="#7f007f" size="2">name</font><font size="2">=</font><font color="#2a00ff" size="2">"client"
</font><font color="#008080" size="2">/&gt;</font></p>
<p align="left"><font color="#008080" size="2">&lt;</font><font color="#3f7f7f" size="2">artifact
</font><font color="#7f007f" size="2">name</font><font size="2">=</font><font color="#2a00ff" size="2">"server"
</font><font color="#008080" size="2">/&gt;</font></p>
</blockquote>
<p align="left"><font color="#008080" size="2">&lt;/</font><font color="#3f7f7f" size="2">publications</font><font color="#008080" size="2">&gt;</font></p>
<p align="left"><font color="#008080" size="2">&lt;</font><font color="#3f7f7f" size="2">dependencies
</font><font color="#7f007f" size="2">defaultconf</font><font size="2">=</font><font color="#2a00ff" size="2">"release-&gt;default"</font><font color="#008080" size="2">&gt;</font></p>
<blockquote>
<p align="left"><font color="#008080" size="2">&lt;</font><font color="#3f7f7f" size="2">dependency
</font><font color="#7f007f" size="2">name</font><font size="2">=</font><font color="#2a00ff" size="2">"ant"
</font><font color="#7f007f" size="2">rev</font><font size="2">=</font><font color="#2a00ff" size="2">"1.7.0"
</font><font color="#008080" size="2">/&gt;</font></p>
<p align="left"><font color="#008080" size="2">&lt;</font><font color="#3f7f7f" size="2">dependency
</font><font color="#7f007f" size="2">name</font><font size="2">=</font><font color="#2a00ff" size="2">"antlr"
</font><font color="#7f007f" size="2">rev</font><font size="2">=</font><font color="#2a00ff" size="2">"2.7.6"
</font><font color="#008080" size="2">/&gt;</font></p>
<p align="left"><font color="#008080" size="2">&lt;</font><font color="#3f7f7f" size="2">dependency
</font><font color="#7f007f" size="2">name</font><font size="2">=</font><font color="#2a00ff" size="2">"xstream"
</font><font color="#7f007f" size="2">rev</font><font size="2">=</font><font color="#2a00ff" size="2">"1.2.2"
</font><font color="#008080" size="2">/&gt;</font></p>
</blockquote>
<p align="left"><font color="#008080" size="2">&lt;/</font><font color="#3f7f7f" size="2">dependencies</font><font color="#008080" size="2">&gt;</font></p>
<p><font color="#008080" size="2">&lt;/</font><font color="#3f7f7f" size="2">ivy-module</font><font color="#008080" size="2">&gt;</font></p>
</blockquote>
<font size="2">
<p>仓库在文件系统上的结构, 可以由你自己决定, 只要在使用这个仓库时, 把它的布局信息用配置文件描述出来告诉使用者就可以了</p>
<h3>如何使用这个仓库</h3>
<p>基本上, 我们借助 Ant 来使用ivy, 那么我们需要告诉 Ant 一些repository相关的信息 : Where is the local repository,
and How it looks like</p>
<blockquote>
<p><font color="#008080" size="2">&lt;</font><font color="#3f7f7f" size="2">property </font>
<font color="#7f007f" size="2">name</font><font size="2">=</font><font color="#2a00ff" size="2">"ivy.local.default.root"
</font><font color="#7f007f" size="2">location</font><font size="2">=</font><font color="#2a00ff" size="2">"/your/local/ivy/repository/folder"
</font><font color="#008080" size="2">/&gt;</font></p>
<p><font color="#008080" size="2">&lt;</font><font color="#3f7f7f" size="2">ivy:settings </font>
<font color="#7f007f" size="2">id</font><font size="2">=</font><font color="#2a00ff" size="2">"ivy.instance"
</font><font color="#7f007f" size="2">file</font><font size="2">=</font><font color="#2a00ff" size="2">"${ivy.local.default.root}/ivy.repository.settings.xml"
</font><font color="#008080" size="2">/&gt;</font></p>
</blockquote>
<p>那个<font color="#2a00ff" size="2">ivy.repository.settings.xml</font>就是来描述repository的布局的:</p>
<blockquote>
<p align="left"><font color="#008080" size="2">&lt;</font><font color="#3f7f7f" size="2">ivysettings</font><font color="#008080" size="2">&gt;</font></p>
<blockquote>
<p align="left"><font color="#008080" size="2">&lt;</font><font color="#3f7f7f" size="2">settings
</font><font color="#7f007f" size="2">defaultResolver</font>=<font color="#2a00ff" size="2">"local"
</font><font color="#008080" size="2">/&gt;</font></p>
<p align="left"><font color="#008080" size="2">&lt;</font><font color="#3f7f7f" size="2">resolvers</font><font color="#008080" size="2">&gt;</font></p>
<blockquote>
<p align="left"><font color="#008080" size="2">&lt;</font><font color="#3f7f7f" size="2">filesystem
</font><font color="#7f007f" size="2">name</font>=<font color="#2a00ff" size="2">"local"
</font><font color="#7f007f" size="2">checkmodified</font>=<font color="#2a00ff" size="2">"true"</font><font color="#008080" size="2">&gt;</font></p>
<blockquote>
<p align="left"><font color="#008080" size="2">&lt;</font><font color="#3f7f7f" size="2">artifact
</font><font color="#7f007f" size="2">pattern</font><font size="2">=</font><font color="#2a00ff" size="2">"${ivy.local.default.root}/[module]/[artifact].jar"
</font><font color="#008080" size="2">/&gt;</font></p>
<p align="left"><font color="#008080" size="2">&lt;</font><font color="#3f7f7f" size="2">artifact
</font><font color="#7f007f" size="2">pattern</font><font size="2">=</font><font color="#2a00ff" size="2">"${ivy.local.default.root}/[module]/[artifact]-[revision].jar"
</font><font color="#008080" size="2">/&gt;</font></p>
<p align="left"><font color="#008080" size="2">&lt;</font><font color="#3f7f7f" size="2">ivy
</font><font color="#7f007f" size="2">pattern</font><font size="2">=</font><font color="#2a00ff" size="2">"${ivy.local.default.root}/[module]/[module]-dependencies.xml"
</font><font color="#008080" size="2">/&gt;</font></p>
</blockquote>
<p align="left"><font color="#008080" size="2">&lt;/</font><font color="#3f7f7f" size="2">filesystem</font><font color="#008080" size="2">&gt;</font></p>
</blockquote>
<p align="left"><font color="#008080" size="2">&lt;/</font><font color="#3f7f7f" size="2">resolvers</font><font color="#008080" size="2">&gt;</font></p>
</blockquote>
<p align="left"><font color="#008080" size="2">&lt;/</font><font color="#3f7f7f" size="2">ivysettings</font><font color="#008080" size="2">&gt;</font></p>
</blockquote>
<p align="left">然后你告诉 Ant 你的项目的依赖和artifacts, Ant就可以帮你获得依赖和发布artifacts了</p>
<blockquote>
<p align="left"><font color="#008080" size="2">&lt;</font><font color="#3f7f7f" size="2">property
</font><font color="#7f007f" size="2">name</font>=<font color="#2a00ff" size="2">"ivy.dep.file"
</font><font color="#7f007f" size="2">location</font>=<font color="#2a00ff" size="2">"${basedir}/my-module-dependencies.xml"
</font><font color="#008080" size="2">/&gt;</font></p>
<p align="left"><font color="#008080" size="2">&lt;</font><font color="#3f7f7f" size="2">ivy:retrieve
</font><font color="#008080" size="2">/&gt;</font></p>
<p align="left"><font color="#008080">&lt;!-- </font>
<font color="#3f7f7f" size="2">retrieve dependencies first, then </font>
<font color="#008080">compile, package, ... then publish--&gt;</font></p>
<p align="left"><font color="#000080" size="2">&lt;ivy:publish</font>
<font color="#000080" size="2">resolver=</font><font color="#008000" size="2">"local"</font>
<font color="#000080" size="2">pubrevision=</font><font color="#008000" size="2">"1.0"</font>
<font color="#000080" size="2">overwrite=</font><font color="#008000" size="2">"true"</font>
<font color="#000080" size="2">forcedeliver=</font><font color="#008000" size="2">"true"</font><font color="#000080" size="2">&gt;</font></p>
<blockquote>
<p align="left"><font color="#000080" size="2">&lt;artifacts</font>
<font color="#000080" size="2">pattern=</font><font color="#008000" size="2">"${build.dir}/dist/[artifact].[ext]"</font>
<font color="#000080" size="2">/&gt;</font></p>
<p align="left"><font color="#000080" size="2">&lt;artifacts</font>
<font color="#000080" size="2">pattern=</font><font color="#008000" size="2">"${basedir}/my-module-dependencies.xml"</font>
<font color="#000080" size="2">/&gt;</font></p>
</blockquote>
<p align="left"><font color="#000080" size="2">&lt;/ivy:publish&gt;</font></p>
</blockquote>
<p align="left">那个<font color="#2a00ff" size="2">my-module-dependencies.xml</font>就是你的项目的依赖描述符,
事实上ivy也将它看作一个module,和repository里的module一视同仁. 参考最开始的例子.</p>
<h3 align="left">Ivy 如何解决我们的问题</h3>
<p align="left">Q: 我的项目在开发环境和产品环境有不同的依赖, 怎么办?</p>
<p align="left">A: Ivy 提供了"configuration" 的概念. 在那个<font color="#2a00ff" size="2">my-module-dependencies.xml</font>中,
你可以为你的module定义development和product两种配置, 可以指定每个artifact隶属于哪个配置, 指定每个dependency属于哪个配置.
注意这是一个递归定义, 因为你依赖的module也有可能定义了多个配置, 你需要指定你依赖于依赖的哪个配置,所以这是一个映射. 比如你的产品在运行环境中依赖于spring的产品环境:</p>
<blockquote>
<p align="left"><font color="#008080" size="2">&lt;</font><font color="#3f7f7f" size="2">ivy-module </font>
<font color="#7f007f" size="2">version</font><font size="2">=</font><font color="#2a00ff" size="2">"1.0"</font><font color="#008080" size="2">&gt;</font></p>
<p align="left"><font size="2"><font color="#008080" size="2">&lt;</font><font color="#3f7f7f" size="2">info
</font><font color="#7f007f" size="2">organisation</font><font size="2">=</font><font color="#2a00ff" size="2">"your.company"
</font><font color="#7f007f" size="2">module</font><font size="2">=</font><font color="#2a00ff" size="2">"your.project"
</font><font color="#008080" size="2">/&gt;</font></font></p>
<p align="left"><font size="2"><font size="2"><font color="#008080" size="2">&lt;</font><font color="#3f7f7f" size="2">configurations</font><font color="#008080" size="2">&gt;</font></font></font></p>
<blockquote>
<p align="left"><font size="2"><font size="2"><font size="2"><font color="#008080" size="2">&lt;</font><font color="#3f7f7f" size="2">conf
</font><font color="#7f007f" size="2">name</font><font size="2">=</font><font color="#2a00ff" size="2">"product"
</font><font color="#008080" size="2">/&gt;</font></font></font></font></p>
<p align="left"><font size="2"><font size="2"><font size="2"><font size="2"><font color="#008080" size="2">&lt;</font><font color="#3f7f7f" size="2">conf
</font><font color="#7f007f" size="2">name</font><font size="2">=</font><font color="#2a00ff" size="2">"development"
</font><font color="#008080" size="2">/&gt;</font></font></font></font></font></p>
</blockquote>
<p align="left"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font color="#008080" size="2">&lt;/</font><font color="#3f7f7f" size="2">configurations</font><font color="#008080" size="2">&gt;</font></font></font></font></font></font></p>
<p align="left"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font color="#008080" size="2">&lt;</font><font color="#3f7f7f" size="2">dependencies
</font><font color="#7f007f" size="2">defaultconf</font><font size="2">=</font><font color="#2a00ff" size="2">"product-&gt;default"</font><font color="#008080" size="2">&gt;</font></font></font></font></font></font></font></p>
<blockquote>
<p align="left"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font color="#008080" size="2">&lt;</font><font color="#3f7f7f" size="2">dependency
</font><font color="#7f007f" size="2">name</font><font size="2">=</font><font color="#2a00ff" size="2">"spring"
</font><font color="#7f007f" size="2">rev</font><font size="2">=</font><font color="#2a00ff" size="2">"1.7.0"</font><font color="#7f007f" size="2">
<strong>conf</strong></font><strong><font size="2">=</font></strong><font color="#2a00ff" size="2"><strong>"release-&gt;product"</strong>
</font><font color="#008080" size="2">/&gt;</font></font></font></font></font></font></font></font></p>
<p align="left"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font color="#008080" size="2">&lt;</font><font color="#3f7f7f" size="2">dependency
</font><font color="#7f007f" size="2">name</font><font size="2">=</font><font color="#2a00ff" size="2">"antlr"
</font><font color="#7f007f" size="2">rev</font><font size="2">=</font><font color="#2a00ff" size="2">"2.7.6"
</font><font size="2"><font color="#7f007f" size="2">conf</font>=<font color="#2a00ff" size="2">"development-&gt;debug"
</font><font color="#008080" size="2">/&gt;</font></font></font></font></font></font></font></font></font></font></p>
<p align="left"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font color="#008080" size="2">&lt;</font><font color="#3f7f7f" size="2">dependency
</font><font color="#7f007f" size="2">name</font><font size="2">=</font><font color="#2a00ff" size="2">"junit"
</font><font color="#7f007f" size="2">rev</font><font size="2">=</font><font color="#2a00ff" size="2">"4.4"
</font><font size="2"><font color="#7f007f" size="2">conf</font>=<font color="#2a00ff" size="2">"development-&gt;release"
</font><font color="#008080" size="2">/&gt;</font></font></font></font></font></font></font></font></font></font></font></p>
</blockquote>
<p align="left"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font color="#008080" size="2">&lt;/</font><font color="#3f7f7f" size="2">dependencies</font><font color="#008080" size="2">&gt;</font></font></font></font></font></font></font></font></font></font></font></p>
<p><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font color="#008080" size="2">&lt;/</font><font color="#3f7f7f" size="2">ivy-module</font><font color="#008080" size="2">&gt;</font></font></font></font></font></font></font></font></font></font></font></p>
</blockquote>
<p><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2">ivy 的各个Ant task允许你指定在哪个<font color="#3f7f7f" size="2"> configuration </font>上操作;
如为product配置取得所有依赖:</font></font></font></font></font></font></font></font></font></font></p>
<p><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font color="#008080" size="2">&nbsp;&nbsp;&nbsp; &lt;</font><font color="#3f7f7f" size="2">ivy:retrieve </font>
<font color="#7f007f" size="2">conf</font><font size="2">=</font><font color="#2a00ff" size="2">"product"
</font><font color="#008080" size="2">/&gt;</font></font></font></font></font></font></font></font></font></font></font></p>
<p><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2">Q: 我的项目在开发环境和产品环境有太多相同的依赖, 事实上开发环境包含产品环境所有的依赖, 额外再加上junit,jmock等; 如何消除重复的依赖描述呢?</font></font></font></font></font></font></font></font></font></font></p>
<p><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2">A: Ivy 提供了配置之间 "extends" , 也就是"继承"的概念, 你可以让开发环境的配置继承自产品环境的配置, 这样就可以复用产品环境的配置</font></font></font></font></font></font></font></font></font></font></p>
<blockquote>
<p align="left"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font color="#008080" size="2">&lt;</font><font color="#3f7f7f" size="2">configurations</font><font color="#008080" size="2">&gt;</font></font></font></font></font></font></font></font></font></font></font></p>
<blockquote>
<p align="left"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font color="#008080" size="2">&lt;</font><font color="#3f7f7f" size="2">conf
</font><font color="#7f007f" size="2">name</font>=<font color="#2a00ff" size="2">"product"
</font><font color="#008080" size="2">/&gt;</font></font></font></font></font></font></font></font></font></font></font></p>
<p align="left"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font color="#008080" size="2">&lt;</font><font color="#3f7f7f" size="2">conf
</font><font color="#7f007f" size="2">name</font>=<font color="#2a00ff" size="2">"development"
</font><strong><font color="#7f007f" size="2">extends</font></strong>=<font color="#2a00ff" size="2">"product"
</font><font color="#008080" size="2">/&gt;</font></font></font></font></font></font></font></font></font></font></font></p>
</blockquote>
<p align="left"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font color="#008080" size="2">&lt;/</font><font color="#3f7f7f" size="2">configurations</font><font color="#008080" size="2">&gt;</font></font></font></font></font></font></font></font></font></font></font></p>
</blockquote>
<p align="left"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2">Q: 缺省ivy总是从缓存中读取配置, 这样我的依赖配置更新后却得不到反映; 怎么禁止从cache中读取配置?</font></font></font></font></font></font></font></font></font></font></p>
<p><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2"><font size="2">A: <font color="#008080" size="2">&lt;</font><font color="#3f7f7f" size="2">filesystem
</font><font color="#7f007f" size="2">name</font>=<font color="#2a00ff" size="2">"local"
</font><strong><font color="#7f007f" size="2">checkmodified</font></strong>=<font color="#2a00ff" size="2">"true"</font><font color="#008080" size="2">&gt;</font></font></font></font></font></font></font></font></font></font></font></p>
</font>
<img src ="http://www.blogjava.net/chelsea/aggbug/169880.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/chelsea/" target="_blank">切尔斯基</a> 2007-12-23 23:22 <a href="http://www.blogjava.net/chelsea/archive/2007/12/23/169880.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>RegexBuilder: A DSL for creating regular expression, Request For Comment</title><link>http://www.blogjava.net/chelsea/archive/2007/12/16/168118.html</link><dc:creator>切尔斯基</dc:creator><author>切尔斯基</author><pubDate>Sun, 16 Dec 2007 13:36:00 GMT</pubDate><guid>http://www.blogjava.net/chelsea/archive/2007/12/16/168118.html</guid><wfw:comment>http://www.blogjava.net/chelsea/comments/168118.html</wfw:comment><comments>http://www.blogjava.net/chelsea/archive/2007/12/16/168118.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/chelsea/comments/commentRss/168118.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/chelsea/services/trackbacks/168118.html</trackback:ping><description><![CDATA[<div style="padding-left: 30px; padding-right: 30px;">
<font color="#a4357a" size="2"><strong>
</strong></font>
<font color="#a4357a" size="2"><strong>	</strong></font>
<p align="left"><font color="#a4357a" size="2"><strong>class</strong></font><font size="2"> IP</font></p>
<font size="2">	</font>
<p align="left"><font size="2">&nbsp;&nbsp;&nbsp; include RegexpBuilder</font></p>
<font size="2">	</font>
<font size="2">	</font><font color="#a4357a" size="2"><strong>
</strong></font>
<p align="left"><font color="#a4357a" size="2"><strong>&nbsp;&nbsp;&nbsp; def</strong></font><font size="2">
less_than_255</font></p>
<font size="2">	</font>
<p align="left"><font size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; _0_to_100 =
repeat(digit(),</font><font color="#0080ff" size="2"><strong> 1</strong></font><font size="2">,</font><font color="#0080ff" size="2"><strong>
2</strong></font><font size="2">)</font></p>
<font size="2">	</font>
<p align="left"><font size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; _100_to_200 =</font><font color="#2a00ff" size="2">
"1"</font><font size="2"> + _0_to_100 </font></p>
<font size="2">	</font>
<p align="left"><font size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; _200_to_250 =</font><font color="#2a00ff" size="2">
"2"</font><font size="2"> + either(</font><font color="#2a00ff" size="2">"0-4"</font><font size="2">)
+ either(</font><font color="#2a00ff" size="2">"0-9"</font><font size="2">)</font></p>
<font size="2">	</font>
<p align="left"><font size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; _250_to_255 =</font><font color="#2a00ff" size="2">
"25"</font><font size="2"> + either(</font><font color="#2a00ff" size="2">"0-4"</font><font size="2">)</font></p>
<font size="2">	</font>
<p align="left"><font size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; one_of(_0_to_100,
_100_to_200, _200_to_250, _250_to_255)</font></p>
<font size="2">	</font><font color="#a4357a" size="2"><strong>
<p align="left">&nbsp;&nbsp;&nbsp; end</p>
</strong></font><font size="2">
</font><font color="#a4357a" size="2"><strong>
</strong></font>
<p align="left"><font color="#a4357a" size="2"><strong>&nbsp;&nbsp;&nbsp; def</strong></font><font size="2"> initialize</font></p>
<font size="2">	</font><font color="#004080" size="2"><strong>
</strong></font>
<p align="left"><font color="#004080" size="2"><strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; @ip_pattern</strong></font><font size="2">
= repeat(group(group(less_than_255()) + literal(</font><font color="#2a00ff" size="2">"."</font><font size="2">)),</font><font color="#0080ff" size="2"><strong>
3</strong></font><font size="2">) + group(less_than_255())</font></p>
<font size="2">	</font><font color="#a4357a" size="2"><strong>
<p align="left">&nbsp;&nbsp;&nbsp; end</p>
</strong></font><font size="2">
</font>
<font size="2">	</font>
<p align="left"><font size="2">&nbsp;&nbsp;&nbsp; attr_reader</font><font color="#ff4040" size="2"><strong>
:ip_pattern</strong></font></p>
<font color="#ff4040" size="2"><strong>	</strong></font><font size="2">
</font><font color="#a4357a" size="2"><strong>
<p align="left">end</p>
</strong></font>
<p><br />
以上是应用 RegexBuilder 书写正则表达式例如 IP 地址的一个例子.</p>
<p>RegexBuilder 的目的是试图增强正则表达式的可读性和可维护性</p>
<p>RegexBuilder 并不是用来取代 Regexp 的, 而是辅助编写 Regexp 构造函数需要的第一个参数.</p>
<p>RegexBuilder 包含了正则表达式符号(Anchors/Character
Classes/Repetition/Alternation/Grouping)到 API 的一一对应, 如 one_of =&gt; |, either
=&gt; [], at_least_one =&gt; + 等.</p>
<p>RegexBuilder 还包含了可以直接使用的一组常见的正则表达式, 如 IP 地址, Email 地址等.</p>
<p>&nbsp;</p>
<p>RegexBuilder 使用了Java风格的API而不是Ruby风格的API, 如 <font size="2">repeat(<font color="#0080ff"><strong>3</strong></font>,
digit()) 而不是 digit(</font><font color="#ff4040" size="2"><strong>:</strong></font><font color="#ff4040" size="2"><strong>repeat</strong></font><font size="2">
=&gt; <font color="#0080ff"><strong>3</strong></font>)</font></p>
<p>RegexBuilder 还没实现Substitutions, 如 \0, \1, \&amp; 等.</p>
<p>&nbsp;</p>
<p><strong>安装下载</strong></p>
<p>gem install regexbuilder</p>
<p><a href="http://roll-stone.googlecode.com/svn/trunk/RegexBuilder/">
http://roll-stone.googlecode.com/svn/trunk/RegexBuilder/</a></p>
</div>
<img src ="http://www.blogjava.net/chelsea/aggbug/168118.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/chelsea/" target="_blank">切尔斯基</a> 2007-12-16 21:36 <a href="http://www.blogjava.net/chelsea/archive/2007/12/16/168118.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>CruiseControl Enterprise 最佳实践 (3) : Configuring CruiseControl the CruiseControl way</title><link>http://www.blogjava.net/chelsea/archive/2007/11/09/159226.html</link><dc:creator>切尔斯基</dc:creator><author>切尔斯基</author><pubDate>Thu, 08 Nov 2007 16:57:00 GMT</pubDate><guid>http://www.blogjava.net/chelsea/archive/2007/11/09/159226.html</guid><wfw:comment>http://www.blogjava.net/chelsea/comments/159226.html</wfw:comment><comments>http://www.blogjava.net/chelsea/archive/2007/11/09/159226.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/chelsea/comments/commentRss/159226.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/chelsea/services/trackbacks/159226.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 我想这个实践的核心是:<br><br>1, 将CruiseControl的配置文件check in到版本控制系统中, 以解决意外损坏的问题<br><br>2, 使用专门的"project"来自动更新配置, 以解决每次需要有人专门登录到build server上去更新的瓶颈问题.<br><br>3, 复用但不依赖于CruiseControl对配置文件的validation, 以同时获得 "阻止有问题的配置文件被应用到build server的能力" 和 "迅速获知有人check in了有问题的配置的能力"<br>&nbsp;&nbsp;<a href='http://www.blogjava.net/chelsea/archive/2007/11/09/159226.html'>阅读全文</a><img src ="http://www.blogjava.net/chelsea/aggbug/159226.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/chelsea/" target="_blank">切尔斯基</a> 2007-11-09 00:57 <a href="http://www.blogjava.net/chelsea/archive/2007/11/09/159226.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>CruiseControl Enterprise 最佳实践 (2) : Keep your dependencies to yourself</title><link>http://www.blogjava.net/chelsea/archive/2007/10/15/153125.html</link><dc:creator>切尔斯基</dc:creator><author>切尔斯基</author><pubDate>Mon, 15 Oct 2007 15:13:00 GMT</pubDate><guid>http://www.blogjava.net/chelsea/archive/2007/10/15/153125.html</guid><wfw:comment>http://www.blogjava.net/chelsea/comments/153125.html</wfw:comment><comments>http://www.blogjava.net/chelsea/archive/2007/10/15/153125.html#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://www.blogjava.net/chelsea/comments/commentRss/153125.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/chelsea/services/trackbacks/153125.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 让你的项目包含自己的依赖. (让你的构建脚本显式的引用包含在项目内部的依赖, 而不是隐式的让构建工具来包含那些依赖)&nbsp;&nbsp;<a href='http://www.blogjava.net/chelsea/archive/2007/10/15/153125.html'>阅读全文</a><img src ="http://www.blogjava.net/chelsea/aggbug/153125.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/chelsea/" target="_blank">切尔斯基</a> 2007-10-15 23:13 <a href="http://www.blogjava.net/chelsea/archive/2007/10/15/153125.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>CruiseControl Enterprise 最佳实践 (1) : Publish with a Publisher</title><link>http://www.blogjava.net/chelsea/archive/2007/10/12/152185.html</link><dc:creator>切尔斯基</dc:creator><author>切尔斯基</author><pubDate>Thu, 11 Oct 2007 16:02:00 GMT</pubDate><guid>http://www.blogjava.net/chelsea/archive/2007/10/12/152185.html</guid><wfw:comment>http://www.blogjava.net/chelsea/comments/152185.html</wfw:comment><comments>http://www.blogjava.net/chelsea/archive/2007/10/12/152185.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/chelsea/comments/commentRss/152185.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/chelsea/services/trackbacks/152185.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 我想这个实践的好处就是<br><br>1. 开发者每次在自己机器上构建时不需要发布, 省时间<br>2. CruiseControl使用跟开发者相同的构建脚本, 减少了开发者构建成功而CruiseControl构建失败的概率, 省调试时间<br>3. CruiseControl运行Publisher时开发者可以继续工作了, 提高了并发性, 还是省时间&nbsp;&nbsp;<a href='http://www.blogjava.net/chelsea/archive/2007/10/12/152185.html'>阅读全文</a><img src ="http://www.blogjava.net/chelsea/aggbug/152185.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/chelsea/" target="_blank">切尔斯基</a> 2007-10-12 00:02 <a href="http://www.blogjava.net/chelsea/archive/2007/10/12/152185.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>jadestone enhanced sax handlers 2.0 发布</title><link>http://www.blogjava.net/chelsea/archive/2007/06/13/123748.html</link><dc:creator>切尔斯基</dc:creator><author>切尔斯基</author><pubDate>Tue, 12 Jun 2007 22:35:00 GMT</pubDate><guid>http://www.blogjava.net/chelsea/archive/2007/06/13/123748.html</guid><wfw:comment>http://www.blogjava.net/chelsea/comments/123748.html</wfw:comment><comments>http://www.blogjava.net/chelsea/archive/2007/06/13/123748.html#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://www.blogjava.net/chelsea/comments/commentRss/123748.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/chelsea/services/trackbacks/123748.html</trackback:ping><description><![CDATA[<br>介绍: <a id="viewpost1_TitleUrl" class="singleposttitle" href="http://www.blogjava.net/chelsea/archive/2007/05/22/119021.html">Enhanced SAX Handler :比 DOM 还简单的 SAX Handler</a><br><br>下载: <a href="http://code.google.com/p/jade-stone-suite/downloads/list">http://code.google.com/p/jade-stone-suite/downloads/list</a>
<br><br>示例: <a href="http://jade-stone-suite.googlecode.com/svn/trunk/JS.ESax/test/jade/stone/esax/sample/FACupHandler.java">http://jade-stone-suite.googlecode.com/svn/trunk/JS.ESax/test/jade/stone/esax/sample/FACupHandler.java</a>
<br><br><br><br><img src ="http://www.blogjava.net/chelsea/aggbug/123748.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/chelsea/" target="_blank">切尔斯基</a> 2007-06-13 06:35 <a href="http://www.blogjava.net/chelsea/archive/2007/06/13/123748.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>[导入]Configuration Pattern : 配置模式</title><link>http://www.blogjava.net/chelsea/archive/2007/06/04/121720.html</link><dc:creator>切尔斯基</dc:creator><author>切尔斯基</author><pubDate>Sun, 03 Jun 2007 21:27:00 GMT</pubDate><guid>http://www.blogjava.net/chelsea/archive/2007/06/04/121720.html</guid><wfw:comment>http://www.blogjava.net/chelsea/comments/121720.html</wfw:comment><comments>http://www.blogjava.net/chelsea/archive/2007/06/04/121720.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/chelsea/comments/commentRss/121720.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/chelsea/services/trackbacks/121720.html</trackback:ping><description><![CDATA[IoC? Dependency Injection? No, Configuration Pattern!<img src ="http://blog.csdn.net/wuliaoshengji/aggbug/1605465.aspx" width = "1" height = "1" /><br>文章来源:<a href='http://blog.csdn.net/wuliaoshengji/archive/2007/05/12/1605465.aspx'>http://blog.csdn.net/wuliaoshengji/archive/2007/05/12/1605465.aspx</a><img src ="http://www.blogjava.net/chelsea/aggbug/121720.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/chelsea/" target="_blank">切尔斯基</a> 2007-06-04 05:27 <a href="http://www.blogjava.net/chelsea/archive/2007/06/04/121720.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>[导入]简单至及的AOP和IOC</title><link>http://www.blogjava.net/chelsea/archive/2007/06/04/121721.html</link><dc:creator>切尔斯基</dc:creator><author>切尔斯基</author><pubDate>Sun, 03 Jun 2007 21:27:00 GMT</pubDate><guid>http://www.blogjava.net/chelsea/archive/2007/06/04/121721.html</guid><wfw:comment>http://www.blogjava.net/chelsea/comments/121721.html</wfw:comment><comments>http://www.blogjava.net/chelsea/archive/2007/06/04/121721.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/chelsea/comments/commentRss/121721.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/chelsea/services/trackbacks/121721.html</trackback:ping><description><![CDATA[随处可见的AOP和IOC<img src ="http://blog.csdn.net/wuliaoshengji/aggbug/639007.aspx" width = "1" height = "1" /><br>文章来源:<a href='http://blog.csdn.net/wuliaoshengji/archive/2006/03/26/639007.aspx'>http://blog.csdn.net/wuliaoshengji/archive/2006/03/26/639007.aspx</a><img src ="http://www.blogjava.net/chelsea/aggbug/121721.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/chelsea/" target="_blank">切尔斯基</a> 2007-06-04 05:27 <a href="http://www.blogjava.net/chelsea/archive/2007/06/04/121721.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>[导入]Axis : 远去前的备忘</title><link>http://www.blogjava.net/chelsea/archive/2007/06/04/121719.html</link><dc:creator>切尔斯基</dc:creator><author>切尔斯基</author><pubDate>Sun, 03 Jun 2007 21:26:00 GMT</pubDate><guid>http://www.blogjava.net/chelsea/archive/2007/06/04/121719.html</guid><wfw:comment>http://www.blogjava.net/chelsea/comments/121719.html</wfw:comment><comments>http://www.blogjava.net/chelsea/archive/2007/06/04/121719.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/chelsea/comments/commentRss/121719.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/chelsea/services/trackbacks/121719.html</trackback:ping><description><![CDATA[simple axis and axis memo<img src ="http://blog.csdn.net/platformlib/aggbug/1525377.aspx" width = "1" height = "1" /><br>文章来源:<a href='http://blog.csdn.net/platformlib/archive/2007/03/09/1525377.aspx'>http://blog.csdn.net/platformlib/archive/2007/03/09/1525377.aspx</a><img src ="http://www.blogjava.net/chelsea/aggbug/121719.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/chelsea/" target="_blank">切尔斯基</a> 2007-06-04 05:26 <a href="http://www.blogjava.net/chelsea/archive/2007/06/04/121719.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Enhanced SAX Handler :比 DOM 还简单的 SAX Handler</title><link>http://www.blogjava.net/chelsea/archive/2007/05/22/119021.html</link><dc:creator>切尔斯基</dc:creator><author>切尔斯基</author><pubDate>Mon, 21 May 2007 21:39:00 GMT</pubDate><guid>http://www.blogjava.net/chelsea/archive/2007/05/22/119021.html</guid><wfw:comment>http://www.blogjava.net/chelsea/comments/119021.html</wfw:comment><comments>http://www.blogjava.net/chelsea/archive/2007/05/22/119021.html#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://www.blogjava.net/chelsea/comments/commentRss/119021.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/chelsea/services/trackbacks/119021.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 这实际上反映了目前SAX Handler接口定义中缺失的三种能力: Stoppable, Subscribable, 和 Reportable; 最终, ESAX 为 原始的 SAX Handler 补足了 可中止的能力, 可订阅的能力, 可汇报的能力, 使得比原始的SAX Handler更快, 比DOM接口更简单, 更易于编程&nbsp;&nbsp;<a href='http://www.blogjava.net/chelsea/archive/2007/05/22/119021.html'>阅读全文</a><img src ="http://www.blogjava.net/chelsea/aggbug/119021.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/chelsea/" target="_blank">切尔斯基</a> 2007-05-22 05:39 <a href="http://www.blogjava.net/chelsea/archive/2007/05/22/119021.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>emma : 测试覆盖率低于指标的时候让Ant Build自动失败</title><link>http://www.blogjava.net/chelsea/archive/2007/05/22/119019.html</link><dc:creator>切尔斯基</dc:creator><author>切尔斯基</author><pubDate>Mon, 21 May 2007 20:10:00 GMT</pubDate><guid>http://www.blogjava.net/chelsea/archive/2007/05/22/119019.html</guid><wfw:comment>http://www.blogjava.net/chelsea/comments/119019.html</wfw:comment><comments>http://www.blogjava.net/chelsea/archive/2007/05/22/119019.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/chelsea/comments/commentRss/119019.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/chelsea/services/trackbacks/119019.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: emma : 测试覆盖率低于指标的时候让Ant Build自动失败&nbsp;&nbsp;<a href='http://www.blogjava.net/chelsea/archive/2007/05/22/119019.html'>阅读全文</a><img src ="http://www.blogjava.net/chelsea/aggbug/119019.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/chelsea/" target="_blank">切尔斯基</a> 2007-05-22 04:10 <a href="http://www.blogjava.net/chelsea/archive/2007/05/22/119019.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>RegexBuilder: A DSL for creating regular expression</title><link>http://www.blogjava.net/chelsea/archive/2006/11/24/83322.html</link><dc:creator>切尔斯基</dc:creator><author>切尔斯基</author><pubDate>Fri, 24 Nov 2006 09:24:00 GMT</pubDate><guid>http://www.blogjava.net/chelsea/archive/2006/11/24/83322.html</guid><wfw:comment>http://www.blogjava.net/chelsea/comments/83322.html</wfw:comment><comments>http://www.blogjava.net/chelsea/archive/2006/11/24/83322.html#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://www.blogjava.net/chelsea/comments/commentRss/83322.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/chelsea/services/trackbacks/83322.html</trackback:ping><description><![CDATA[<p><br />
</p>
<p>/* 最新版本请参见 http://www.blogjava.net/chelsea/archive/2007/12/16/168118.html */<br />
</p>
<p><br />
</p>
<p>找了半天也没有找到创建正则表达式的DSL, 如果你知道请告诉我</p>
<p>只好先自己写来应急了:
<a href="http://roll-stone.googlecode.com/svn/trunk/RegexBuilder/">
http://roll-stone.googlecode.com/svn/trunk/RegexBuilder/</a></p>
<p>用起来类似这样:<span style="font-size: 10pt; font-family: Courier New;" lang="EN-US">&nbsp;</span></p>
<p class="MsoNormal" style="text-align: left;" align="left">
<span style="font-size: 10pt; font-family: Courier New; color: black;" lang="EN-US">
require </span>
<span style="font-size: 10pt; font-family: Courier New; color: #2a00ff;" lang="EN-US">
'regex_builder'</span>
<span style="font-size: 10pt; font-family: Courier New;" lang="EN-US">&nbsp;</span>
</p>
<p class="MsoNormal" style="text-align: left;" align="left">
<strong>
<span style="font-size: 10pt; font-family: Courier New; color: #a4357a;" lang="EN-US">
class</span>
</strong>
<span style="font-size: 10pt; font-family: Courier New; color: black;" lang="EN-US">
RegexBuilderTest &lt; Test::Unit::TestCase</span>
</p>
<p class="MsoNormal" style="text-align: left;" align="left">
<span style="font-size: 10pt; font-family: Courier New; color: black;" lang="EN-US">
&nbsp; </span>
<strong>
<span style="font-size: 10pt; font-family: Courier New; color: #a4357a;" lang="EN-US">
def</span>
</strong>
<span style="font-size: 10pt; font-family: Courier New; color: black;" lang="EN-US">
setup</span>
</p>
<p class="MsoNormal" style="text-align: left;" align="left">
<span style="font-size: 10pt; font-family: Courier New; color: black;" lang="EN-US">
&nbsp;&nbsp;&nbsp; </span>
<strong>
<span style="font-size: 10pt; font-family: Courier New; color: #004080;" lang="EN-US">
@rb</span>
</strong>
<span style="font-size: 10pt; font-family: Courier New; color: black;" lang="EN-US">
= RegexBuilder.</span>
<strong>
<span style="font-size: 10pt; font-family: Courier New; color: #a4357a;" lang="EN-US">new</span>
</strong>
</p>
<p class="MsoNormal" style="text-align: left;" align="left">
<span style="font-size: 10pt; font-family: Courier New; color: black;" lang="EN-US">
&nbsp; </span>
<strong>
<span style="font-size: 10pt; font-family: Courier New; color: #a4357a;" lang="EN-US">
end</span>
</strong>
<span style="font-size: 10pt; font-family: Courier New; color: black;" lang="EN-US">&nbsp;
</span>
</p>
<p class="MsoNormal" style="text-align: left;" align="left">
<span style="font-size: 10pt; font-family: Courier New; color: black;" lang="EN-US">
&nbsp; </span>
<strong>
<span style="font-size: 10pt; font-family: Courier New; color: #a4357a;" lang="EN-US">
def</span>
</strong>
<span style="font-size: 10pt; font-family: Courier New; color: black;" lang="EN-US">
test_ruby_start_with_r</span>
</p>
<p class="MsoNormal" style="text-align: left;" align="left">
<span style="font-size: 10pt; font-family: Courier New; color: black;" lang="EN-US">
&nbsp;&nbsp;&nbsp; pattern = </span>
<strong>
<span style="font-size: 10pt; font-family: Courier New; color: #004080;" lang="EN-US">
@rb</span>
</strong>
<span style="font-size: 10pt; font-family: Courier New; color: black;" lang="EN-US">.start_with(</span>
<span style="font-size: 10pt; font-family: Courier New; color: #2a00ff;" lang="EN-US">"r"</span>
<span style="font-size: 10pt; font-family: Courier New; color: black;" lang="EN-US">).to_s</span>
</p>
<p class="MsoNormal" style="text-align: left;" align="left">
<span style="font-size: 10pt; font-family: Courier New; color: black;" lang="EN-US">
&nbsp;&nbsp;&nbsp; assert </span>
<span style="font-size: 10pt; font-family: Courier New; color: #2a00ff;" lang="EN-US">
"ruby"</span>
<span style="font-size: 10pt; font-family: Courier New; color: black;" lang="EN-US">.match(pattern)</span>
</p>
<p class="MsoNormal" style="text-align: left;" align="left">
<span style="font-size: 10pt; font-family: Courier New; color: black;" lang="EN-US">
&nbsp; </span>
<strong>
<span style="font-size: 10pt; font-family: Courier New; color: #a4357a;" lang="EN-US">
end</span>
</strong>
<span style="font-size: 10pt; font-family: Courier New; color: black;" lang="EN-US">&nbsp;
</span>
</p>
<p class="MsoNormal" style="text-align: left;" align="left">
<span style="font-size: 10pt; font-family: Courier New; color: black;" lang="EN-US">
&nbsp; </span>
<strong>
<span style="font-size: 10pt; font-family: Courier New; color: #a4357a;" lang="EN-US">
def</span>
</strong>
<span style="font-size: 10pt; font-family: Courier New; color: black;" lang="EN-US">
test_ruby_start_with_r_and_end_with_y</span>
</p>
<p class="MsoNormal" style="text-align: left;" align="left">
<span style="font-size: 10pt; font-family: Courier New; color: black;" lang="EN-US">
&nbsp;&nbsp;&nbsp; pattern = </span>
<strong>
<span style="font-size: 10pt; font-family: Courier New; color: #004080;" lang="EN-US">
@rb</span>
</strong>
<span style="font-size: 10pt; font-family: Courier New; color: black;" lang="EN-US">.start_with(</span>
<span style="font-size: 10pt; font-family: Courier New; color: #2a00ff;" lang="EN-US">"r"</span>
<span style="font-size: 10pt; font-family: Courier New; color: black;" lang="EN-US">).any().end_with(</span>
<span style="font-size: 10pt; font-family: Courier New; color: #2a00ff;" lang="EN-US">"y"</span>
<span style="font-size: 10pt; font-family: Courier New; color: black;" lang="EN-US">).to_s</span>
</p>
<p class="MsoNormal" style="text-align: left;" align="left">
<span style="font-size: 10pt; font-family: Courier New; color: black;" lang="EN-US">
&nbsp;&nbsp;&nbsp; assert </span>
<span style="font-size: 10pt; font-family: Courier New; color: #2a00ff;" lang="EN-US">
"ruby"</span>
<span style="font-size: 10pt; font-family: Courier New; color: black;" lang="EN-US">.match(pattern)</span>
</p>
<p class="MsoNormal" style="text-align: left;" align="left">
<span style="font-size: 10pt; font-family: Courier New; color: black;" lang="EN-US">
&nbsp; </span>
<strong>
<span style="font-size: 10pt; font-family: Courier New; color: #a4357a;" lang="EN-US">
end</span>
</strong>
<span style="font-size: 10pt; font-family: Courier New; color: black;" lang="EN-US">&nbsp;
</span>
</p>
<p class="MsoNormal" style="text-align: left;" align="left">
<strong>
<span style="font-size: 10pt; font-family: Courier New; color: #a4357a;" lang="EN-US">
end</span>
</strong>
</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">
<span lang="EN-US">还有一个 RegexUtil&nbsp;来直接提供常用的正则表达式, 如email地址,ip地址等,想到啥都可以往里加</span>
</p>
<p class="MsoNormal" style="text-align: left;" align="left">
<span style="font-size: 10pt; font-family: Courier New; color: black;" lang="EN-US">
require </span>
<span style="font-size: 10pt; font-family: Courier New; color: #2a00ff;" lang="EN-US">
'regex_util'</span>
<span style="font-size: 10pt; font-family: Courier New;" lang="EN-US">&nbsp;</span>
</p>
<p class="MsoNormal" style="text-align: left;" align="left">
<strong>
<span style="font-size: 10pt; font-family: Courier New; color: #a4357a;" lang="EN-US">
class</span>
</strong>
<span style="font-size: 10pt; font-family: Courier New; color: black;" lang="EN-US">
RegexUtilTest &lt; Test::Unit::TestCase&nbsp; </span>
</p>
<p class="MsoNormal" style="text-align: left;" align="left">
<span style="font-size: 10pt; font-family: Courier New; color: black;" lang="EN-US">
&nbsp; </span>
<strong>
<span style="font-size: 10pt; font-family: Courier New; color: #a4357a;" lang="EN-US">
def</span>
</strong>
<span style="font-size: 10pt; font-family: Courier New; color: black;" lang="EN-US">
test_192_168_0_3_is_a_valid_ip_address</span>
</p>
<p class="MsoNormal" style="text-align: left;" align="left">
<span style="font-size: 10pt; font-family: Courier New; color: black;" lang="EN-US">
&nbsp;&nbsp;&nbsp; assert </span>
<span style="font-size: 10pt; font-family: Courier New; color: #2a00ff;" lang="EN-US">
"192.168.0.3"</span>
<span style="font-size: 10pt; font-family: Courier New; color: black;" lang="EN-US">.match(RegexUtil::IP_Pattern)</span>
</p>
<p class="MsoNormal" style="text-align: left;" align="left">
<span style="font-size: 10pt; font-family: Courier New; color: black;" lang="EN-US">
&nbsp; </span>
<strong>
<span style="font-size: 10pt; font-family: Courier New; color: #a4357a;" lang="EN-US">
end</span>
</strong>
<span style="font-size: 10pt; font-family: Courier New; color: black;" lang="EN-US">&nbsp;
</span>
</p>
<p class="MsoNormal" style="text-align: left;" align="left">
<span style="font-size: 10pt; font-family: Courier New; color: black;" lang="EN-US">
&nbsp; </span>
<strong>
<span style="font-size: 10pt; font-family: Courier New; color: #a4357a;" lang="EN-US">
def</span>
</strong>
<span style="font-size: 10pt; font-family: Courier New; color: black;" lang="EN-US">
test_500_312_0_3_is_not_a_valid_ip_address</span>
</p>
<p class="MsoNormal" style="text-align: left;" align="left">
<span style="font-size: 10pt; font-family: Courier New; color: black;" lang="EN-US">
&nbsp;&nbsp;&nbsp; assert_nil( </span>
<span style="font-size: 10pt; font-family: Courier New; color: #2a00ff;" lang="EN-US">
"500.312.0.3"</span>
<span style="font-size: 10pt; font-family: Courier New; color: black;" lang="EN-US">.match(RegexUtil::IP_Pattern)
)</span>
</p>
<p class="MsoNormal" style="text-align: left;" align="left">
<span style="font-size: 10pt; font-family: Courier New; color: black;" lang="EN-US">
&nbsp; </span>
<strong>
<span style="font-size: 10pt; font-family: Courier New; color: #a4357a;" lang="EN-US">
end</span>
</strong>
<span style="font-size: 10pt; font-family: Courier New; color: black;" lang="EN-US">&nbsp;
</span>
</p>
<p class="MsoNormal" style="text-align: left;" align="left">
<span style="font-size: 10pt; font-family: Courier New; color: black;" lang="EN-US">
&nbsp; </span>
<strong>
<span style="font-size: 10pt; font-family: Courier New; color: #a4357a;" lang="EN-US">
def</span>
</strong>
<span style="font-size: 10pt; font-family: Courier New; color: black;" lang="EN-US">
test_chelsea_at_gmail_dot_com_is_a_valid_email_address</span>
</p>
<p class="MsoNormal" style="text-align: left;" align="left">
<span style="font-size: 10pt; font-family: Courier New; color: black;" lang="EN-US">
&nbsp;&nbsp;&nbsp; assert </span>
<span style="font-size: 10pt; font-family: Courier New; color: #2a00ff;" lang="EN-US">
"chelsea@gmail.com"</span>
<span style="font-size: 10pt; font-family: Courier New; color: black;" lang="EN-US">.match(RegexUtil::Email_Pattern)</span>
</p>
<p class="MsoNormal" style="text-align: left;" align="left">
<span style="font-size: 10pt; font-family: Courier New; color: black;" lang="EN-US">
&nbsp; </span>
<strong>
<span style="font-size: 10pt; font-family: Courier New; color: #a4357a;" lang="EN-US">
end</span>
</strong>
<span style="font-size: 10pt; font-family: Courier New;" lang="EN-US">&nbsp;</span>
</p>
<p class="MsoNormal" style="text-align: left;" align="left">
<span style="font-size: 10pt; font-family: Courier New; color: black;" lang="EN-US">
&nbsp; </span>
<strong>
<span style="font-size: 10pt; font-family: Courier New; color: #a4357a;" lang="EN-US">
def</span>
</strong>
<span style="font-size: 10pt; font-family: Courier New; color: black;" lang="EN-US">
test_www_dot_google_dot_com_is_not_a_valid_email_address</span>
</p>
<p class="MsoNormal" style="text-align: left;" align="left">
<span style="font-size: 10pt; font-family: Courier New; color: black;" lang="EN-US">
&nbsp;&nbsp;&nbsp; assert_nil( </span>
<span style="font-size: 10pt; font-family: Courier New; color: #2a00ff;" lang="EN-US">
"www.google.com"</span>
<span style="font-size: 10pt; font-family: Courier New; color: black;" lang="EN-US">.match(RegexUtil::Email_Pattern)
)</span>
</p>
<p class="MsoNormal" style="text-align: left;" align="left">
<span style="font-size: 10pt; font-family: Courier New; color: black;" lang="EN-US">
&nbsp; </span>
<strong>
<span style="font-size: 10pt; font-family: Courier New; color: #a4357a;" lang="EN-US">
end</span>
</strong>
<span style="font-size: 10pt; font-family: Courier New;" lang="EN-US">&nbsp;</span>
</p>
<p class="MsoNormal" style="text-align: left;" align="left">
<strong>
<span style="font-size: 10pt; font-family: Courier New; color: #a4357a;" lang="EN-US">
end</span>
</strong>
</p>
<p class="MsoNormal">
<span lang="EN-US">&nbsp;</span>
</p>
<p>
<span lang="en-us">很多功能都还没提供,希望有人一起来做</span>
</p>
<img src ="http://www.blogjava.net/chelsea/aggbug/83322.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/chelsea/" target="_blank">切尔斯基</a> 2006-11-24 17:24 <a href="http://www.blogjava.net/chelsea/archive/2006/11/24/83322.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Get Mac Address in Java</title><link>http://www.blogjava.net/chelsea/archive/2006/11/15/81382.html</link><dc:creator>切尔斯基</dc:creator><author>切尔斯基</author><pubDate>Wed, 15 Nov 2006 13:34:00 GMT</pubDate><guid>http://www.blogjava.net/chelsea/archive/2006/11/15/81382.html</guid><wfw:comment>http://www.blogjava.net/chelsea/comments/81382.html</wfw:comment><comments>http://www.blogjava.net/chelsea/archive/2006/11/15/81382.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/chelsea/comments/commentRss/81382.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/chelsea/services/trackbacks/81382.html</trackback:ping><description><![CDATA[
		<div class="Section1">
				<p class="MsoNormal"> </p>
				<p class="MsoNormal">
						<span lang="en-us">
								<font style="font-size: 11pt;" color="#000080" face="Arial">
	基本目前没有纯Java的API来访问硬件信息,以后或许会有吧,谁知道</font>
						</span>
				</p>
				<p class="MsoNormal">
						<span lang="en-us">
								<font style="font-size: 11pt;" color="#000080" face="Arial">对Mac地址的需求部分来自UUID, 
	另有很大部分来自License Management,这真是一件无聊的事情,希望以后软件卖的都是服务,不是拷贝,省却这些麻烦</font>
						</span>
				</p>
				<p class="MsoNormal"> </p>
				<p class="MsoNormal">
						<span lang="en-us">
								<font style="font-size: 11pt;" color="#000080" face="Arial">搜了一下,大体有三类解决分案</font>
						</span>
				</p>
				<p class="MsoNormal">
						<span lang="en-us">
								<font style="font-size: 11pt; font-weight: 700;" color="#000080" face="Arial">
	1, JDK6, JDK7 ?</font>
						</span>
				</p>
				<p class="MsoNormal">
						<span lang="en-us">
								<font style="font-size: 11pt;" color="#000080" face="Arial">详情可参见以下链接</font>
						</span>
						<font color="blue" face="宋体" size="2">
								<span style="font-size: 10pt; color: blue; font-family: 宋体;" lang="EN-US">
										<a title="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4691932" style="color: blue; text-decoration: underline;" href="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4691932">
	http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4691932</a>
								</span>
						</font>
				</p>
				<p class="MsoNormal">
						<span lang="en-us">
								<font style="font-size: 11pt; font-weight: 700;" color="#000080" face="Arial">
	2, Shell Command</font>
						</span>
				</p>
				<p class="MsoNormal">
						<span lang="en-us">
								<font style="font-size: 11pt;" color="#000080" face="Arial">就是截取 ipconfig,  
	ifconfig 等命令的输出,然后解析</font>
						</span>
				</p>
				<p class="MsoNormal">
						<span lang="en-us">
								<font style="font-size: 11pt;" color="#000080" face="Arial">有一些开源项目,如 </font>
						</span>
						<font color="navy" face="Arial" size="1">
								<span style="font-size: 9pt; color: navy; font-family: Arial;" lang="EN-US">
										<a title="http://sourceforge.net/projects/javanetcomm/" style="color: blue; text-decoration: underline;" href="http://sourceforge.net/projects/javanetcomm/">
	http://sourceforge.net/projects/javanetcomm/</a>
								</span>
						</font>
				</p>
				<p class="MsoNormal">
						<span style="font-family: Arial; font-size: 11pt; color: rgb(0, 0, 128);" lang="en-us">
	还有很多代码片断,如 </span>
						<font color="blue" face="宋体" size="2">
								<span style="font-size: 10pt; color: blue; font-family: 宋体;" lang="EN-US">
										<a title="http://forum.java.sun.com/thread.jspa?threadID=615562&amp;messageID=3424234" style="color: blue; text-decoration: underline;" href="http://forum.java.sun.com/thread.jspa?threadID=615562">http://forum.java.sun.com/thread.jspa?threadID=61556,
	</a> <a title="http://forum.java.sun.com/thread.jspa?threadID=245711" style="color: blue; text-decoration: underline;" href="http://forum.java.sun.com/thread.jspa?threadID=245711">http://forum.java.sun.com/thread.jspa?threadID=245711</a></span>
						</font>
				</p>
				<p class="MsoNormal">
						<span style="font-family: Arial; font-size: 11pt; color: rgb(0, 0, 128);" lang="en-us">
	这种方法的缺点是有可能需要较高的系统权限才能执行这些命令或者访问网卡硬件</span>
				</p>
				<p class="MsoNormal">
						<span style="font-family: Arial; font-size: 11pt; color: rgb(0, 0, 128); font-weight: 700;" lang="en-us">
	3, JNI</span>
				</p>
				<p class="MsoNormal">
						<span style="font-family: Arial; font-size: 11pt; color: rgb(0, 0, 128);" lang="en-us">
	也有开源项目包含了这个功能, 如 </span>
						<font color="navy" face="Arial" size="1">
								<span style="font-size: 9pt; color: navy; font-family: Arial;" lang="EN-US">
										<a title="http://jug.safehaus.org/" style="color: blue; text-decoration: underline;" href="http://jug.safehaus.org/">
	http://jug.safehaus.org/</a>
								</span>
						</font>
				</p>
				<p class="MsoNormal">
						<span style="font-family: Arial; font-size: 11pt; color: rgb(0, 0, 128);" lang="en-us">
	缺点是不方便部署</span>
				</p>
				<p class="MsoNormal"> </p>
				<p class="MsoNormal">
						<span style="font-family: Arial; font-size: 11pt; color: rgb(0, 0, 128);" lang="en-us">
	然而不是所有的网络都是Ethernet, 对License Management来说Mac地址只是更为generic的概念"Host 
	Id"的一种考量因素.</span>
				</p>
		</div>
<img src ="http://www.blogjava.net/chelsea/aggbug/81382.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/chelsea/" target="_blank">切尔斯基</a> 2006-11-15 21:34 <a href="http://www.blogjava.net/chelsea/archive/2006/11/15/81382.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>WS-Security Practice</title><link>http://www.blogjava.net/chelsea/archive/2006/08/31/66958.html</link><dc:creator>切尔斯基</dc:creator><author>切尔斯基</author><pubDate>Thu, 31 Aug 2006 14:58:00 GMT</pubDate><guid>http://www.blogjava.net/chelsea/archive/2006/08/31/66958.html</guid><wfw:comment>http://www.blogjava.net/chelsea/comments/66958.html</wfw:comment><comments>http://www.blogjava.net/chelsea/archive/2006/08/31/66958.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/chelsea/comments/commentRss/66958.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/chelsea/services/trackbacks/66958.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: &nbsp;&nbsp;<a href='http://www.blogjava.net/chelsea/archive/2006/08/31/66958.html'>阅读全文</a><img src ="http://www.blogjava.net/chelsea/aggbug/66958.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/chelsea/" target="_blank">切尔斯基</a> 2006-08-31 22:58 <a href="http://www.blogjava.net/chelsea/archive/2006/08/31/66958.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Essential Vitria BusinessWare</title><link>http://www.blogjava.net/chelsea/archive/2006/05/28/48645.html</link><dc:creator>切尔斯基</dc:creator><author>切尔斯基</author><pubDate>Sun, 28 May 2006 15:44:00 GMT</pubDate><guid>http://www.blogjava.net/chelsea/archive/2006/05/28/48645.html</guid><wfw:comment>http://www.blogjava.net/chelsea/comments/48645.html</wfw:comment><comments>http://www.blogjava.net/chelsea/archive/2006/05/28/48645.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/chelsea/comments/commentRss/48645.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/chelsea/services/trackbacks/48645.html</trackback:ping><description><![CDATA[
		<div style="padding-left: 30px; padding-right: 30px;">
				<p style="line-height: 150%;"> </p>
				<p style="line-height: 150%;">对BusinessWare的使用告一段落，总结一下</p>
				<p style="line-height: 150%;"> </p>
				<div id="main">
						<div class="post">
								<div class="postTitle">
										<p style="line-height: 150%;">
												<a href="http://blog.csdn.net/gongflow/archive/2006/05/27/757708.aspx">
														<img src="http://blog.csdn.net/images/authorship.gif" border="0" height="13" width="15" /> Vitria 
				BusinessWare: 事件与端口</a>：摘要：Vitria BusinessWare: Event and 
				Port    （全文共3431字）——点击<a target="_blank" href="http://blog.csdn.net/gongflow/archive/2006/05/27/757708.aspx">此处</a>阅读全文</p>
										<p style="line-height: 150%;"> </p>
										<p style="line-height: 150%;">
												<a href="http://blog.csdn.net/gongflow/archive/2006/04/01/646976.aspx">
														<img src="http://blog.csdn.net/images/authorship.gif" border="0" height="13" width="15" /> Vitria 
				BusinessWare: Web Services</a>：摘要：BusinessWare既可以作为WebService客户端调用其它应用发布的WebService，又可以作为WebService服务端，将整个流程模型发布为WebService，供其它应用调用；而这一切都可以在建模工具BME中通过可视化的界面和向导(Wizard)来方便的完成 
				    （全文共6580字）——点击<a target="_blank" href="http://blog.csdn.net/gongflow/archive/2006/04/01/646976.aspx">此处</a>阅读全文</p>
										<p style="line-height: 150%;"> </p>
										<p style="line-height: 150%;">
												<a href="http://blog.csdn.net/gongflow/archive/2006/04/01/646879.aspx">
														<img src="http://blog.csdn.net/images/authorship.gif" border="0" height="13" width="15" /> Vitria 
				BusinessWare: 平台与软件总线：</a>摘要：BusinessWare中SOA的成分越来越多    （全文共8205字）——点击<a target="_blank" href="http://blog.csdn.net/gongflow/archive/2006/04/01/646879.aspx">此处</a>阅读全文</p>
										<p style="line-height: 150%;"> </p>
										<p style="line-height: 150%;">
												<a href="http://blog.csdn.net/gongflow/archive/2006/03/26/639068.aspx">
														<img src="http://blog.csdn.net/images/authorship.gif" border="0" height="13" width="15" /> Vitria 
				BusinessWare: 存储与访问安全</a>：摘要：事实上，BusinessWare使用LDAP做为存储机制和安全机制    （全文共12865字）——点击<a target="_blank" href="http://blog.csdn.net/gongflow/archive/2006/03/26/639068.aspx">此处</a>阅读全文</p>
										<p style="line-height: 150%;"> </p>
										<p style="line-height: 150%;">
												<a href="http://blog.csdn.net/gongflow/archive/2005/09/26/489501.aspx">
														<img src="http://blog.csdn.net/images/authorship.gif" border="0" height="13" width="15" /> Beyond 
				Workflow : An Introduction to Vitria BusinessWare</a>：摘要：BusinessWare是一款企业应用集成(EAI)软件，更加注重“系统”间的交互，传统工作流只是它的一项普通功能而已； 
				BusinessWare还是一款可扩展的软件，对于已知的未知的系统/协议，它提供可单独配置的部件(Connector/Proxy)来对接，因此， 
				BusinessWare可以看作企业现有系统间的总线/程控交换机    （全文共8505字）——点击<a target="_blank" href="http://blog.csdn.net/gongflow/archive/2005/09/26/489501.aspx">此处</a>阅读全文<br />
 </p>
								</div>
						</div>
				</div>
		</div>
<img src ="http://www.blogjava.net/chelsea/aggbug/48645.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/chelsea/" target="_blank">切尔斯基</a> 2006-05-28 23:44 <a href="http://www.blogjava.net/chelsea/archive/2006/05/28/48645.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title> Essential Web Services: SOAP, WSDL, UDDI</title><link>http://www.blogjava.net/chelsea/archive/2006/05/25/47919.html</link><dc:creator>切尔斯基</dc:creator><author>切尔斯基</author><pubDate>Wed, 24 May 2006 16:07:00 GMT</pubDate><guid>http://www.blogjava.net/chelsea/archive/2006/05/25/47919.html</guid><wfw:comment>http://www.blogjava.net/chelsea/comments/47919.html</wfw:comment><comments>http://www.blogjava.net/chelsea/archive/2006/05/25/47919.html#Feedback</comments><slash:comments>9</slash:comments><wfw:commentRss>http://www.blogjava.net/chelsea/comments/commentRss/47919.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/chelsea/services/trackbacks/47919.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 1. SOAP: 与 Web Service 无关 <br>2. WSDL: 与 Runtime 无关 <br>3. WSDL-SOAP Binding Style <br>4. UDDI：与 WSDL 无关 <br>5. UDDI：与WSDL 有关 <br>6. JAX-RPC: 首先是Java,其次才是RPC   &nbsp;&nbsp;<a href='http://www.blogjava.net/chelsea/archive/2006/05/25/47919.html'>阅读全文</a><img src ="http://www.blogjava.net/chelsea/aggbug/47919.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/chelsea/" target="_blank">切尔斯基</a> 2006-05-25 00:07 <a href="http://www.blogjava.net/chelsea/archive/2006/05/25/47919.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>IBM JDK 不兼容 Sun JDK 备忘录</title><link>http://www.blogjava.net/chelsea/archive/2006/02/22/32011.html</link><dc:creator>切尔斯基</dc:creator><author>切尔斯基</author><pubDate>Wed, 22 Feb 2006 12:31:00 GMT</pubDate><guid>http://www.blogjava.net/chelsea/archive/2006/02/22/32011.html</guid><wfw:comment>http://www.blogjava.net/chelsea/comments/32011.html</wfw:comment><comments>http://www.blogjava.net/chelsea/archive/2006/02/22/32011.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.blogjava.net/chelsea/comments/commentRss/32011.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/chelsea/services/trackbacks/32011.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: &nbsp;&nbsp;<a href='http://www.blogjava.net/chelsea/archive/2006/02/22/32011.html'>阅读全文</a><img src ="http://www.blogjava.net/chelsea/aggbug/32011.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/chelsea/" target="_blank">切尔斯基</a> 2006-02-22 20:31 <a href="http://www.blogjava.net/chelsea/archive/2006/02/22/32011.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>J2EE Connector Architecture 备忘录</title><link>http://www.blogjava.net/chelsea/archive/2006/01/12/27692.html</link><dc:creator>切尔斯基</dc:creator><author>切尔斯基</author><pubDate>Thu, 12 Jan 2006 03:22:00 GMT</pubDate><guid>http://www.blogjava.net/chelsea/archive/2006/01/12/27692.html</guid><wfw:comment>http://www.blogjava.net/chelsea/comments/27692.html</wfw:comment><comments>http://www.blogjava.net/chelsea/archive/2006/01/12/27692.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/chelsea/comments/commentRss/27692.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/chelsea/services/trackbacks/27692.html</trackback:ping><description><![CDATA[<H3>I. Questions before reading the specification, and Answers after reading the specification.</H3>
<P>1. How the application call EIS functions to execute task or get data from EIS via JCA RA/Connector?</P>
<UL>
<LI>This is addressed by <B>Common Client Interface</B>, it involves "Interaction", "InteractionSpec", "Record" and other interfaces to do this work. 
<LI>It is a Command Design Pattern </LI></UL>
<P>2. and on the other hand ?</P>
<UL>
<LI>This is addressed by <B>Message Inflow Contract</B> and <B>EJB Client View Model</B> together. It involves a MDB to dispatch invocation to application components. </LI></UL>
<P>3. CCI is a protocol between Resource Adaptor and EAI tools ? </P>
<UL>
<LI>You can understand it as this. CCI is so low level so that it is targeted primarily towards application development tools and EAI frameworks. </LI></UL>
<P>4. How the ActivationSpec get associated with MDB instance ?</P>
<UL>
<LI>At deployment time, it is the deployer to associate ActivationSpec instance with MDB. 
<LI>At Runtime, it is the Resource Adapter to associate ActivationSpec instance with MDB insatnce while the application server calls endpointActivation(MessageEndpointFactory, ActivationSpec) </LI></UL>
<P>　</P>
<H3>II. Notes</H3>
<P>1. Overview</P>
<TABLE id=table7 width="100%" border=1>
<TBODY>
<TR>
<TD>Roles: J2EE application, J2EE AppServer, Resource Adaptor, EIS, and their provider 
<P>The target audience for this specification includes:</P>
<UL>
<LI>EIS vendors and resource adapter providers 
<LI>Messaging system vendors 
<LI>Application server vendors and container providers 
<LI>Enterprise application developers and system integrators 
<LI>Enterprise tool and EAI vendors </LI></UL>
<P>The system-level contracts between an application server and an EIS are targeted towards EIS vendors (or resource adapter providers, if the two roles are different) and application server vendors. The CCI is targeted primarily towards enterprise tools and EAI vendors.</P></TD></TR></TBODY></TABLE>
<P>　</P>
<TABLE id=table34 width="100%" border=1>
<TBODY>
<TR>
<TD>JCA is a standard between EIS and J2EE Application <FONT color=#ff0000>Server</FONT> rather than a standard between EIS and J2EE Application, for the standard defined fixed approach for any EIS plugged into any Application <FONT color=#ff0000>Server</FONT>, while it allowed custom interface defined between Application and Resource Adaptor, i.e. EIS. 
<P>Reference: "<I><FONT color=#ff0000>This document begins by describing the rationale and goals for creating a standard architecture to integrate an application server with multiple heterogeneous EISs.</FONT></I>" 
<P>An application server and an EIS collaborate to keep all system-level mechanisms—transactions, security, and connection management—transparent from the application components.</P></TD></TR></TBODY></TABLE>
<P>　</P>
<TABLE id=table35 width="100%" border=1>
<TBODY>
<TR>
<TD>Connector Architecture------An architecture for integrating J2EE servers with EISs. There are two parts to this architecture: an EIS vendor-provided resource adapter and an application server that allows this resource adapter to be plugged in. This architecture defines a set of contracts (such as transactions, security, connection management) that a resource adapter has to support to plug in to an application server. These contracts support bi-directional communication (outbound and inbound) between an application server and an EIS via a resource adapter. That is, the application server may use the resource adapter for outbound communication to the EIS, and it may also use the resource adapter for inbound communication from the EIS.</TD></TR></TBODY></TABLE>
<P>　</P>
<TABLE id=table39 width="100%" border=1>
<TBODY>
<TR>
<TD><FONT color=#ff0000>The "Inbound/Outbound" is refer to direction between application and resource adapter, not resource adapter and EIS.</FONT> 
<P><FONT color=#ff0000>In fact, almost all contracts are between application server and resource adapter, or between application and resource adapter, the contracts between resource adapter and EIS is private, or vendor-specified.</FONT></P></TD></TR></TBODY></TABLE>
<P>　</P>
<TABLE id=table40 width="100%" border=1>
<TBODY>
<TR>
<TD>The resource adapter lists the types of message listener that it supports. The J2EE Connector Architecture version 1.5 and the EJB version 2.1 specifications do not restrict message listeners to using the JMS API. 
<P><FONT color=#ff0000>That means, MDB need not be related with JMS, in fact, MDB is related with Resource Adaptor.</FONT></P></TD></TR></TBODY></TABLE>
<P>　</P>
<P>2. Contracts</P>
<TABLE id=table4 width="100%" border=1>
<TBODY>
<TR>
<TH>Contract</TH>
<TH>The two parties</TH>
<TH>Goals</TH></TR>
<TR>
<TD>Lifecycle management contract</TD>
<TD>application server and resource adapter</TD>
<TD>allows an application server to manage the lifecycle of a resource adapter</TD></TR>
<TR>
<TD>Work management contract</TD>
<TD>application server and resource adapter</TD>
<TD>allows a resource adapter to do work (monitor network endpoints, call application components, etc.) by submitting Work instances to an application server for execution</TD></TR>
<TR>
<TD>Transaction inflow contract</TD>
<TD>application server and resource adapter</TD>
<TD>allows a resource adapter to propagate an imported transaction to an application server.</TD></TR>
<TR>
<TD>Message inflow contract</TD>
<TD>application server and resource adapter</TD>
<TD>allows a resource adapter to asynchronously deliver messages to message endpoints residing in the application server. This contract also serves as the standard message provider pluggability contract that allows a wide range of message providers to be plugged into any J2EE compatible application server via a resource adapter</TD></TR></TBODY></TABLE>
<P>　</P>
<P>3. CCI</P>
<TABLE id=table36 width="100%" border=1>
<TBODY>
<TR>
<TD>Rather than using CCI directly, developers will use EIS specific tools which based on CCI to access EIS, such as JDBC API, JMS API 
<P>The JDBC interfaces—javax.sql.DataSource, java.sql.Connection—are examples of non-CCI connection factory and connection interfaces. Note that the methods defined on a non-CCI interface are not required to throw a ResourceException. The exception can be specific to a resource adapter, for example: java.sql.SQLException for JDBC interfaces.</P></TD></TR></TBODY></TABLE>
<P>　</P>
<TABLE id=table10 width="100%" border=1>
<TBODY>
<TR>
<TD>Client API------The client API used by application components for EIS access may be defined as: The standard Common Client Interface (CCI) 
<P>A client API specific to the type of a resource adapter and its underlying EIS. An example of such an EIS specific client API is JDBC for relational databases. The Common Client Interface (CCI) defines a common client API for accessing EISs.<BR>The CCI is targeted towards Enterprise Application Integration (EAI) and enterprise tools vendors.</P></TD></TR></TBODY></TABLE>
<P>　</P>
<P>4. Resource Adapter</P>
<TABLE id=table11 width="100%" border=1>
<TBODY>
<TR>
<TD>The ResourceAdapter JavaBean represents a resource adapter instance and contains the configuration information pertaining to that resource adapter instance. This configuration information may also be used as global defaults for ManagedConnectionFactory and ActivationSpec JavaBeans. That is, when ManagedConnectionFactory or ActivationSpec JavaBeans are created they may inherit the global defaults (ResourceAdapter JavaBean configuration information), which make it easier to configure them. A resource adapter instance may provide bi-directional connectivity to multiple EIS instances. A ManagedConnectionFactory JavaBean can be used to provide outbound connectivity to a single EIS instance. An ActivationSpec JavaBean can be used to provide inbound connectivity from an EIS instance. A resource adapter instance may contain several such ManagedConnectionFactory and ActivationSpec JavaBeans. 
<P>from perspective of Application:</P>
<P>ManagedConnectionFactory : 送站通道</P>
<P>ActivationSpec : 接站通道</P>
<P>ResourceAdaptor JavaBean is not full-functional Resource Adaptor, it must combine with ManagedConnectionFactory JavaBean, ActivationSpec JavaBean and other JavaBeans to serve as a full-functional Resource Adaptor</P></TD></TR></TBODY></TABLE>
<P>　</P>
<TABLE id=table12 width="100%" border=1>
<TBODY>
<TR>
<TD>The CCI defines javax.resource.cci.ConnectionFactory and javax.resource.cci.Connection as interfaces for a connection factory and a connection, respectively. 
<P>The connection factory instance delegates the connection creation request to the <FONT color=#ff0000>ConnectionManager</FONT> instance.</P>
<P>The <FONT color=#ff0000>ConnectionManager</FONT> instance, on receiving a connection creation request from the connection factory, does a lookup in the connection pool provided by the application server. If there is no connection in the pool that can satisfy the<BR>connection request, the application server uses the <FONT color=#ff0000>ManagedConnectionFactory </FONT>interface (implemented by the resource adapter) to create a new physical connection to the underlying EIS.</P>
<P>The application server registers a <FONT color=#ff0000>ConnectionEventListener</FONT> with the<FONT color=#ff0000> ManagedConnection</FONT> instance. This listener enables the application server to get event notifications related to the state of the ManagedConnection instance.</P>
<P>The application server uses the ManagedConnection instance to get a connection instance that acts as an application-level handle to the underlying physical connection. An instance of type <FONT color=#ff0000>javax.resource.cci.Connection </FONT>is an example<BR>of such a connection handle. An application component uses the connection handle to access EIS resources.</P>
<P><FONT color=#ff0000>The circuitous route is for reusing application server provided services, such as transaction management, security, error logging and tracing, and connection pool management.</FONT></P></TD></TR></TBODY></TABLE>
<P>　</P>
<TABLE id=table13 width="100%" border=1>
<TBODY>
<TR>
<TD>In the JDBC architecture, an application server provides the implementation of javax.sql.DataSource interface. Using a similar design approach for the connector architecture would have required an application server to provide implementations of various connection factory interfaces defined by different resource adapters. Since the connection factory interface may be defined as specific to an EIS, the application server may find it difficult to provide implementations of connection factory interfaces without any code generation. 
<P>The connection factory implementation class delegates the getConnection method invocation from an application component to the associated ConnectionManager instance. The ConnectionManager instance is associated with a connection factory<BR>instance at its instantiation </P>
<P>Note that the connection factory implementation class must call the ConnectionManager.allocateConnection method in the same thread context in which the application component had called the getConnection method.</P>
<P>A resource adapter must provide a default implementation of the javax.resource.spi.ConnectionManager interface. The implementation class comes into play when a resource adapter is used in a non-managed two-tier application scenario. In an application server-managed environment, the resource adapter must not use the default ConnectionManager implementation class.</P></TD></TR></TBODY></TABLE>
<P>　</P>
<P>5. Transaction</P>
<TABLE id=table15 width="100%" border=1>
<TBODY>
<TR>
<TD>The ERP system supports JTA transactions by implementing a XAResource interface through its resource adapter. The TP system also implements an XAResource interface. This interface enables the two resource managers to participate in<BR>transactions that are coordinated by an external transaction manager. The transaction manager uses the XAResource interface to manage transactions across the two underlying resource managers.</TD></TR></TBODY></TABLE>
<P>　</P>
<TABLE id=table16 width="100%" border=1>
<TBODY>
<TR>
<TD>If multiple resource managers participate in a transaction, the EJB container uses a transaction manager to coordinate the transaction. The contract between the transaction manager and resource manager is defined using the XAResource<BR>interface. If a single resource manager instance participates in a transaction (either componentmanaged or container-managed), the container has two choices: 
<UL>
<LI>It uses the transaction manager to manage this transaction. The transaction manager uses one-phase commit-optimization to coordinate the transaction for this single resource manager instance. 
<LI>The container lets the resource manager coordinate this transaction internally without involving an external transaction manager. </LI></UL></TD></TR></TBODY></TABLE>
<P>　</P>
<TABLE id=table17 width="100%" border=1>
<TBODY>
<TR>
<TD>The Java Transaction API (JTA) is a specification of interfaces between a transaction manager and the other parties involved in a distributed transaction processing system: application programs, resource managers, and an application<BR>server. 
<P>The Java Transaction Service (JTS) API is a Java binding of the Common Object Request Broker Architecture (CORBA) Object Transaction Service (OTS) 1.1 specification. JTS provides transaction interoperability using the standard Internet<BR>Inter-ORB Protocol (IIOP) for transaction propagation between servers. The JTS API is intended for vendors who implement transaction processing infrastructure for enterprise middleware. For example, an application server vendor can use a JTS<BR>implementation as the underlying transaction manager.</P></TD></TR></TBODY></TABLE>
<P>　</P>
<TABLE id=table18 width="100%" border=1>
<TBODY>
<TR>
<TD>The interface ManagedConnection defines method associateConnection as follows: 
<P>public interface javax.resource.spi.ManagedConnection {<BR>&nbsp;&nbsp;&nbsp; public void associateConnection(Object connection) throws ResourceException;<BR>&nbsp;&nbsp;&nbsp; ...<BR>}</P>
<P>The container uses the associateConnection method to change the association of an application-level connection handle with a ManagedConnection instance. The container finds the right ManagedConnection instance, depending on the connection sharing scope, and calls the associateConnection method. To achieve this, the container needs to keep track of connection handles acquired by component instances and ManagedConnection instances using an implementation-specific mechanism.</P>
<P>The associateConnection method implementation for a ManagedConnection should dissociate the connection handle passed as a parameter from its currently associated ManagedConnection and associate the new connection handle with itself.</P>
<P>Note that the switching of connection associations must happen only for connection handles and ManagedConnection instances that correspond to the same ManagedConnectionFactory instance. The container should enforce this restriction<BR>in an implementation-specific manner. If a container cannot enforce the restriction, the container should not use the connection association mechanism.</P>
<P>The resource adapter must implement the associateConnection method to support connection sharing. The container makes a decision on whether or not to use the associateConnection method implemented by a resource adapter.</P></TD></TR></TBODY></TABLE>
<P>　</P>
<P>6. Security</P>
<TABLE id=table19 width="100%" border=1>
<TBODY>
<TR>
<TD>If the res-auth element is set to Application, the component code performs a programmatic sign-on to the EIS. 
<P>If the res-auth element is Container, the application server takes on the responsibility of setting up and managing EIS sign-on.</P></TD></TR></TBODY></TABLE>
<P>　</P>
<TABLE id=table20 width="100%" border=1>
<TBODY>
<TR>
<TD>This security contract supports EIS sign-on by: 
<UL>
<LI>Passing the connection request from the resource adapter to the application server, enabling the application server to hook-in security services. 
<LI>Propagation of the security context, that is, JAAS Subject with principal and credentials, from the application server to the resource adapter. </LI></UL></TD></TR></TBODY></TABLE>
<P>　</P>
<TABLE id=table21 width="100%" border=1>
<TBODY>
<TR>
<TD>The application server has the following options for invoking the createManagedConnection method: 
<P>Option A: The application server invokes the createManagedConnection method by passing in a non-null Subject instance that carries a single resource principal and its corresponding password-based credentials, represented by the class PasswordCredential that provides the user name and password. The PasswordCredential should be set in the Subject instance as part of the private credential set. Note that the passed Subject can contain multiple PasswordCredential instances.<BR>The resource adapter extracts the username and password from this Subject instance by looking for the PasswordCredential instance in the Subject, and uses this security information to sign-on to the EIS instance during connection creation.</P>
<P>Option B: The application server invokes the createManagedConnection method by passing in a non-null Subject instance that carries a single resource principal and its security credentials. In this option, credentials are represented through the GSSCredential interface. A typical example is a Subject instance with Kerberos credentials. For example, an application server may use this option for createManagedConnection method invocation when the resource principal is<BR>impersonating the caller or initiating principal, and has valid credentials acquired through impersonation. An application server may also use this option for principal mapping scenarios with credentials of a resource principal represented through the GSSCredential interface. Note that sensitive credentials requiring special protection, such as private cryptographic keys, are stored within a private credential set, while credentials intended to be shared, such as public key certificates or Kerberos server tickets, are stored within a public credential set. The two methods<BR>getPrivateCredentials and getPublicCredentials should be used accordingly. In the case of Kerberos mechanism type, the application server must pass the principal’s ticket granting ticket (TGT) to a resource adapter in a private credential set. The resource adapter uses the resource principal and its credentials from the Subject instance to go through the EIS sign-on process before creating a new connection to the EIS.</P>
<P>Option C: The application server invokes the createManagedConnection method by passing a null Subject instance. The application server must use this option for the component-managed sign-on case. In this option, security information is carried in the ConnectionRequestInfo instance. The application server does not provide any security information that can be used by the resource adapter for managing EIS sign-on. During the deployment of a resource adapter, the application server must be configured to use one of the above specified invocation options.</P></TD></TR></TBODY></TABLE>
<P>　</P>
<TABLE id=table22 width="100%" border=1>
<TBODY>
<TR>
<TD>A resource adapter can do EIS sign-on and connection creation in an implementation-specific way, or it can use the GSS-API. A resource adapter has the following options, corresponding to the options for an application server, for handling the invocation of the createManagedConnection method: 
<P>Option A: The resource adapter explicitly checks whether the passed Subject instance carries a PasswordCredential instance using the Subject.getPrivateCredentials method. Note that the security contract assumes that a resource adapter has the necessary security permissions to extract a private credential set from a Subject instance. The specific mechanism through which such permission is set up is outside the scope of the connector architecture. If the Subject instance contains a PasswordCredential instance, the resource adapter extracts the username and password from the PasswordCredential. It uses the security information to authenticate the resource principal, corresponding to the username, to the EIS during the creation of a connection. In this case, the resource adapter uses an authentication mechanism that is EIS specific. Since a Subject instance can carry multiple PasswordCredential instances, a ManagedConnectionFactory should only use a PasswordCredential instance that has been specifically passed to it through the security contract. The getManagedConnectionFactory method enables a ManagedConnectionFactory instance to determine whether or not a PasswordCredential instance is to be used for sign-on to the target EIS instance. The ManagedConnectionFactory implementation uses the equals method to compare itself with the passed instance.</P>
<P>Option B: The resource adapter explicitly checks whether the passed Subject instance carries a GSSCredential instance using the getPrivateCredentials and getPublicCredentials methods defined in the Subject interface. In the case of Kerberos mechanism type, the resource adapter must extract Kerberos credentials using the getPrivateCredentials method in the Subject interface. The resource adapter uses the resource principal and its credentials, represented by the GSSCredential interface, in the Subject instance to go through the EIS sign-on process. For example, this option is used for Kerberos-based credentials that have been acquired by the resource principal through impersonation. A resource adapter uses the getter methods defined in the GSSCredential interface to extract information about the credential and its principal. If a resource adapter is using the GSS mechanism, the resource adapter uses a reference to the GSSCredential instance in an opaque manner and is not required to understand any mechanism-specific credential representation. However, a resource adapter may need to interpret credential representation if the resource adapter initiates authentication in an implementation-specific manner.</P>
<P>Option C: If the application server invokes the ManagedConnectionFactory.createManagedConnection method with a null Subject instance, a resource adapter has the following options: The resource adapter should extract security information passed through the ConnectionRequestInfo instance. The resource adapter should authenticate the resource principal by combining the configured security information on the ManagedConnectionFactory instance with the security information passed through the ConnectionRequestInfo instance. The default behavior for the resource adapter is to allow the security information in the ConnectionRequestInfo parameter to override the configured security information in the ManagedConnectionFactory instance. If the resource adapter does not find any security configuration in the ConnectionRequestInfo instance, the resource adapter uses the default security configuration in the ManagedConnectionFactory instance. If the EIS does not require authentication, the resource adapter does not need any security information from the ConnectionRequestInfo instance, and hence may ignore such security information. This may happen due to a disconnect between the application and the resource adapter.</P></TD></TR></TBODY></TABLE>
<P>　</P>
<P>7. Activation</P>
<TABLE id=table41 width="100%" border=1>
<TBODY>
<TR>
<TD>An ActivationSpec JavaBean instance encapsulates the configuration information needed to setup asynchronous message delivery to a message endpoint. 
<P>Each ActivationSpec can also specify a list of required properties. These required properties can be used to validate the configuration of an ActivationSpec JavaBean instance.</P></TD></TR></TBODY></TABLE>
<P>　</P>
<TABLE id=table23 width="100%" border=1>
<TBODY>
<TR>
<TD>The message-driven bean developer provides activation configuration information in the message-driven bean deployment descriptor. This includes messaging style specific configuration details, and possibly message provider-specific details as well, which is used by the message-driven bean deployer to setup the activation.</TD></TR></TBODY></TABLE>
<P>　</P>
<TABLE id=table24 width="100%" border=1>
<TBODY>
<TR>
<TD>The resource adapter provides the following information via the resource adapter deployment descriptor that is used by the endpoint deployer to setup endpoint activation: 
<UL>
<LI>List of Supported Message Listener Types 
<LI>ActivationSpec JavaBean 
<LI>Administered Objects </LI></UL></TD></TR></TBODY></TABLE>
<P>　</P>
<TABLE id=table25 width="100%" border=1>
<TBODY>
<TR>
<TD>The endpoint application’s activation-config properties, specified in the endpoint deployment descriptor, should be a subset of the ActivationSpec JavaBean’s properties. There must be a one-to-one correspondence between the activation-config property names and the ActivationSpec JavaBean’s property names. This allows automatic merging of the activation-config properties with an ActivationSpec JavaBean instance during endpoint deployment. Any specified activation-config property which does not have a matching property in the ActivationSpec JavaBean should be treated as an error.</TD></TR></TBODY></TABLE>
<P>　</P>
<TABLE id=table27 width="100%" border=1>
<TBODY>
<TR>
<TH>Activation Spec Value Priority</TH>
<TH>Activation Spec Value Position</TH></TR>
<TR>
<TD align=middle>Highest</TD>
<TD>MDB Configured Deployment Descriptor</TD></TR>
<TR>
<TD align=middle>　</TD>
<TD>MDB Default Deployment Descriptor(Merged ActivationSpec Bean)</TD></TR>
<TR>
<TD align=middle>　</TD>
<TD>Configured ActivationSpec Bean</TD></TR>
<TR>
<TD align=middle>Lowest</TD>
<TD>Default ActivationSpec Bean</TD></TR></TBODY></TABLE>
<P>　</P>
<TABLE id=table42 width="100%" border=1>
<TBODY>
<TR>
<TD>Before any messages can be delivered to a message endpoint, the message endpoint must be associated with a destination. This task is performed during application installation. Therefore, the responsibility of associating a message-driven bean with a destination lies with the application deployer. The application deployer creates an instance of the ActivationSpec JavaBean for the relevant resource adapter and associates it with the message endpoint during installation. In this way an ActivationSpec JavaBean, through its destination property, associates a message endpoint with a destination on the message provider. 
<P>A message endpoint is activated by the application server when the message endpoint application is started. During message endpoint activation, the application server passes the ActivationSpec JavaBean, and a reference to the<BR>MessageEndpointFactory, to the resource adapter by invoking its endpointActivation method.</P>
<P>The resource adapter uses the information in the ActivationSpec JavaBean to interact with messaging provider and setup message delivery to the message endpoint. For a JMS message-driven bean, this might involve configuring a<BR>message selector or a durable subscription against the destination. Once the endpointActivation method returns, the message endpoint is ready to receive messages.</P>
<P>The following steps describe the sequence of events that occur when a message arrives at a destination:</P>
<OL>
<LI>The resource adapter detects the arrival of a message at the destination. 
<LI>The resource adapter invokes the createEndpoint method on the MessageEndpointFactory. 
<LI>The MessageEndpointFactory obtains a reference to a message endpoint. This might be an unused message endpoint obtained from a pool or, if no message endpoints are available, it can create a new message endpoint. 
<LI>The MessageEndpointFactory returns a proxy to this message endpoint instance to the resource adapter. 
<LI>The resource adapter uses the message endpoint proxy to deliver the message to the message endpoint. </LI></OL>
<P>Several other messaging providers exist that require similar functionality to message-driven beans within the EJB container, such as the Java API for XML Messaging (JAXM). Because of this, version 2.1 of the EJB specification expanded the definition of message-driven beans to provide support for messaging providers other than JMS providers. It does this by allowing a message-driven bean to implement an interface other than the javax.jms.MessageListener interface. The type of message listener interface that a message-driven bean implements determines its type.</P>
<P>The EJB specification states that, if the message listener interface supports the request-reply pattern in this manner, it is the responsibility of the EJB container to deliver the reply message to the resource adapter.</P></TD></TR></TBODY></TABLE>
<P>　</P>
<P>8. Work</P>
<TABLE id=table38 width="100%" border=1>
<TBODY>
<TR>
<TD>Note that, rather than calling the MessageEndpointFactory directly, the resource adapter is likely to instantiate a Work object, and pass it to the application server via the WorkManager interface. When the doWork method of the WorkManager is called the dispatch will occur. This will allow the resource adapter to continue to process incoming messages without blocking until message-driven bean dispatch has completed.</TD></TR></TBODY></TABLE>
<P>　</P>
<TABLE id=table28 width="100%" border=1>
<TBODY>
<TR>
<TD>The resource adapter can use the message inflow contract to call a message-driven bean, and use the message-driven bean to dispatch calls to session and entity beans using the EJB client view model. The EJB specification allows a request-response style message-driven bean call which could be used for synchronous RPC-style calls. The message-driven bean could be packaged either with the resource adapter or separately.</TD></TR></TBODY></TABLE>
<P>　</P>
<P>9. CCI</P>
<TABLE id=table29 width="100%" border=1>
<TBODY>
<TR>
<TD>The CCI is designed with the following goals: 
<UL>
<LI>It is targeted primarily towards application development tools and EAI frameworks, not application component. 
<LI>It defines a remote function-call interface that focuses on executing functions on an EIS and retrieving the results. The CCI can form a base level API for EIS access on which higher level functionality can be built. 
<LI>Although it is simple, it has sufficient functionality and an extensible application programming model. 
<LI>It provides an API that both leverages and is consistent with various facilities defined by the J2SE and J2EE platforms. 
<LI>It is independent of a specific EIS. For example, it does not use data types specific to an EIS. However, the CCI can be capable of being driven by EIS-specific metadata from a repository. </LI></UL>
<P>An important goal for the CCI is to complement existing standard JDBC API and not to replace this API. The CCI defines a common client API that is parallel to the JDBC for EISs that are not relational databases.</P>
<P>An EAI or application development tool uses a metadata repository to drive CCIbased interactions with heterogeneous EISs. A repository may maintain meta information about functions, with type mapping information and data structures for the invocation parameters, existing on an EIS system.</P>
<P>The application development tool generates Java classes based on the meta information accessed from a metadata repository. These Java classes encapsulate CCI-based interactions and expose a simple application programming model, typically based on the JavaBeans framework, to the application developers. An application component uses the generated Java classes for EIS access. 
<P>The application programming model for a <B><I>Record</I></B> is as follows: 
<UL>
<LI>A component creates an instance of a generated implementation class for a custom record. The implementation class represents an EIS-specific data structure. 
<LI>A component uses the RecordFactory interface to create an instance of the generic Record implementation class. The implementation class of a generic Record is independent of any EIS-specific data structure. </LI></UL>
<P>In cases of both custom and generic Records, the type mapping information is provided by a metadata repository either at development-time or runtime.</P></TD></TR></TBODY></TABLE>
<P>　</P>
<TABLE id=table30 width="100%" border=1>
<TBODY>
<TR>
<TD>It is important to note that the properties passed through the getConnection method should be client-specific, such as username, password, and language, and not be related to the configuration of a target EIS instance, such as port number or server name. The ManagedConnectionFactory instance is configured with a complete set of properties required for the creation of a connection to an EIS instance. Configured properties on a ManagedConnectionFactory can be overridden by client-specific properties passed by an application component through the getConnection method. 
<P>An important point to note is about the relationship between ConnectionSpec and ConnectionRequestInfo. The ConnectionSpec is used at the application level and is defined under the scope of CCI while ConnectionRequestInfo is defined as part of the system contracts. Separate interfaces have been defined to ensure the separation between CCI interfaces and system contracts. ConnectionRequestInfo has no explicit dependency on CCI. Note that a resource adapter may not implement CCI but it must implement system contracts. The specification of a standard repository API and metadata format is outside the scope of the current version of the connector architecture. The mapping between CCI’s ConnectionSpec and ConnectionRequestInfo is achieved in an implementation-specific manner by a resource adapter.</P></TD></TR></TBODY></TABLE>
<P>　</P>
<P>10. Deployment</P>
<TABLE id=table31 width="100%" border=1>
<TBODY>
<TR>
<TD>When a standalone resource adapter RAR is deployed, the resource adapter must be made available to all J2EE applications in the application server. When a resource adapter RAR packaged within a J2EE application EAR is deployed, the resource adapter must be made available only to the J2EE application with which it is packaged.</TD></TR></TBODY></TABLE>
<P>　</P>
<TABLE id=table32 width="100%" border=1>
<TBODY>
<TR>
<TD>The deployment code retrieves the configuration properties from the XML deployment descriptor for the resource adapter. The deployment code then creates an instance of the ManagedConnectionFactory implementation class and configures the properties of the instance. 
<P>The deployment code uses the ManagedConnectionFactory instance to create a connection factory instance. The code then registers the connection factory instance in the JNDI namespace.</P>
<P>The following steps occur when an application component calls the method JNDI Context.lookup to lookup a connection factory instance:</P>
<UL>
<LI>JNDI passes control to the application server. The ObjectFactory.getObjectInstance method implemented by the application server is called. 
<LI>The application server creates a new instance of the ManagedConnectionFactory implementation class provided by the resource adapter. 
<LI>The application server calls setter methods on the ManagedConnectionFactory instance to set various configuration properties of this instance. These properties provide information required by the ManagedConnectionFactory instance to<BR>create physical connections to the underlying EIS. The application server uses an existing property set configured during the deployment of a resource adapter to set the required properties of the ManagedConnectionFactory instance. 
<LI>After the newly created ManagedConnectionFactory instance has been configured with its properties set, the application server creates a new ConnectionManager instance. 
<LI>The application server calls the createConnectionFactory method of the ManagedConnectionFactory instance, passing in the ConnectionManager instance from the previous step, to get a ConnectionFactory instance. 
<LI>The application server returns the connection factory instance to the JNDI provider, so that this instance can be returned as a result of the JNDI lookup. The application component gets the ConnectionFactory instance as a result of the<BR>JNDI lookup. </LI></UL></TD></TR></TBODY></TABLE>
<P>　</P>
<TABLE id=table37 width="100%" border=1>
<TBODY>
<TR>
<TD>ra.xml specify ManagedConnectionFactory--&gt;Application Server Reflect--&gt;associate ConnectionManager--&gt;invoke createConnectionFactory to get cci.ConnectionFactory cccf--&gt;client invoke cccf.getConnection--&gt;delegate to ConnectionManager.allocateConnection--&gt;hook service--&gt;delegate to ManagedConnectionFactory.createConnection</TD></TR></TBODY></TABLE><img src ="http://www.blogjava.net/chelsea/aggbug/27692.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/chelsea/" target="_blank">切尔斯基</a> 2006-01-12 11:22 <a href="http://www.blogjava.net/chelsea/archive/2006/01/12/27692.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>WebSphere Application Server V6 备忘录</title><link>http://www.blogjava.net/chelsea/archive/2005/12/28/25789.html</link><dc:creator>切尔斯基</dc:creator><author>切尔斯基</author><pubDate>Wed, 28 Dec 2005 14:07:00 GMT</pubDate><guid>http://www.blogjava.net/chelsea/archive/2005/12/28/25789.html</guid><wfw:comment>http://www.blogjava.net/chelsea/comments/25789.html</wfw:comment><comments>http://www.blogjava.net/chelsea/archive/2005/12/28/25789.html#Feedback</comments><slash:comments>3</slash:comments><wfw:commentRss>http://www.blogjava.net/chelsea/comments/commentRss/25789.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/chelsea/services/trackbacks/25789.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 1. WebSphere with Optimizeit <br>2. WebSphere with DataSource <br>3. WebSphere with JVM Arguments <br>4. WebSphere with Default JMS Provider, JCA, and SIB <br>5. WebSphere with MQSeries <br>6. WebSphere with JNDI<br>7. Misc     &nbsp;&nbsp;<a href='http://www.blogjava.net/chelsea/archive/2005/12/28/25789.html'>阅读全文</a><img src ="http://www.blogjava.net/chelsea/aggbug/25789.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/chelsea/" target="_blank">切尔斯基</a> 2005-12-28 22:07 <a href="http://www.blogjava.net/chelsea/archive/2005/12/28/25789.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>[导入]Programming JUnitee</title><link>http://www.blogjava.net/chelsea/archive/2005/11/17/26230.html</link><dc:creator>切尔斯基</dc:creator><author>切尔斯基</author><pubDate>Thu, 17 Nov 2005 00:23:00 GMT</pubDate><guid>http://www.blogjava.net/chelsea/archive/2005/11/17/26230.html</guid><wfw:comment>http://www.blogjava.net/chelsea/comments/26230.html</wfw:comment><comments>http://www.blogjava.net/chelsea/archive/2005/11/17/26230.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/chelsea/comments/commentRss/26230.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/chelsea/services/trackbacks/26230.html</trackback:ping><description><![CDATA[JUnitEE is a simple extension to JUnit which allows standard test cases to be run from within a J2EE application server. JUnit provides the framework for writing your unit tests, and JUnitEE gives you the possibility to run these tests inside your application server. This has the advantage of testing your EJB/servlet-based application in the same environment it will run when in production<img src ="http://blog.csdn.net/platformlib/aggbug/531193.aspx" width = "1" height = "1" /><br>文章来源:<a href='http://blog.csdn.net/platformlib/archive/2005/11/17/531193.aspx'>http://blog.csdn.net/platformlib/archive/2005/11/17/531193.aspx</a><img src ="http://www.blogjava.net/chelsea/aggbug/26230.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/chelsea/" target="_blank">切尔斯基</a> 2005-11-17 08:23 <a href="http://www.blogjava.net/chelsea/archive/2005/11/17/26230.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>[导入]Programming Ant</title><link>http://www.blogjava.net/chelsea/archive/2005/11/14/26231.html</link><dc:creator>切尔斯基</dc:creator><author>切尔斯基</author><pubDate>Mon, 14 Nov 2005 13:03:00 GMT</pubDate><guid>http://www.blogjava.net/chelsea/archive/2005/11/14/26231.html</guid><wfw:comment>http://www.blogjava.net/chelsea/comments/26231.html</wfw:comment><comments>http://www.blogjava.net/chelsea/archive/2005/11/14/26231.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/chelsea/comments/commentRss/26231.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/chelsea/services/trackbacks/26231.html</trackback:ping><description><![CDATA[1, Initialized Project
2, Share properties with plain java code
3, Organize layered build files or refer tasks/targets/properties in other build file for large scale application 
4, id anywhere for reuse
5, method target anywhere for reuse
6, synchronized call
7, script ant


1, access environment variable
2, access JVM variable
3, property is immutable
<img src ="http://blog.csdn.net/platformlib/aggbug/529060.aspx" width = "1" height = "1" /><br>文章来源:<a href='http://blog.csdn.net/platformlib/archive/2005/11/14/529060.aspx'>http://blog.csdn.net/platformlib/archive/2005/11/14/529060.aspx</a><img src ="http://www.blogjava.net/chelsea/aggbug/26231.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/chelsea/" target="_blank">切尔斯基</a> 2005-11-14 21:03 <a href="http://www.blogjava.net/chelsea/archive/2005/11/14/26231.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Essential SSL: Concepts and Practice, Example by OpenSSL</title><link>http://www.blogjava.net/chelsea/archive/2005/11/13/19624.html</link><dc:creator>切尔斯基</dc:creator><author>切尔斯基</author><pubDate>Sun, 13 Nov 2005 15:48:00 GMT</pubDate><guid>http://www.blogjava.net/chelsea/archive/2005/11/13/19624.html</guid><wfw:comment>http://www.blogjava.net/chelsea/comments/19624.html</wfw:comment><comments>http://www.blogjava.net/chelsea/archive/2005/11/13/19624.html#Feedback</comments><slash:comments>7</slash:comments><wfw:commentRss>http://www.blogjava.net/chelsea/comments/commentRss/19624.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/chelsea/services/trackbacks/19624.html</trackback:ping><description><![CDATA[<br><a href="http://blog.csdn.net/gongflow/archive/2007/03/09/1525113.aspx"><img src="http://blog.csdn.net/images/authorship.gif" border="0" height="13" width="15">&nbsp;Essential Security: PKI, SSL and Xml Security</a>
<br><br><a href="http://blog.csdn.net/platformlib/archive/2007/03/09/1525119.aspx"><img src="http://blog.csdn.net/images/authorship.gif" border="0" height="13" width="15">&nbsp;Essential Security Tools: OpenSSL and Keytool</a>
<br><img src ="http://www.blogjava.net/chelsea/aggbug/19624.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/chelsea/" target="_blank">切尔斯基</a> 2005-11-13 23:48 <a href="http://www.blogjava.net/chelsea/archive/2005/11/13/19624.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Managing the Container in Spring</title><link>http://www.blogjava.net/chelsea/archive/2005/09/26/14153.html</link><dc:creator>切尔斯基</dc:creator><author>切尔斯基</author><pubDate>Mon, 26 Sep 2005 14:36:00 GMT</pubDate><guid>http://www.blogjava.net/chelsea/archive/2005/09/26/14153.html</guid><wfw:comment>http://www.blogjava.net/chelsea/comments/14153.html</wfw:comment><comments>http://www.blogjava.net/chelsea/archive/2005/09/26/14153.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.b