<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
  <channel>
    <title>王宾</title>
    <description>交个朋友吧，我叫王宾，msn:duobin2001@hotmail.com</description>
    <link>http://ssh.javaeye.com</link>
    <language>UTF-8</language>
    <copyright>Copyright 2003-2008, JavaEye.com</copyright>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <generator>JavaEye - 做最棒的软件开发交流社区</generator>
          <item>
        <title>做了几年软件，我都做了什么？？</title>
        <author>duobin3000</author>
        <description>
          <![CDATA[
          <br/>
          作者: <a href="http://ssh.javaeye.com">duobin3000</a>&nbsp;
                    链接：<a href="http://ssh.javaeye.com/blog/246758" style="color:red;">http://ssh.javaeye.com/blog/246758</a>&nbsp;
          发表时间: 2008年09月25日
          <br/><br/>
          声明：本文系JavaEye网站发布的原创博客文章，未经作者书面许可，严禁任何网站转载本文，否则必将追究法律责任！
          <br/><br/>
          <p>1、select 2、delete 3、update 4、insert</p>
<p>----------这几年，我好像都是在做这样的活。</p>
<p>没有毕业的时候，用jsp\struts写，毕业了开用webwork写，反正不管是spring hibernate ibatis还是ejb,还是jboss seam；最后都是干上面的事情；也不管是jbpm,还是drool。。。。好像干的都是一样的东西。到了最近后台好像没怎么变，前台改了改，开始用flex ,后台还是那老一套东西：spring hibernate，或者多加个memcached；反正都没有逃过CRUD这样东西。无论是你是一个类实现所有的东西，还是分3层，分4层，还是BEA的分7层，还都是CRUD。。</p>
<p>&nbsp;</p>
<p>================================================</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp; 并发太高了，系统不行了---同事叫道，开始集群。。。。。为CRUD做奴隶</p>
<p>=========================================================</p>
<p>&nbsp;</p>
<p>&nbsp;&nbsp; &nbsp; 去年开始关注SOA，学习了些SOA的东西，可气的是还跑到BEA去参加了他们的SOA培训，虽然自己没掏多少腰包，就是粒度粗细不同去做CRUD，用WS去调一下别人的CRUD。不同的是就是要注意点安全，耦合更低些。</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp; 前几个月，公司有同事说，咱们那么多业务，采用OSGI来单独开发部署吧，其实做了那么多还不是CRUD嘛。。。。。。。。</p>
<p>====================================================================</p>
<p>&nbsp;&nbsp;&nbsp; 开始看swing，弄弄eclipse RCP-----开始搞搞eclipse 插件-------远离CRUD点了；</p>
<p>&nbsp;</p>
<p>&nbsp;&nbsp;&nbsp; 传真发送的在线预览，公司需要去截获发送到传真机上的数据流，要用C++去调用有关API，开始弄C++，又一次不操作CRUD</p>
<p>==================================================================</p>
<p>&nbsp;&nbsp; 朋友推荐说有个面向并发的语言，搞搞它，于是我开始看erlang</p>
<p>==========================--===================================</p>
<p>&nbsp;&nbsp;&nbsp; 项目做了一个又一个，重复性的代码写了又写，开始关注代码质量，学习重构，然后重构，看设计，学设计，做设计，</p>
<p>学习代码艺术，重整设计，重整代码；------------我的路在何方？？？？？？？？？？</p>
<p>&nbsp;&nbsp; 开始关注项目管理，项目质量、项目进度、项目成本；--------------国内有多少公司用的到啊，做了计划是给别人看得，写的设计文档自己都不看...............................................</p>
<p>==========================================================================</p>
<p>&nbsp;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;这样一路走来，我什么也没学会，回头想想，我这几年都做了什么？？？？？？？？？</p>
          <br/><br/>
          <span style="color:red;">
            <a href="http://ssh.javaeye.com/blog/246758#comments" style="color:red;">已有 <strong>7</strong> 人发表留言，猛击-&gt;&gt;<strong>这里</strong>&lt;&lt;-参与讨论</a>
          </span>
          <br/><br/><br/>
          <span style="color:#E28822;">JavaEye推荐</span>
          <br/>
          <ul class='adverts'><li><a href='/adverts/42' target='_blank'><span style="color:red;font-weight:bold;">搜狐网站诚聘Java、PHP和C++工程师</span></a></li><li><a href='/adverts/41' target='_blank'><span style="color:red;font-weight:bold;">Windows7在微软WinHEC 2008上揭开神秘面纱</span></a></li></ul>
          <br/><br/><br/>
          ]]>
        </description>
        <pubDate>Thu, 25 Sep 2008 17:24:17 +0800</pubDate>
        <link>http://ssh.javaeye.com/blog/246758</link>
        <guid>http://ssh.javaeye.com/blog/246758</guid>
      </item>
          <item>
        <title>mysql数据库分布式存储架构</title>
        <author>duobin3000</author>
        <description>
          <![CDATA[
          <br/>
          作者: <a href="http://ssh.javaeye.com">duobin3000</a>&nbsp;
                    链接：<a href="http://ssh.javaeye.com/blog/246735" style="color:red;">http://ssh.javaeye.com/blog/246735</a>&nbsp;
          发表时间: 2008年09月25日
          <br/><br/>
          声明：本文系JavaEye网站发布的原创博客文章，未经作者书面许可，严禁任何网站转载本文，否则必将追究法律责任！
          <br/><br/>
          <p>哎。。。。。。。。一句长叹，动手能力啊！</p>
<p>最近一个礼拜都在考虑我们这个SAAS平台的数据存储，如何能让它方便扩容，而不影响程序----不要像MIXI(<a href="http://www.mixi.jp">www.mixi.jp</a>)等大型网站，查询点数据，要先把数据库实例的tableName传递过去，在程序中传来传去。到时候不想不 改程序都难（也不是做不到，但是是非常麻烦；ebay比较聪明，自己做了个ORM机制）；经过最近的研究发现国人也有人做了个东西(广州的一个小伙，具体sourceforge上有)，但是这样的东西mysql-proxy早给我们做好了，只不过它还是个测试版，没有正式版本用，但是很稳定。结果我们的数据库架构很是简单，也很容易进行扩容。</p>
<p>&nbsp;</p>
<p>&nbsp;&nbsp; 啰嗦了半天，其实是很简单的 ，先将你的业务进行垂直分割------没那么玄乎的，就是把模块单独部署，每个模块访问自己的DB，然后如果今后测试发现DB的瓶颈出来了，就在吧你的表结果进行水平分割，就是多加几个一样的表结构，具体访问策略以前大家可能是hash,rang等-----所以有了上面mixi他们都是传递个表名过去。以前这个分割策略很重要，现在可喜的是mysql5.1版本发布了，它提供了分区的功能，可以代替以前的水平划分----------具体使用很简单，官方文档说明的很清楚，我就不罗嗦了。</p>
<p>&nbsp;&nbsp; 如果看到这里还不知道我在说什么，你就骂我是猪好了。</p>
<p>&nbsp;</p>
<p>------------------就是mysql-proxy+mysql5.1的分区+mysql的主从复制，就那么简单。</p>
          <br/><br/>
          <span style="color:red;">
            <a href="http://ssh.javaeye.com/blog/246735#comments" style="color:red;">已有 <strong>0</strong> 人发表留言，猛击-&gt;&gt;<strong>这里</strong>&lt;&lt;-参与讨论</a>
          </span>
          <br/><br/><br/>
          <span style="color:#E28822;">JavaEye推荐</span>
          <br/>
          <ul class='adverts'><li><a href='/adverts/41' target='_blank'><span style="color:red;font-weight:bold;">Windows7在微软WinHEC 2008上揭开神秘面纱</span></a></li><li><a href='/adverts/42' target='_blank'><span style="color:red;font-weight:bold;">搜狐网站诚聘Java、PHP和C++工程师</span></a></li></ul>
          <br/><br/><br/>
          ]]>
        </description>
        <pubDate>Thu, 25 Sep 2008 16:57:29 +0800</pubDate>
        <link>http://ssh.javaeye.com/blog/246735</link>
        <guid>http://ssh.javaeye.com/blog/246735</guid>
      </item>
          <item>
        <title>数据结构</title>
        <author>duobin3000</author>
        <description>
          <![CDATA[
          <br/>
          作者: <a href="http://ssh.javaeye.com">duobin3000</a>&nbsp;
                    链接：<a href="http://ssh.javaeye.com/blog/243002" style="color:red;">http://ssh.javaeye.com/blog/243002</a>&nbsp;
          发表时间: 2008年09月17日
          <br/><br/>
          声明：本文系JavaEye网站发布的原创博客文章，未经作者书面许可，严禁任何网站转载本文，否则必将追究法律责任！
          <br/><br/>
          <p><strong><span style="color: #ff0000; background-color: #ffffff;">数据结构</span></strong>：是一门研究非数值计算的程序设计问题中的计算机的<strong><span style="font-size: medium;">操作对象</span></strong>以及它们之间的<strong><span style="font-size: medium;">关系和操作</span></strong>等的一门学科。</p>
<p>&nbsp;&nbsp; 即：它是研究的计算机中俄操作对象的关系和操作的学科：类的关系和方法（oo）；数组、结构体</p>
<p>、联合体等的元素和算法。</p>
<p><span style="font-size: medium; color: #ff0000;">数据：能输入到计算机并被计算机处理的符号的总称</span></p>
<p><span style="font-size: medium; color: #ff0000;">数据元素：：数据的基本单位，由若干数据项组成。数据项是不可分割的最小的数据单位</span></p>
<p><span style="font-size: medium; color: #ff0000;">数据对象：数据的子集，性质相同的数据元素的集合</span></p>
<p><span style="font-size: medium; color: #ff0000;">根据数据元素的关系的不同：</span></p>
<ol>
<li><span style="font-size: medium; color: #ff0000;">集合</span></li>
<li><span style="font-size: medium; color: #ff0000;">线性结构</span></li>
<li><span style="font-size: medium; color: #ff0000;">树形结构</span></li>
<li><span style="font-size: medium; color: #ff0000;">图形或网状结构</span></li>
</ol>
<p><span style="font-size: medium; color: #ff0000;">&nbsp; DS = (D,S)---D:数据元素 S-关系</span></p>
<p><span style="font-size: medium; color: #ff0000;">算法的特性：</span></p>
<ol>
<li><span style="font-size: medium; color: #ff0000;">有穷性</span></li>
<li><span style="font-size: medium; color: #ff0000;">确定性</span></li>
<li><span style="font-size: medium; color: #ff0000;">可行性</span></li>
<li><span style="font-size: medium; color: #ff0000;">输入</span></li>
<li><span style="font-size: medium; color: #ff0000;">输出</span></li>
</ol>
<p><span style="font-size: medium; color: #ff0000;">要求：</span></p>
<ol>
<li><span style="font-size: medium; color: #ff0000;">正确性</span></li>
<li><span style="font-size: medium; color: #ff0000;">可读性</span></li>
<li><span style="font-size: medium; color: #ff0000;">健壮性</span></li>
<li><span style="font-size: medium; color: #ff0000;">效率和低存储要求</span></li>
</ol>
          <br/><br/>
          <span style="color:red;">
            <a href="http://ssh.javaeye.com/blog/243002#comments" style="color:red;">已有 <strong>0</strong> 人发表留言，猛击-&gt;&gt;<strong>这里</strong>&lt;&lt;-参与讨论</a>
          </span>
          <br/><br/><br/>
          <span style="color:#E28822;">JavaEye推荐</span>
          <br/>
          <ul class='adverts'><li><a href='/adverts/42' target='_blank'><span style="color:red;font-weight:bold;">搜狐网站诚聘Java、PHP和C++工程师</span></a></li><li><a href='/adverts/41' target='_blank'><span style="color:red;font-weight:bold;">Windows7在微软WinHEC 2008上揭开神秘面纱</span></a></li></ul>
          <br/><br/><br/>
          ]]>
        </description>
        <pubDate>Wed, 17 Sep 2008 10:34:05 +0800</pubDate>
        <link>http://ssh.javaeye.com/blog/243002</link>
        <guid>http://ssh.javaeye.com/blog/243002</guid>
      </item>
          <item>
        <title>saas的体系结构调整</title>
        <author>duobin3000</author>
        <description>
          <![CDATA[
          <br/>
          作者: <a href="http://ssh.javaeye.com">duobin3000</a>&nbsp;
                    链接：<a href="http://ssh.javaeye.com/blog/228803" style="color:red;">http://ssh.javaeye.com/blog/228803</a>&nbsp;
          发表时间: 2008年08月16日
          <br/><br/>
          声明：本文系JavaEye网站发布的原创博客文章，未经作者书面许可，严禁任何网站转载本文，否则必将追究法律责任！
          <br/><br/>
          <h2 style="margin: 6pt 0cm 6pt 28.9pt;"><a name="_Toc206692700"><span lang="EN-US" style="mso-fareast-font-family: Arial; mso-bidi-font-family: Arial;"><span style="mso-list: Ignore;"><span style="font-size: small; font-family: Arial;">1.1</span><span style="font: 7pt &quot;Times New Roman&quot;;">&nbsp; </span></span></span><span style="font-size: small;"><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial;">现有</span><span lang="EN-US"><span style="font-family: Arial;">saas</span></span></span></a><span style="mso-bookmark: _Toc206692700;"><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial;"><span style="font-size: small;">平台的体系结构，心中的考虑</span></span></span></h2>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-indent: 21pt;"><span style="font-size: small;"><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman';">用户前台采用的</span><span lang="EN-US"><span style="font-family: Times New Roman;">flex</span></span><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman';">技术确实不错，整体上来看，给用户的感觉一个字：炫，这确实很能吸引用户的眼球。然而作为一个软件产品，它需要一个强劲的稳定的后台做支撑，图</span><span lang="EN-US"><span style="font-family: Times New Roman;">(1-1)</span></span><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman';">是目前我们所做的</span><span lang="EN-US"><span style="font-family: Times New Roman;">saas</span></span><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman';">的结构图，我不是说它不好，对比支付宝、掏宝、中石化等很多公司的产品，我觉得我们的</span><span lang="EN-US"><span style="font-family: Times New Roman;">saas</span></span><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman';">平台结构，显得太单薄，难以适应快速变化的业务。图</span><span lang="EN-US"><span style="font-family: Times New Roman;">1-2</span></span><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman';">是我的想法，基本上是一个</span><span lang="EN-US"><span style="font-family: Times New Roman;">SOA</span></span><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman';">模型，隐含着网格计算的模型；采用这种体系结构，各个模块之间的调用都是通过总线起调用。</span></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt;">&nbsp;</p>
<p class="MsoNormal" align="center" style="margin: 0cm 0cm 0pt; text-align: center;"><span style="font-size: small;"><span lang="EN-US"><span style="font-family: Times New Roman;">1-1</span></span><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman';">现有系统结构图</span></span></p>
<p class="MsoNormal" align="left" style="margin: 0cm 0cm 0pt; text-align: left;"><span style="font-size: small;"><span lang="EN-US"><span style="mso-tab-count: 1;"><span style="font-family: Times New Roman;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman';">目前开源的服务总线已经很多，</span><span lang="EN-US"><span style="font-family: Times New Roman;">openESB </span></span><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman';">，</span><span lang="EN-US"><span style="font-family: Times New Roman;">mule</span></span><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman';">，</span><span lang="EN-US"><span style="font-family: Times New Roman;">cxf</span></span><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman';">，</span><span lang="EN-US"><span style="font-family: Times New Roman;">ServiceMix</span></span><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman';">，</span><span lang="EN-US"><span style="font-family: Times New Roman;">jbossESB</span></span><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman';">等，他们各有利弊，如</span><span lang="EN-US"><span style="font-family: Times New Roman;">cxf mule</span></span><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman';">比较慢，</span><span lang="EN-US"><span style="font-family: Times New Roman;">mule</span></span><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman';">不直接支持集群，负载均衡，流量控制实现等都要自己实现；不过我们可以组合使用他们。这些刘伟应该比我熟悉，我仅仅简单用过</span><span lang="EN-US"><span style="font-family: Times New Roman;">mule</span></span><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman';">。</span></span></p>
<p class="MsoNormal" align="left" style="margin: 0cm 0cm 0pt; text-align: left;"><span style="font-size: small;"><span lang="EN-US"><span style="mso-tab-count: 1;"><span style="font-family: Times New Roman;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman';">假设采用</span><span lang="EN-US"><span style="font-family: Times New Roman;">mule+cxf</span></span><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman';">，他们的实现也是遵从</span><span lang="EN-US"><span style="font-family: Times New Roman;">spring</span></span><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman';">的哲学，从现有系统移植过去，我们现有的每个子模块不需要大做手术，要动的比较大的就是平台的体系，具体细节尚需仔细考虑。</span></span></p>
<p class="MsoNormal" align="left" style="margin: 0cm 0cm 0pt; text-align: left;"><span lang="EN-US"><span style="font-size: small; font-family: Times New Roman;">&nbsp;</span></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-indent: 21pt;">&nbsp;</p>
<p class="MsoNormal" align="center" style="margin: 0cm 0cm 0pt; text-indent: 21pt; text-align: center;"><span style="font-size: small;"><span lang="EN-US"><span style="font-family: Times New Roman;">1-2</span></span><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman';">心中的体系结构</span></span></p>
<h2 style="margin: 6pt 0cm 6pt 28.9pt;"><a name="_Toc206692701"><span lang="EN-US" style="mso-fareast-font-family: Arial; mso-bidi-font-family: Arial;"><span style="mso-list: Ignore;"><span style="font-size: small; font-family: Arial;">1.2</span><span style="font: 7pt &quot;Times New Roman&quot;;">&nbsp; </span></span></span><span style="font-family: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial;"><span style="font-size: small;">后台开发语言问题</span></span></a></h2>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 6.8pt; text-indent: 14.2pt;"><span style="font-size: small;"><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman';">目前，大多数的业务系统后台采用</span><span lang="EN-US"><span style="font-family: Times New Roman;">java</span></span><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman';">开发的较多</span><span lang="EN-US"><span style="font-family: Times New Roman;">(</span></span><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman';">当然采用其他语言的也很多</span><span lang="EN-US"><span style="font-family: Times New Roman;">)</span></span><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman';">，但是</span><span lang="EN-US"><span style="font-family: Times New Roman;">java ee</span></span><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman';">本身有其不足</span></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 6.8pt;"><span style="font-size: small;"><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman';">的地方，用来开发</span><span lang="EN-US"><span style="font-family: Times New Roman;">web2.0</span></span><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman';">显得有点吃力，这里有篇文章写的很好：</span><span lang="EN-US"><a href="http://www.ibm.com/developerworks/cn/web/wa-aj-web2jee/"><span style="font-family: Times New Roman;">http://www.ibm.com/developerworks/cn/web/wa-aj-web2jee/</span></a></span><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman';">；它所提出的解决方式就是异步，也说到了</span><span lang="EN-US"><span style="font-family: Times New Roman;">SEDA(mule</span></span><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman';">采用了该思想</span><span lang="EN-US"><span style="font-family: Times New Roman;">)----</span></span><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman';">把一个操作，通过若干个阶段来完成，各个阶段间通过事件来衔接。同时提到距离我们相对有些远的</span><span lang="EN-US"><span style="font-family: Times New Roman;">E</span></span><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman';">语言。</span></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt 6.8pt;"><span style="font-size: small;"><span lang="EN-US"><span style="mso-tab-count: 1;"><span style="font-family: Times New Roman;">&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman';">实际一点，我们的</span><span lang="EN-US"><span style="font-family: Times New Roman;">saas</span></span><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman';">一些业务处理确实可以通过其他比较快速的语言优势来处理，比如短信子系统，这个模块今后的并发要求应该比较高，这个时候我们今后可以采用</span><span lang="EN-US"><span style="font-family: Times New Roman;">erlang</span></span><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman';">来重写这个模块，或者直接用</span><span lang="EN-US"><span style="font-family: Times New Roman;">C</span></span><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman';">来写。</span></span></p>
          <br/><br/>
          <span style="color:red;">
            <a href="http://ssh.javaeye.com/blog/228803#comments" style="color:red;">已有 <strong>0</strong> 人发表留言，猛击-&gt;&gt;<strong>这里</strong>&lt;&lt;-参与讨论</a>
          </span>
          <br/><br/><br/>
          <span style="color:#E28822;">JavaEye推荐</span>
          <br/>
          <ul class='adverts'><li><a href='/adverts/42' target='_blank'><span style="color:red;font-weight:bold;">搜狐网站诚聘Java、PHP和C++工程师</span></a></li><li><a href='/adverts/41' target='_blank'><span style="color:red;font-weight:bold;">Windows7在微软WinHEC 2008上揭开神秘面纱</span></a></li></ul>
          <br/><br/><br/>
          ]]>
        </description>
        <pubDate>Sat, 16 Aug 2008 23:47:26 +0800</pubDate>
        <link>http://ssh.javaeye.com/blog/228803</link>
        <guid>http://ssh.javaeye.com/blog/228803</guid>
      </item>
          <item>
        <title>If not now, When?! If not me,Who?!!----------阿里</title>
        <author>duobin3000</author>
        <description>
          <![CDATA[
          <br/>
          作者: <a href="http://ssh.javaeye.com">duobin3000</a>&nbsp;
                    链接：<a href="http://ssh.javaeye.com/blog/218996" style="color:red;">http://ssh.javaeye.com/blog/218996</a>&nbsp;
          发表时间: 2008年07月24日
          <br/><br/>
          声明：本文系JavaEye网站发布的原创博客文章，未经作者书面许可，严禁任何网站转载本文，否则必将追究法律责任！
          <br/><br/>
          <p>&nbsp;&nbsp;&nbsp;&nbsp; 哎。。。。。。。。。。。。。。。。。话--说的很漂亮！但做的更漂亮。</p>
<p>今天读了马云给全体员工的邮件（顺便说一下，我不是阿里集团的员工），让我感慨万千啊，全球经济不景气，软件业就不会很好的发展，这对我们这里做软件的从业人员的发展是机遇也是挑战。</p>
<p>&nbsp;&nbsp;&nbsp; 打工者的想法很简单，能满足生活就可以，过的舒服点更好。但是如果经济真的进入了冬天，就怕到时候找一份养家的工作都不是那么的容易，小公司纷纷倒闭，大公司统统裁员；如何才能度过这个冬天呢？就看自己的做人做事了。</p>
<p>&nbsp;&nbsp; 创业者，有钱没钱都是困难的，客户少，没市场，也许这个时候也就是积累，做产品升级、优化的时候，但是创业要做什么软件呢？人家阿里有钱，我们有什么呢？物价那么高！</p>
          <br/><br/>
          <span style="color:red;">
            <a href="http://ssh.javaeye.com/blog/218996#comments" style="color:red;">已有 <strong>1</strong> 人发表留言，猛击-&gt;&gt;<strong>这里</strong>&lt;&lt;-参与讨论</a>
          </span>
          <br/><br/><br/>
          <span style="color:#E28822;">JavaEye推荐</span>
          <br/>
          <ul class='adverts'><li><a href='/adverts/42' target='_blank'><span style="color:red;font-weight:bold;">搜狐网站诚聘Java、PHP和C++工程师</span></a></li><li><a href='/adverts/41' target='_blank'><span style="color:red;font-weight:bold;">Windows7在微软WinHEC 2008上揭开神秘面纱</span></a></li></ul>
          <br/><br/><br/>
          ]]>
        </description>
        <pubDate>Thu, 24 Jul 2008 12:20:30 +0800</pubDate>
        <link>http://ssh.javaeye.com/blog/218996</link>
        <guid>http://ssh.javaeye.com/blog/218996</guid>
      </item>
          <item>
        <title>架构的设计(三)</title>
        <author>duobin3000</author>
        <description>
          <![CDATA[
          <br/>
          作者: <a href="http://ssh.javaeye.com">duobin3000</a>&nbsp;
                    链接：<a href="http://ssh.javaeye.com/blog/215037" style="color:red;">http://ssh.javaeye.com/blog/215037</a>&nbsp;
          发表时间: 2008年07月15日
          <br/><br/>
          声明：本文系JavaEye网站发布的原创博客文章，未经作者书面许可，严禁任何网站转载本文，否则必将追究法律责任！
          <br/><br/>
          <p>扯淡一把：</p>
<ol>
<li>可用性</li>
<li>可修改性</li>
<li>性能</li>
<li>安全性</li>
<li>可测试性</li>
<li>易用性</li>
<li>other:上市时间、成本/收益、系统生命周期、目标市场、推出计划、与老系统的集成</li>
</ol>
<p>这些东西虽然不是系统的功能需求，如果可户的这些要求达不到，最终会要求退货的。下面我们来吹吹怎么实现这样的非功能需求。</p>
<p>上面的各个属性都是相互制约的，都会对系统产生消极的影响，甚至相互是矛盾的，就要求我们怎么去取舍，在构架的设计中去<span style="background-color: #ccffcc; color: #ff0000; font-size: xx-large;"><strong>折中</strong>
</span>
处理。</p>
<p>(待续)</p>
<ol>
<li>从现实的系统出发，处理系统的HA，业界的方法也就是集群，在下个逢值到来之前，弄几个机器放上去，或增加web容器，或增加DB；增加cache</li>
<li>修改性嘛，其实还是代码的质量问题，让架构对程序员写的代码做约束，限制程序员的随意性</li>
<li>性能问题，先不说</li>
<li>安全性，没有绝对的安全，够用就可以了，ca ,https,saml.amopoint等，</li>
<li>易用是个问题，多和美工沟通一下吧</li>
</ol>
          <br/><br/>
          <span style="color:red;">
            <a href="http://ssh.javaeye.com/blog/215037#comments" style="color:red;">已有 <strong>0</strong> 人发表留言，猛击-&gt;&gt;<strong>这里</strong>&lt;&lt;-参与讨论</a>
          </span>
          <br/><br/><br/>
          <span style="color:#E28822;">JavaEye推荐</span>
          <br/>
          <ul class='adverts'><li><a href='/adverts/42' target='_blank'><span style="color:red;font-weight:bold;">搜狐网站诚聘Java、PHP和C++工程师</span></a></li><li><a href='/adverts/41' target='_blank'><span style="color:red;font-weight:bold;">Windows7在微软WinHEC 2008上揭开神秘面纱</span></a></li></ul>
          <br/><br/><br/>
          ]]>
        </description>
        <pubDate>Tue, 15 Jul 2008 16:41:08 +0800</pubDate>
        <link>http://ssh.javaeye.com/blog/215037</link>
        <guid>http://ssh.javaeye.com/blog/215037</guid>
      </item>
          <item>
        <title>构架设计(二)--概念</title>
        <author>duobin3000</author>
        <description>
          <![CDATA[
          <br/>
          作者: <a href="http://ssh.javaeye.com">duobin3000</a>&nbsp;
                    链接：<a href="http://ssh.javaeye.com/blog/215009" style="color:red;">http://ssh.javaeye.com/blog/215009</a>&nbsp;
          发表时间: 2008年07月15日
          <br/><br/>
          声明：本文系JavaEye网站发布的原创博客文章，未经作者书面许可，严禁任何网站转载本文，否则必将追究法律责任！
          <br/><br/>
          <p><br />
<br />
什么是软件构架：<br />
业界有很多不同的声音，分为不同的派别<br />
SEI给出的是（大意）：该系统的一个或多个结构，他们由软件元素，这些元素的外部可见属性以及这些元素的关系组成。<br />
内容有点绕，我个人的见解是，构架是由系统的元素以及元素的交互组成，什么是元素呢？它是对象 接口 函数 进程。也就是说构架就是他们的和他们的交互组成，<br />
<br />
系统构架从不同的角度去审视，实施者---部署构架，DBA---数据库构架，开发者---静态/动态图 等等。。。。<br />
<br />
在软件开发的过程中，由需求的核心需求决定构架，非核心来验证构架，但是非功能需求--质量属性也会决定构架，如客户要求并发，响应时间等。<br />
<br />
3个具体结构：<br />
1：模块分解结构<br />
<br />
2：使用结构<br />
<br />
3：进程结构<br />
<br />
他们3个相互补充，共同来组建系统。<br />
下面具体来说明：<br /></p>
<ul>
<li>
    * 模块分解的目标：</li>
</ul>
<p>
<br />
A：每个模块应该足够简单，能够被充分的理解<br />
<br />
B：模块是高内聚的，耦合要低</p>
<ul>
<li>* 调用关系&nbsp;</li>
</ul>
<ol>
<li>各个模块之间调用，方式很多，但是紧耦合是杜绝的，除非性能上要求很高，通常情况我们可以通过JMS，或者回调等方式，</li>
<li>接口注入，也是不错</li>
</ol>
<ul>
<li>进程结构</li>
</ul>
<ol>
<li></li>
</ol>
<p>
<br />
<br /></p>
<p>&nbsp;</p>
          <br/><br/>
          <span style="color:red;">
            <a href="http://ssh.javaeye.com/blog/215009#comments" style="color:red;">已有 <strong>0</strong> 人发表留言，猛击-&gt;&gt;<strong>这里</strong>&lt;&lt;-参与讨论</a>
          </span>
          <br/><br/><br/>
          <span style="color:#E28822;">JavaEye推荐</span>
          <br/>
          <ul class='adverts'><li><a href='/adverts/41' target='_blank'><span style="color:red;font-weight:bold;">Windows7在微软WinHEC 2008上揭开神秘面纱</span></a></li><li><a href='/adverts/42' target='_blank'><span style="color:red;font-weight:bold;">搜狐网站诚聘Java、PHP和C++工程师</span></a></li></ul>
          <br/><br/><br/>
          ]]>
        </description>
        <pubDate>Tue, 15 Jul 2008 15:50:11 +0800</pubDate>
        <link>http://ssh.javaeye.com/blog/215009</link>
        <guid>http://ssh.javaeye.com/blog/215009</guid>
      </item>
          <item>
        <title>架构的设计(一)</title>
        <author>duobin3000</author>
        <description>
          <![CDATA[
          <br/>
          作者: <a href="http://ssh.javaeye.com">duobin3000</a>&nbsp;
                    链接：<a href="http://ssh.javaeye.com/blog/215002" style="color:red;">http://ssh.javaeye.com/blog/215002</a>&nbsp;
          发表时间: 2008年07月15日
          <br/><br/>
          声明：本文系JavaEye网站发布的原创博客文章，未经作者书面许可，严禁任何网站转载本文，否则必将追究法律责任！
          <br/><br/>
          系统涉众影响架构，架构反作用于架构<br />活动周期：<br />1：为系统勾建一个按理<br /><br />2：理解需求<br /><br />3：创建或选择一个构架<br /><br />4：将构架变成文档，并与有关方面交流<br /><br />5：分析和评估你的构架---ATAM 和ABAM方法<br /><br />6：根据构架实现系统<br /><br />7：保证系统符合构架的需求<br /><br />过程的建议：<br />1：构架的设计应由某个人或某个设计者领导的小组完成<br />2：设计者应完全了解需求，包括非功能需求的质量属性<br />3：构架文档要完备<br />4：对构架应认真分析和评估<br />5：有助于增量开发跌代<br />结构的建议：<br />1：定义良好的模块，各模块间耸偶合调用<br />2：质量属性的构架实现，应建立在众所周知的基础上<br />3：构架应杜绝倚赖某个特定的商业产品或工具-------加一层屏蔽掉即可<br />4：数据产生模块和数据使用模块相隔离<br />5：构架应采用简单的交互模式，或者采用SEAD方式
          <br/><br/>
          <span style="color:red;">
            <a href="http://ssh.javaeye.com/blog/215002#comments" style="color:red;">已有 <strong>0</strong> 人发表留言，猛击-&gt;&gt;<strong>这里</strong>&lt;&lt;-参与讨论</a>
          </span>
          <br/><br/><br/>
          <span style="color:#E28822;">JavaEye推荐</span>
          <br/>
          <ul class='adverts'><li><a href='/adverts/41' target='_blank'><span style="color:red;font-weight:bold;">Windows7在微软WinHEC 2008上揭开神秘面纱</span></a></li><li><a href='/adverts/42' target='_blank'><span style="color:red;font-weight:bold;">搜狐网站诚聘Java、PHP和C++工程师</span></a></li></ul>
          <br/><br/><br/>
          ]]>
        </description>
        <pubDate>Tue, 15 Jul 2008 15:37:13 +0800</pubDate>
        <link>http://ssh.javaeye.com/blog/215002</link>
        <guid>http://ssh.javaeye.com/blog/215002</guid>
      </item>
          <item>
        <title>flex-spring如何集成</title>
        <author>duobin3000</author>
        <description>
          <![CDATA[
          <br/>
          作者: <a href="http://ssh.javaeye.com">duobin3000</a>&nbsp;
                    链接：<a href="http://ssh.javaeye.com/blog/194876" style="color:red;">http://ssh.javaeye.com/blog/194876</a>&nbsp;
          发表时间: 2008年05月20日
          <br/><br/>
          声明：本文系JavaEye网站发布的原创博客文章，未经作者书面许可，严禁任何网站转载本文，否则必将追究法律责任！
          <br/><br/>
          Using Flex with Spring<br />&nbsp; ----on detail,please see :http://coenraets.org/flex-spring/<br />UPDATE (1/12/2007): I put together a Tomcat-based Test Drive Server that includes the samples described below running out-of-the box. Read this post for more info.<br /><br />What is Spring?<br />Spring is one of the most popular Java frameworks. The foundation of the Spring framework is a lightweight component container that implements the Inversion of Control (IoC) pattern. <br /><br />Using an IoC container, components don’t instantiate or even look up their dependencies (the objects they work with). The container is responsible for injecting those dependencies when it creates the components (hence the term “Dependency Injection” also used to describe this pattern). <br /><br />The result is looser coupling between components. The Spring IoC container has proven to be a solid foundation for building robust enterprise applications. The components managed by the Spring IoC container are called Spring beans.<br /><br />The Spring framework includes several other modules in addition to its core IoC container. These modules are not covered in this document even though we will be using the Spring JDBC abstraction framework in examples 2 and 3 below. More information on the Spring framework can be found at http://www.springframework.org.<br /><br />What is Flex?<br />Flex provides a complete solution for building Rich Internet Applications. The Flex programming model is made of: <br /><br />ActionScript, an ECMAScript compliant, object-oriented programming model. With some syntactical differences, ActionScript looks and feels similar to Java, and supports the same object-oriented constructs: packages, classes, inheritance, interfaces, strong (but also dynamic) typing etc. <br />MXML: an XML-based language that provides an abstraction on top of ActionScript, and allows parts of an application (typically the View) to be built declaratively. <br />An extensive set of class libraries. The online API documentation is available here in a Javadoc-like format. <br />The Flex source code (.mxml and .as files) is compiled into Flash bytecode (.swf) that is executed at the client-side by the Flash virtual machine using a Just-In-Time compiler.<br /><br />A complete discussion of Flex is beyond the scope of this document. You can find more information at http://www.adobe.com/products/flex.<br /><br />How does Flex access back-end systems?<br />When writing Flex applications, you can access back-end systems using four different strategies:<br /><br />You can use the HTTPService component to send HTTP requests to a server, and consume the response. Although the HTTPService is typically used to consume XML, it can be used to consume other types of responses. The Flex HTTPService is similar to the XMLHttpRequest component available in Ajax. <br />You can use the WebService component to invoke SOAP-based web services. <br />You can use the RemoteObject component to directly invoke methods of Java objects deployed in your application server, and consume the return value. The return value can be a value of a primitive data type, an object, a collection of objects, an object graph, etc. In distributed computing terminology, this approach is generally referred to as “remoting”. This is also the terminology used in Spring to describe how different clients can access Spring beans remotely. <br />In addition to the RPC-type services described above, the Flex Data Management Services provide an innovative and virtually code-free approach to synchronize data between the client application and the middle-tier. <br />In this document, we focus on the Remoting (3) and Data Management Services (4) approaches described above because they enable the tightest integration with Spring. There is no need to transform data, or to expose services in a certain way: the Flex application works directly with the beans registered in the Spring IoC container.<br /><br />How does Flex access Spring beans? <br />So, if Flex clients can remotely access Java objects, and if Spring beans are Java objects, aren’t we all set and ready to start accessing Spring beans from Flex clients? Almost… There is one simple element to configure. <br /><br />The whole idea behind Spring IoC is to let the container instantiate components (and inject their dependencies). By default, however, components accessed remotely by a Flex client are instantiated by Flex destinations at the server-side. The key to the Flex/Spring integration is therefore to configure the Flex destinations to let the Spring container take care of instantiating Spring beans. The Flex Data Services support the concept of factory to enable this type of custom component instantiation. The role of a factory is simply to provide ready-to-use instances of components to a Flex destination (instead of letting the Flex destination instantiate these components itself). <br /><br />The supporting files available with this document include a factory class (SpringFactory) that provides Flex destinations with fully initialized (dependency-injected) instances of Spring beans. Note: The SpringFactory was developed by Jeff Vroom (Flex Data Services architect) and is also available on Adobe Exchange.<br /><br />The remaining of this article describes how to configure your web application to use Flex and Spring, how to configure the Spring Factory, and how to put the pieces together and start invoking Spring beans from Flex applications. <br /><br />Setting Up your Web Application to Use Flex and Spring<br />Step 1: Install the supporting files<br />Download flex-spring.zip here <br />Expand flex-spring.zip <br />flex-spring.zip includes the Spring factory as well as the supporting files for the examples below.<br /><br />Step 2: Install Flex Data Services<br />To use the Remoting and Data Management Services data access strategies described above, you need to install the Flex Data Services. If you haven’t already done so, you can download the Flex Data Services here, and follow the installation instructions.<br /><br />The installation process will install three web applications (flex, samples, and flex-admin). You can use either the flex or samples web application to run the examples below.<br /><br />You can read more information on the installation process here: http://www.adobe.com/support/documentation/en/flex/2/install.html#installingfds2<br /><br />Step 3: Install Spring<br />Note: A complete discussion of the Spring installation process is beyond the scope of this article. Refer to http://www.springframework.org for more information. The steps below describe a basic configuration that is sufficient for the purpose of this article.<br /><br />Download the Spring framework (version 2.0) at http://www.springframework.org/download (the version without dependencies is sufficient to complete the examples in this article).<br /><br />Note: The examples below have been developed and tested using Spring 2.0. However the integration approach described in this document (and the SpringFactory class) should work fine using Spring 1.2.8 (some of the examples might not work because they use Spring 2.0 features). <br />Expand the downloaded file <br />Locate spring.jar in the dist directory and copy it in the {context-root}\WEB-INF\lib directory of your web application <br />Modify the web.xml file of your web application. Add the context-param and listener definitions as follows: <br />&lt;context-param><br />&nbsp;&nbsp;&nbsp; &lt;param-name>contextConfigLocation&lt;/param-name><br />&nbsp;&nbsp;&nbsp; &lt;param-value>/WEB-INF/applicationContext.xml&lt;/param-value><br />&lt;/context-param><br /><br />&lt;listener><br />&nbsp;&nbsp;&nbsp; &lt;listener-class>org.springframework.web.context.ContextLoaderListener&lt;/listener-class><br />&lt;/listener><br />Step 4: Register the Spring Factory<br />Copy SpringFactory.class and SpringFactory$SpringFactoryInstance.class from flex-spring-sdk\bin\flex\samples\factories to {context-root}\WEB-INF\classes\flex\samples\factories <br />Register the Spring factory in {context-root}\WEB-INF\flex\services-config.xml: <br />&lt;factories><br />&nbsp;&nbsp;&nbsp;&nbsp; &lt;factory id="spring" class="flex.samples.factories.SpringFactory"/><br />&lt;/factories>Example 1: Mortgage Calculator Using Flex Remoting<br />This first application is intentionally simplistic in its functionality to provide an uncluttered example of wiring Spring beans together and invoking them from a Flex application. <br /><br />Step 1: Copy the application files<br />Copy RateFinder.class, SimpleRateFinder.class, and Mortgage.class from flex-spring-sdk\bin\flex\samples\spring\mortgage to {context-root}\WEB-INF\classes\flex\samples\spring\mortgage <br />Copy mortgage.mxml from flex-spring-sdk\flex\mortgage to {context-root}\mortgage <br />Step 2: Register Spring Beans<br />Before registering the Spring beans for this application, open RateFinder.java, SimpleRateFinder.java and Mortgage.java in flex-spring-sdk\src\flex\samples\spring\mortgage to familiarize yourself with the source code. Notice that Mortgage has a dependency to a RateFinder object. Mortgage doesn’t instantiate a RateFinder object itself, doesn’t lookup up for a RateFinder object, and doesn’t even know the exact type of the object it will be dealing with (RateFinder is an inteface). An instance of a class implementing the RateFinder interface will be injected by the container (using the setRateFinder method) when it instantiates the component. <br />If it doesn’t already exist, create a file named applicationContext.xml in {context-root}\WEB-INF. <br />Register the rateFinderBean and mortgageBean beans in applicationContext.xml as follows:&nbsp; <br />&lt;?xml version="1.0" encoding="UTF-8"?><br />&lt;!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd"><br /><br />&lt;beans><br /><br />&nbsp;&nbsp;&nbsp; &lt;bean id="rateFinderBean" class="flex.samples.spring.mortgage.SimpleRateFinder"/><br /><br />&nbsp;&nbsp;&nbsp; &lt;bean id="mortgageBean" class="flex.samples.spring.mortgage.Mortgage"><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;property name="rateFinder" ref="rateFinderBean"/><br />&nbsp;&nbsp;&nbsp; &lt;/bean><br /><br />&lt;/beans>Notice that in the mortgageBean definition, we tell the container how to inject the rateFinder dependency: the rateFinder property is mapped to rateFinderBean which defines an instance of the SimpleRateFinder class. <br /><br />Step 3: Configure the Flex Remoting Destination<br />Open remoting-config.xml in {context-root}\WEB-INF\flex. <br />Add a mortgageService destination as follows:&nbsp;&nbsp;&nbsp; <br />&lt;destination id="mortgageService"><br />&nbsp;&nbsp;&nbsp; &lt;properties><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;factory>spring&lt;/factory><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;source>mortgageBean&lt;/source><br />&nbsp;&nbsp;&nbsp; &lt;/properties><br />&lt;/destination>Notice that we use the spring factory defined above (see “Register the Spring Factory”), and we provide the name of the Spring bean as defined in applicationContext.xml as the source. <br /><br />Step 4: Run the Client Application<br />Open {context-root}\mortgage\MortgageCalc.mxml in a code editor to familiarize yourself with the application. Notice that the RemoteObject destination is the mortgageService destination defined above. <br />Open a browser, access http://host:port/context-root/mortgage/MortgageCalc.mxml, and test the application: Enter a loan amount and click “Calculate” to get the monthly payment for a 30 year mortgage. <br />Note: that there is a delay the first time you access an application in this manner. This is because we are using the web compiler which compiles your application into bytecode the first time it is accessed (similar to the JSP compilation model). Subsequent requests to the same application will be much faster since the application is already compiled. In a production environment, you would typically deploy applications that have already been compiled using the Flex compiler available as a command-line utility or fully integrated in FlexBuilder (the Eclipse-based development environment for Flex).<br />Depending on your configuration, you may need to increase the heap size of your application server’s JVM to use the web compiler. This would not be required in a production environment since you typically don’t use the web compiler. If you get a java.lang.OutOfMemoryError exception while trying to access a sample for the first time, you must increase your heap size. Alternatively, you can compile the application using FlexBuilder or the command line compiler.<br /><br />Example 2: Store/Inventory Management using Flex Remoting<br />This second example is more sophisticated and includes database connectivity. To keep the application simple and avoid dependencies on other products or frameworks, the Spring JDBC abstraction framework is used to access the database. You could use the Spring support for ORM data access (using Hibernate, JDO, Oracle TopLink, iBATIS, or JPA) as an alternative: the specific Spring data access strategy you choose has no impact on the Flex/Spring integration. We use an embedded HSQLDB database: the only installation requirement is to copy the HSQLDB driver in your web application classpath (see below). The application has two modules: a database maintenance module, and a customer-facing product catalog with filtering capabilities.<br /><br />Step 1: Copy the application files<br />Copy hsqldb.jar to {context-root}\WEB-INF\lib. You can download the hsqldb driver at http://www.hsqldb.org/. <br />Copy ProductDAO.class, SimpleProductDAO.class, SimpleProductDAO$1.class, and Product.class from flex-spring-sdk\bin\flex\samples\spring\store to {context-root}\WEB-INF\classes\flex\samples\spring\store <br />Copy admin.mxml, ProductForm.mxml, store.mxml, Thumb.mxml, AnimatedTileList.as, Product.as, logo.jpg, store.css and the pic directory from flex-spring-sdk\flex\store to {context-root}\store <br />Step 2: Register Spring Beans<br />Before registering the Spring beans for this application, open ProductDAO.java, SimpleProductDAO.java and Product.java in flex-spring-sdk\src\flex\samples\spring\store to familiarize yourself with the source code. Notice that SimpleProductDAO extends org.springframework.jdbc.core.support.JdbcDaoSupport. JdbcDaoSupport has a dependency to a javax.sql.DataSource object (javax.sql.DataSource is an interface). <br />Register the dataSource and productDAOBean beans in applicationContext.xml as follows:&nbsp; <br />&lt;bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"><br />&nbsp;&nbsp;&nbsp; &lt;property name="driverClassName" value="org.hsqldb.jdbcDriver"/><br />&nbsp;&nbsp;&nbsp; &lt;property name="url" value="jdbc:hsqldb:/flex-spring-sdk/db/store"/><br />&nbsp;&nbsp;&nbsp; &lt;property name="username" value="sa"/><br />&nbsp;&nbsp;&nbsp; &lt;property name="password" value=""/><br />&lt;/bean><br /><br />&lt;bean id="productDAOBean" class="flex.samples.spring.store.SimpleProductDAO"><br />&nbsp;&nbsp;&nbsp; &lt;property name="dataSource" ref="dataSource"/><br />&lt;/bean> Note: If you didn’t unzip flex-spring-sdk in your root directory, adjust the JDBC url accordingly. <br /><br />Step 3: Configure the Flex Remoting Destination<br />Open remoting-config.xml in {context-root}\WEB-INF\flex. <br />Add the productService destination as follows:&nbsp;&nbsp; <br />&lt;destination id="productService"><br />&nbsp;&nbsp;&nbsp; &lt;properties><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;factory>spring&lt;/factory><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;source>productDAOBean&lt;/source><br />&nbsp;&nbsp;&nbsp; &lt;/properties><br />&lt;/destination>Step 4: Run the Client Application<br />Test the database maintenance module:<br /><br />Open {context-root}\store\admin.mxml in a code editor and familiarize yourself with the application. <br />Open a browser, access http://host:port/context-root/store/admin.mxml, and test the application. <br />Test the store module:<br /><br />Open {context-root}\store\store.mxml in a code editor and familiarize yourself with the application. <br />Open a browser, access http://host:port/context-root/store/store.mxml, and test the application. <br />Example 3: Data Management Services<br />In addition to the RPC services used in examples 1 and 2 above, the Flex Data Management Services provide an innovative and very productive approach to synchronize data between the client and the middle-tier. The Flex Data Management Services consist of a client-side API and server-side services: <br /><br />At the client-side, "managed objects" keep track of changes made to the data, and notify the back-end of these changes. You don’t have to keep track of changes made to the data, nor do you have to invoke remote services to notify the back-end of the changes (create, update, delete) made at the client side. <br />At the server-side, the Data Service receives the list of changes and passes it to your server-side persistence components. The Data Service also pushes the changes to other clients. <br />This application provides an example of using the Flex Data Management Services with the Spring IoC container.<br /><br />Note: The Flex Data Management Services leverage the Java Transaction API (JTA). If you are using Tomcat, or another servlet container that doesn’t provide a full implementation of the J2EE stack, you have to install a JTA implementation such as JOTM to run this example. Click here for more information.<br /><br />Step 1: Copy the application files<br />Copy ProductAssembler.class from flex-spring-sdk\bin\flex\samples\spring\store to {context-root}\WEB-INF\classes\flex\samples\spring\store <br />Copy dms.mxml and Product.as from flex-spring-sdk\flex\dms to {context-root}\dms <br />Step 2: Register Spring Beans<br />Open ProductAssembler.java in a code editor. Notice that ProductAssembler has a dependency to a ProductDAO object. <br />Register the productAssemblerBean in applicationContext.xml as follows: <br />&lt;bean id="productAssemblerBean" class="flex.samples.spring.store.ProductAssembler"><br />&nbsp;&nbsp;&nbsp; &lt;property name="productDAO" ref="productDAOBean"/><br />&lt;/bean>Step 3: Configure the Flex Data Management Services Destination<br />Open data-management-config.xml in {context-root}\WEB-INF\flex. <br />Add the product destination as follows: <br />&lt;destination id="product"><br />&nbsp;&nbsp;&nbsp; &lt;adapter ref="java-dao" /><br />&nbsp;&nbsp;&nbsp; &lt;properties><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;source>productAssemblerBean&lt;/source><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;factory>spring&lt;/factory><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;metadata><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;identity property="productId"/><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/metadata><br />&nbsp;&nbsp;&nbsp; &lt;/properties><br />&lt;/destination> Step 4: Run the Client Application<br />Open {context-root}\dms\dms.mxml in a code editor and familiarize yourself with the application. <br />Open a browser, access http://host:port/context-root/dms/dms.mxml, and test the application.
          <br/><br/>
          <span style="color:red;">
            <a href="http://ssh.javaeye.com/blog/194876#comments" style="color:red;">已有 <strong>0</strong> 人发表留言，猛击-&gt;&gt;<strong>这里</strong>&lt;&lt;-参与讨论</a>
          </span>
          <br/><br/><br/>
          <span style="color:#E28822;">JavaEye推荐</span>
          <br/>
          <ul class='adverts'><li><a href='/adverts/42' target='_blank'><span style="color:red;font-weight:bold;">搜狐网站诚聘Java、PHP和C++工程师</span></a></li><li><a href='/adverts/41' target='_blank'><span style="color:red;font-weight:bold;">Windows7在微软WinHEC 2008上揭开神秘面纱</span></a></li></ul>
          <br/><br/><br/>
          ]]>
        </description>
        <pubDate>Tue, 20 May 2008 16:20:15 +0800</pubDate>
        <link>http://ssh.javaeye.com/blog/194876</link>
        <guid>http://ssh.javaeye.com/blog/194876</guid>
      </item>
          <item>
        <title>SOA内部培训文稿</title>
        <author>duobin3000</author>
        <description>
          <![CDATA[
          <br/>
          作者: <a href="http://ssh.javaeye.com">duobin3000</a>&nbsp;
                    链接：<a href="http://ssh.javaeye.com/blog/190536" style="color:red;">http://ssh.javaeye.com/blog/190536</a>&nbsp;
          发表时间: 2008年05月07日
          <br/><br/>
          声明：本文系JavaEye网站发布的原创博客文章，未经作者书面许可，严禁任何网站转载本文，否则必将追究法律责任！
          <br/><br/>
          见附件，<br /><br />把后缀名该成<strong>soa.pdf</strong><br /><br />未完，待续.....<br /><br />尽快把剩下的web service\data service\presentation service等补充上
          <br/><br/>
          <span style="color:red;">
            <a href="http://ssh.javaeye.com/blog/190536#comments" style="color:red;">已有 <strong>1</strong> 人发表留言，猛击-&gt;&gt;<strong>这里</strong>&lt;&lt;-参与讨论</a>
          </span>
          <br/><br/><br/>
          <span style="color:#E28822;">JavaEye推荐</span>
          <br/>
          <ul class='adverts'><li><a href='/adverts/41' target='_blank'><span style="color:red;font-weight:bold;">Windows7在微软WinHEC 2008上揭开神秘面纱</span></a></li><li><a href='/adverts/42' target='_blank'><span style="color:red;font-weight:bold;">搜狐网站诚聘Java、PHP和C++工程师</span></a></li></ul>
          <br/><br/><br/>
          ]]>
        </description>
        <pubDate>Wed, 07 May 2008 11:46:54 +0800</pubDate>
        <link>http://ssh.javaeye.com/blog/190536</link>
        <guid>http://ssh.javaeye.com/blog/190536</guid>
      </item>
          <item>
        <title>做为一个PM，这些你都注意了吗？</title>
        <author>duobin3000</author>
        <description>
          <![CDATA[
          <br/>
          作者: <a href="http://ssh.javaeye.com">duobin3000</a>&nbsp;
                    链接：<a href="http://ssh.javaeye.com/blog/157204" style="color:red;">http://ssh.javaeye.com/blog/157204</a>&nbsp;
          发表时间: 2008年01月18日
          <br/><br/>
          声明：本文系JavaEye网站发布的原创博客文章，未经作者书面许可，严禁任何网站转载本文，否则必将追究法律责任！
          <br/><br/>
          一些心得，写下来时刻提醒自己。 <br /><br />1.实现优先 <br />这个问题很明显：无论如何，你都要先做出来。技术，性能，优化甚至代码对齐等等技术人员才会想到的东西是不应该按这个标题序号去考虑的。 <br />记住：即使一天拼出的只是一个杂碎，也比闷头做一个月的“优雅”产品要好得多。 <br /><br />2.以人为本 <br />充分的衡量一下整个团队的能力，按照全队的综合能力去选型。项目负责人的任务就是把项目拆散了平摊到每个适合的人的头上。 <br />记住：你必须详细的了解团队中的每一个人，说不定一个闷臊的程序员恰恰成为了最好的客户沟通专家...... <br /><br />3.demo驱动开发 <br />天下最“敏捷”的事情莫过于让用户经常能知道你的想法。那么正式开始之前都给他们做个demo，哪怕功能都是伪造的......或许你会发现其实客户要求的比你想的要少得多.... <br />记住：让客户看到，永远比让客户听到要好 <br /><br />4.每天都是一个成功 <br />与其每天气急败坏的催促手下加快开发进度，不如建立多个短期目标，每个目标都实现了，你就会发现自己腰不酸了，手下腿不痛了，客户一口气上五楼，不喘气了。 <br />记住：让团队不被压力压倒是每一个管理者最重要的责任。 <br /><br />5.量力而为 <br />如果你在上一条里的目标每个都是难以实现的，团队的士气或许很快就会降到谷底...项目的失败是可预期的。如果客户的要求也超出了团队的能力，放弃绝对比硬撑要值。 <br />记住：别妄图在项目中保持120%的开发能力，你或许会在项目完成的前一天倒下... <br /><br />6.横向储备 <br />只要有时间，一定要留意团队中缺少的知识和人才。没准下个项目就会用到。 <br />记住：项目总是会照顾那些有准备的人...
          <br/><br/>
          <span style="color:red;">
            <a href="http://ssh.javaeye.com/blog/157204#comments" style="color:red;">已有 <strong>0</strong> 人发表留言，猛击-&gt;&gt;<strong>这里</strong>&lt;&lt;-参与讨论</a>
          </span>
          <br/><br/><br/>
          <span style="color:#E28822;">JavaEye推荐</span>
          <br/>
          <ul class='adverts'><li><a href='/adverts/41' target='_blank'><span style="color:red;font-weight:bold;">Windows7在微软WinHEC 2008上揭开神秘面纱</span></a></li><li><a href='/adverts/42' target='_blank'><span style="color:red;font-weight:bold;">搜狐网站诚聘Java、PHP和C++工程师</span></a></li></ul>
          <br/><br/><br/>
          ]]>
        </description>
        <pubDate>Fri, 18 Jan 2008 10:37:11 +0800</pubDate>
        <link>http://ssh.javaeye.com/blog/157204</link>
        <guid>http://ssh.javaeye.com/blog/157204</guid>
      </item>
          <item>
        <title>下载过程(Sync Server-------&gt;PDA/手机)</title>
        <author>duobin3000</author>
        <description>
          <![CDATA[
          <br/>
          作者: <a href="http://ssh.javaeye.com">duobin3000</a>&nbsp;
                    链接：<a href="http://ssh.javaeye.com/blog/154635" style="color:red;">http://ssh.javaeye.com/blog/154635</a>&nbsp;
          发表时间: 2008年01月10日
          <br/><br/>
          声明：本文系JavaEye网站发布的原创博客文章，未经作者书面许可，严禁任何网站转载本文，否则必将追究法律责任！
          <br/><br/>
          <p>时间戳： <br /> PDA端请求后台同步下载---传递同步帐号 <br /> Sync server根据userid得到上次成功下载的ts; <br /> 由该ts去过滤上次同步以后再次被更新的数据-注意表件约束关系 <br /> 生成文本&mdash;传输到PDA <br /> PDA解析文件完成数据的持久化操作------返回一个成功与否的标志flag <br /> 将该标志flag写到本地sync_table表 <br /> 如果flag=true：返回到服务器端更新ts;否则要求重新下载数据 </p><p>&nbsp;</p><p>附件中有该过程的活动图</p><p>&nbsp;</p>
          <br/><br/>
          <span style="color:red;">
            <a href="http://ssh.javaeye.com/blog/154635#comments" style="color:red;">已有 <strong>0</strong> 人发表留言，猛击-&gt;&gt;<strong>这里</strong>&lt;&lt;-参与讨论</a>
          </span>
          <br/><br/><br/>
          <span style="color:#E28822;">JavaEye推荐</span>
          <br/>
          <ul class='adverts'><li><a href='/adverts/42' target='_blank'><span style="color:red;font-weight:bold;">搜狐网站诚聘Java、PHP和C++工程师</span></a></li><li><a href='/adverts/41' target='_blank'><span style="color:red;font-weight:bold;">Windows7在微软WinHEC 2008上揭开神秘面纱</span></a></li></ul>
          <br/><br/><br/>
          ]]>
        </description>
        <pubDate>Thu, 10 Jan 2008 10:07:27 +0800</pubDate>
        <link>http://ssh.javaeye.com/blog/154635</link>
        <guid>http://ssh.javaeye.com/blog/154635</guid>
      </item>
          <item>
        <title>上载过程(PDA/手机-----&gt;Sync Server)</title>
        <author>duobin3000</author>
        <description>
          <![CDATA[
          <br/>
          作者: <a href="http://ssh.javaeye.com">duobin3000</a>&nbsp;
                    链接：<a href="http://ssh.javaeye.com/blog/154632" style="color:red;">http://ssh.javaeye.com/blog/154632</a>&nbsp;
          发表时间: 2008年01月10日
          <br/><br/>
          声明：本文系JavaEye网站发布的原创博客文章，未经作者书面许可，严禁任何网站转载本文，否则必将追究法律责任！
          <br/><br/>
          <span style="font-size: 14pt; font-family: 宋体"><h2 style="margin: 13pt 0cm"><span style="font-family: 宋体">基于时间戳：</span></h2><ul><li><h2 class="MsoListParagraph" style="margin: 0cm 0cm 0pt 42pt; text-indent: -21pt"><span style="font-size: 14pt; font-family: Wingdings"><span><span style="font: 7pt 'Times New Roman'">&nbsp; </span></span></span><span style="font-size: 14pt; font-family: 宋体">采用<span style="color: red">协议<sup>①</sup></span>读取</span><span style="font-size: 14pt"><span style="font-family: Calibri">Sync server</span></span><span style="font-size: 14pt; font-family: 宋体">上该用户最后一次成功同步对应的</span><span style="font-size: 14pt; color: red"><span style="font-family: Calibri">ts</span></span><sup><span style="font-size: 14pt; color: red; font-family: 宋体">②</span></sup><span style="font-size: 14pt"></span></h2></li><li><h2 class="MsoListParagraph" style="margin: 0cm 0cm 0pt 42pt; text-indent: -21pt"><span style="font-size: 14pt; font-family: Wingdings"><span><span style="font: 7pt 'Times New Roman'">&nbsp; </span></span></span><span style="font-size: 14pt; font-family: 宋体">根据</span><span style="font-size: 14pt"><span style="font-family: Calibri">ts</span></span><span style="font-size: 14pt; font-family: 宋体">从</span><span style="font-size: 14pt"><span style="font-family: Calibri">sql ce</span></span><span style="font-size: 14pt; font-family: 宋体">中抽取数据</span><span style="font-size: 14pt"></span></h2></li><li><h2 class="MsoListParagraph" style="margin: 0cm 0cm 0pt 42pt; text-indent: -21pt"><span style="font-size: 14pt; font-family: Wingdings"><span><span style="font: 7pt 'Times New Roman'">&nbsp; </span></span></span><span style="font-size: 14pt; font-family: 宋体">读取表间管理约束，按照表间关系以及文件的生成格式生成文件</span><span style="font-size: 14pt"></span></h2></li><li><h2 class="MsoListParagraph" style="margin: 0cm 0cm 0pt 42pt; text-indent: -21pt"><span style="font-size: 14pt; font-family: Wingdings"><span><span style="font: 7pt 'Times New Roman'">&nbsp; </span></span></span><span style="font-size: 14pt; font-family: 宋体">采用协议传输该文件</span><span style="font-size: 14pt"></span></h2></li><li><h2 class="MsoListParagraph" style="margin: 0cm 0cm 0pt 42pt; text-indent: -21pt"><span style="font-size: 14pt; font-family: Wingdings"><span><span style="font: 7pt 'Times New Roman'">&nbsp; </span></span></span><span style="font-size: 14pt"><span style="font-family: Calibri">-----------------------------</span></span><span style="font-size: 14pt; font-family: 宋体">以上为</span><span style="font-size: 14pt"><span style="font-family: Calibri">pda</span></span><span style="font-size: 14pt; font-family: 宋体">端的操作</span><span style="font-size: 14pt"><span style="font-family: Calibri">---------------------------</span></span></h2></li><li><h2 class="MsoListParagraph" style="margin: 0cm 0cm 0pt 42pt; text-indent: -21pt"><span style="font-size: 14pt; font-family: Wingdings"><span><span style="font: 7pt 'Times New Roman'">&nbsp; </span></span></span><span style="font-size: 14pt"><span style="font-family: Calibri">Sync server</span></span><span style="font-size: 14pt; font-family: 宋体">接受文件，按照<span style="color: red">同步帐号</span></span><span style="font-size: 14pt; color: red"><span style="font-family: Calibri">+</span></span><span style="font-size: 14pt; color: red; font-family: 宋体">日期</span><span style="font-size: 14pt; font-family: 宋体">来命令文件</span><span style="font-size: 14pt"></span></h2></li><li><h2 class="MsoListParagraph" style="margin: 0cm 0cm 0pt 42pt; text-indent: -21pt"><span style="font-size: 14pt; font-family: Wingdings"><span><span style="font: 7pt 'Times New Roman'">&nbsp; </span></span></span><span style="font-size: 14pt; font-family: 宋体">开启事务</span><span style="font-size: 14pt"></span></h2></li><li><h2 class="MsoListParagraph" style="margin: 0cm 0cm 0pt 42pt; text-indent: -21pt"><span style="font-size: 14pt; font-family: Wingdings"><span><span style="font: 7pt 'Times New Roman'">&nbsp; </span></span></span><span style="font-size: 14pt; font-family: 宋体">读取并解析文件</span><span style="font-size: 14pt"><span style="font-family: Calibri">-------</span></span><span style="font-size: 14pt; color: red; font-family: 宋体">检测顺序</span><span style="font-size: 14pt; font-family: 宋体">，与</span><span style="font-size: 14pt"><span style="font-family: Calibri">sql</span></span><span style="font-size: 14pt; font-family: 宋体">摸板进行匹配</span><span style="font-size: 14pt"></span></h2></li><li><h2 class="MsoListParagraph" style="margin: 0cm 0cm 0pt 42pt; text-indent: -21pt"><span style="font-size: 14pt; font-family: 宋体">提交事务，完成持久化，得到成功与否的标志</span><span style="font-size: 14pt"><span style="font-family: Calibri">&mdash;flag</span></span></h2></li><li><h2 class="MsoListParagraph" style="margin: 0cm 0cm 0pt 42pt; text-indent: -21pt"><span style="font-size: 14pt; font-family: 宋体">同时将</span><span style="font-size: 14pt"><span style="font-family: Calibri">userid\flag\</span></span><span style="font-size: 14pt; font-family: 宋体">同时</span><span style="font-size: 14pt; color: red"><span style="font-family: Calibri">ts</span></span><sup><span style="font-size: 14pt; color: red; font-family: 宋体">③</span></sup><span style="font-size: 14pt; font-family: 宋体">写到</span><span style="font-size: 14pt"><span style="font-family: Calibri">Sync-tableScript</span></span><span style="font-size: 14pt; font-family: 宋体">中</span><span style="font-size: 14pt"></span></h2></li><li><h2 class="MsoListParagraph" align="left" style="margin: 0cm 0cm 0pt 42pt; text-indent: -21pt; text-align: left"><span style="font-size: 14pt; font-family: Wingdings"><span><span style="font: 7pt 'Times New Roman'">&nbsp; </span></span></span><span style="font-size: 14pt; font-family: 宋体">返回</span><span style="font-size: 14pt"><span style="font-family: Calibri">flag</span></span><span style="font-size: 14pt; font-family: 宋体">到</span><span style="font-size: 14pt"><span style="font-family: Calibri">PDA</span></span></h2></li></ul><h2 class="MsoNormal" style="margin: 0cm 0cm 0pt"><span><span style="font-size: small; font-family: Calibri">Note:</span></span></h2><h2 class="MsoNormal" style="margin: 0cm 0cm 0pt"><span><span><span style="font-size: small; font-family: Calibri">&nbsp;&nbsp; </span></span></span><span style="font-size: 14pt; color: red; font-family: 宋体">协议<sup>①</sup></span><span style="font-size: small"><span><span style="font-family: Calibri">:</span></span><span style="font-family: 宋体">目前是</span><span><span style="font-family: Calibri">http</span></span><span style="font-family: 宋体">协议</span></span></h2><h2 class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="font-family: Calibri"><span><span><span style="font-size: small">&nbsp;&nbsp; </span></span></span><span style="font-size: 14pt; color: red">ts</span></span><sup><span style="font-size: 14pt; color: red; font-family: 宋体">②</span></sup><span style="font-family: 宋体"><span style="font-size: small">：该时间戳，取服务器端同步成功后的日期</span></span></h2><h2 class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="font-family: 宋体"><span style="font-size: small">缺点：</span></span></h2><h2 class="MsoNormal" style="margin: 0cm 0cm 0pt; text-indent: 20.25pt"><span style="font-size: small"><span style="font-family: 宋体">这个方式一定不能让用户更改</span><span><span style="font-family: Calibri">PDA</span></span><span style="font-family: 宋体">的日期，否则会造成数据丢失和数据的重复同步</span></span></h2><h2 class="MsoNormal" style="margin: 0cm 0cm 0pt; text-indent: 20.25pt"><span><span style="font-size: small; font-family: Calibri">&nbsp;</span></span></h2><h2 style="margin: 13pt 0cm"><span style="font-family: 宋体">基于标志位</span><span style="font-family: Cambria"> <span>------</span></span><span style="font-family: 宋体">推荐的做法</span></h2><ul><li><h2 class="MsoListParagraph" style="margin: 0cm 0cm 0pt 21pt; text-indent: -21pt"><span style="font-size: 14pt; font-family: Wingdings"><span><span style="font: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;</span></span></span><span style="font-size: 14pt"><span style="font-family: Calibri">PDA</span></span><span style="font-size: 14pt; font-family: 宋体">读取</span><span style="font-size: 14pt"><span style="font-family: Calibri">Sync server</span></span><span style="font-size: 14pt; font-family: 宋体">端上次成功同步的标志位</span><span style="font-size: 14pt"><span style="font-family: Calibri">(false true)</span></span></h2></li><li><h2 class="MsoListParagraph" style="margin: 0cm 0cm 0pt 21pt; text-indent: -21pt"><span style="font-size: 14pt; font-family: Wingdings"><span><span style="font: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; </span></span></span><span style="font-size: 14pt"><span style="font-family: Calibri">(I)&nbsp;&nbsp; </span></span><span style="font-size: 14pt; font-family: 宋体">如果为</span><span style="font-size: 14pt"><span style="font-family: Calibri">false:</span></span></h2></li><li><h2 class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="font-size: 14pt"><span><span style="font-family: Calibri">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span style="font-size: 14pt; font-family: 宋体">将</span><span style="font-size: 14pt"><span style="font-family: Calibri">PDA</span></span><span style="font-size: 14pt; font-family: 宋体">端数据状态为</span><span style="font-size: 14pt"><span style="font-family: Calibri">P</span></span><span style="font-size: 14pt; font-family: 宋体">的改为</span><span style="font-size: 14pt"><span style="font-family: Calibri">N</span></span></h2></li><li><h2 class="MsoListParagraph" style="margin: 0cm 0cm 0pt 42pt; text-indent: -21pt"><span style="font-size: 14pt; font-family: Wingdings"><span><span style="font: 7pt 'Times New Roman'">&nbsp; </span></span></span><span style="font-size: 14pt"><span style="font-family: Calibri">(II)</span></span><span style="font-size: 14pt; font-family: 宋体">如果为</span><span style="font-size: 14pt"><span style="font-family: Calibri">true:</span></span></h2></li><li><h2 class="MsoListParagraph" style="margin: 0cm 0cm 0pt 21pt; text-indent: 0cm"><span style="font-size: 14pt"><span><span style="font-family: Calibri">&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span style="font-size: 14pt; font-family: 宋体">将</span><span style="font-size: 14pt"><span style="font-family: Calibri">PDA</span></span><span style="font-size: 14pt; font-family: 宋体">端数据状态为</span><span style="font-size: 14pt"><span style="font-family: Calibri">P</span></span><span style="font-size: 14pt; font-family: 宋体">的改为</span><span style="font-size: 14pt"><span style="font-family: Calibri">Y</span></span></h2></li><li><h2 class="MsoListParagraph" style="margin: 0cm 0cm 0pt 42pt; text-indent: -21pt"><span style="font-size: 14pt; font-family: Wingdings"><span><span style="font: 7pt 'Times New Roman'">&nbsp; </span></span></span><span style="font-size: 14pt; font-family: 宋体">读取表间管理约束，过滤数据将</span><span style="font-size: 14pt"><span style="font-family: Calibri">sql ce</span></span><span style="font-size: 14pt; font-family: 宋体">中数据状态为</span><span style="font-size: 14pt"><span style="font-family: Calibri">N</span></span><span style="font-size: 14pt; font-family: 宋体">的数据，结合表关系间以及文件的生成格式生成文件</span><span style="font-size: 14pt"></span></h2></li><li><h2 class="MsoListParagraph" style="margin: 0cm 0cm 0pt 42pt; text-indent: -21pt"><span style="font-size: 14pt; font-family: Wingdings"><span><span style="font: 7pt 'Times New Roman'">&nbsp;</span></span></span><span style="font-size: 14pt"><span style="font-family: Calibri">PDA</span></span><span style="font-size: 14pt; font-family: 宋体">传输文件</span><span style="font-size: 14pt"></span></h2></li><li><h2 class="MsoListParagraph" style="margin: 0cm 0cm 0pt 42pt; text-indent: -21pt"><span style="font-size: 14pt; font-family: Wingdings"><span><span style="font: 7pt 'Times New Roman'">&nbsp; </span></span></span><span style="font-size: 14pt"><span style="font-family: Calibri">Sync server</span></span><span style="font-size: 14pt; font-family: 宋体">接受</span><span style="font-size: 14pt"><span style="font-family: Calibri">I/O</span></span><span style="font-size: 14pt; font-family: 宋体">流，在指定目录生成文件，名称：设备编号</span><span style="font-size: 14pt"><span style="font-family: Calibri">+</span></span><span style="font-size: 14pt; font-family: 宋体">用户</span><span style="font-size: 14pt"><span style="font-family: Calibri">ID+</span></span><span style="font-size: 14pt; font-family: 宋体">日期</span><span style="font-size: 14pt"></span></h2></li><li><h2 class="MsoListParagraph" style="margin: 0cm 0cm 0pt 42pt; text-indent: -21pt"><span style="font-size: 14pt; font-family: Wingdings"><span><span style="font: 7pt 'Times New Roman'">&nbsp; </span></span></span><span style="font-size: 14pt; font-family: 宋体">开启事务</span><span style="font-size: 14pt"></span></h2></li><li><h2 class="MsoListParagraph" style="margin: 0cm 0cm 0pt 42pt; text-indent: -21pt"><span style="font-size: 14pt; font-family: Wingdings"><span><span style="font: 7pt 'Times New Roman'">&nbsp; </span></span></span><span style="font-size: 14pt; font-family: 宋体">读取文件，按顺序解析文件，寻找</span><span style="font-size: 14pt"><span style="font-family: Calibri">SQL</span></span><span style="font-size: 14pt; font-family: 宋体">摸板</span><span style="font-size: 14pt"></span></h2></li><li><h2 class="MsoListParagraph" style="margin: 0cm 0cm 0pt 42pt; text-indent: -21pt"><span style="font-size: 14pt; font-family: Wingdings"><span><span style="font: 7pt 'Times New Roman'">&nbsp; </span></span></span><span style="font-size: 14pt; font-family: 宋体">提交事务，完成持久化，得到成功与否的标志位</span><span style="font-size: 14pt"></span></h2></li><li><h2 class="MsoListParagraph" style="margin: 0cm 0cm 0pt 42pt; text-indent: -21pt"><span style="font-size: 14pt; font-family: Wingdings"><span><span style="font: 7pt 'Times New Roman'">&nbsp;</span></span></span><span style="font-size: 14pt; font-family: 宋体">将该标志位以及用户</span><span style="font-size: 14pt"><span style="font-family: Calibri">ID</span></span><span style="font-size: 14pt; color: red; font-family: 宋体">和日期</span><span style="font-size: 14pt; font-family: 宋体">写到</span><span style="font-size: 14pt"><span style="font-family: Calibri">sync_tableScript</span></span><span style="font-size: 14pt; font-family: 宋体">中</span><span style="font-size: 14pt"></span></h2></li><li><h2 class="MsoListParagraph" style="margin: 0cm 0cm 0pt 42pt; text-indent: -21pt"><span style="font-size: 14pt; font-family: 宋体">注意在该阶段写同步日志</span><span style="font-size: 14pt"></span></h2></li><li><h2 class="MsoListParagraph" style="margin: 0cm 0cm 0pt 42pt; text-indent: -21pt"><span style="font-size: 14pt; font-family: 宋体">返回给</span><span style="font-size: 14pt"><span style="font-family: Calibri">PDA</span></span><span style="font-size: 14pt; font-family: 宋体">正确与否。</span><span style="font-size: 14pt"></span></h2></li><li><h2 class="MsoListParagraph" style="margin: 0cm 0cm 0pt 21pt; text-indent: 0cm"><span style="font-size: 14pt"><span style="font-family: Calibri">&nbsp;</span></span></h2></li><li><h2 class="MsoListParagraph" style="margin: 0cm 0cm 0pt 21pt; text-indent: 0cm"><span style="font-size: 14pt; font-family: 宋体">缺点：</span><span style="font-size: 14pt"></span></h2></li><li><h2 class="MsoListParagraph" style="margin: 0cm 0cm 0pt 21pt; text-indent: 0cm"><span style="font-size: 14pt"><span style="font-family: Calibri"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>PDA</span></span><span style="font-size: 14pt; font-family: 宋体">端没有不用担心时间的更改引起的数据同步错落；但是更改数据标志：</span><span style="font-size: 14pt"><span style="font-family: Calibri">N\P\Y</span></span><span style="font-size: 14pt; font-family: 宋体">会消耗资源太大</span></h2></li><li></li></ul></span><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>活动图在附件里，由于太大，就截了2张图</p>
          <br/><br/>
          <span style="color:red;">
            <a href="http://ssh.javaeye.com/blog/154632#comments" style="color:red;">已有 <strong>0</strong> 人发表留言，猛击-&gt;&gt;<strong>这里</strong>&lt;&lt;-参与讨论</a>
          </span>
          <br/><br/><br/>
          <span style="color:#E28822;">JavaEye推荐</span>
          <br/>
          <ul class='adverts'><li><a href='/adverts/42' target='_blank'><span style="color:red;font-weight:bold;">搜狐网站诚聘Java、PHP和C++工程师</span></a></li><li><a href='/adverts/41' target='_blank'><span style="color:red;font-weight:bold;">Windows7在微软WinHEC 2008上揭开神秘面纱</span></a></li></ul>
          <br/><br/><br/>
          ]]>
        </description>
        <pubDate>Thu, 10 Jan 2008 10:02:22 +0800</pubDate>
        <link>http://ssh.javaeye.com/blog/154632</link>
        <guid>http://ssh.javaeye.com/blog/154632</guid>
      </item>
          <item>
        <title>进行需求调研时的注意事项</title>
        <author>duobin3000</author>
        <description>
          <![CDATA[
          <br/>
          作者: <a href="http://ssh.javaeye.com">duobin3000</a>&nbsp;
                    链接：<a href="http://ssh.javaeye.com/blog/152572" style="color:red;">http://ssh.javaeye.com/blog/152572</a>&nbsp;
          发表时间: 2008年01月03日
          <br/><br/>
          声明：本文系JavaEye网站发布的原创博客文章，未经作者书面许可，严禁任何网站转载本文，否则必将追究法律责任！
          <br/><br/>
          <p>怎么与客户代表沟通：</p><ol><li>第一次和客户代表沟通时候，要感谢受访者在百忙中抽空接受调研</li><li>重点提出这次需求调研要持续多长时间，让受访者有所了解，因而控制总进度</li><li>将准备工作中列的重点关键问题先行讨论</li><li>如果自己对某些需求有所了解，则需要自己描述一遍，这样有助于受访者回答时，能更好的把握重点</li><li>时常要对受访者进行扩展思路的询问，eg:您对此还有新的想法吗</li><li>不要打断客户代表的的说明，即使是时间上控制不住；</li><li>在一个问题结束时候，总一个总结，让客户代表确认该终结师傅正确，在第二次调研时候，让用户代表签字确认</li><li>在整个调研结束时，还要总一个总结，并让客户代表签字确认</li><li>需求调研过程中，客户代表无法回答的问题要记录在案，之后电话沟通或其他时间再请受访者回答</li><li>需求调研接受后不要忘记感谢他们的配合，并告诉他们何时发送一封会议记要给他</li></ol><p>下面是一些细节性的东西：</p><ol><li><div>当受访者在回答问题的时，要对他不断的点点头笑笑。在肢体语言上是对其的鼓励</div></li><li><div>多次和客户代表进行调研时，请提前到会议室，并选择某一个固定的位置；因为这表明调研人员非常感兴趣，受访者觉得自己很受重视</div></li><li><div>当有两位受访者的时候，请注意不常发言的那位的姿态，若能明显看出来态度不一样，说明他要发言，请留点时候给他</div></li><li><div>当受访者在接受调研时候一只手或双手在桌子上，说明他对目前的回答是确认的并且不会改变；如果受访者没有一只手在桌子上，说明他对此并不太确认，最好还是给别的受访者再确认一次</div></li><li><div>当受访者倾听调研人员的说明时候，歪着脖子，说明他感兴趣，往上伸脖子说明他心里产生了激动，若脖子下倾，你最好还是比继续了</div></li><li></li></ol>
          <br/><br/>
          <span style="color:red;">
            <a href="http://ssh.javaeye.com/blog/152572#comments" style="color:red;">已有 <strong>0</strong> 人发表留言，猛击-&gt;&gt;<strong>这里</strong>&lt;&lt;-参与讨论</a>
          </span>
          <br/><br/><br/>
          <span style="color:#E28822;">JavaEye推荐</span>
          <br/>
          <ul class='adverts'><li><a href='/adverts/42' target='_blank'><span style="color:red;font-weight:bold;">搜狐网站诚聘Java、PHP和C++工程师</span></a></li><li><a href='/adverts/41' target='_blank'><span style="color:red;font-weight:bold;">Windows7在微软WinHEC 2008上揭开神秘面纱</span></a></li></ul>
          <br/><br/><br/>
          ]]>
        </description>
        <pubDate>Thu, 03 Jan 2008 11:23:57 +0800</pubDate>
        <link>http://ssh.javaeye.com/blog/152572</link>
        <guid>http://ssh.javaeye.com/blog/152572</guid>
      </item>
          <item>
        <title>quarter----转摘</title>
        <author>duobin3000</author>
        <description>
          <![CDATA[
          <br/>
          作者: <a href="http://ssh.javaeye.com">duobin3000</a>&nbsp;
                    链接：<a href="http://ssh.javaeye.com/blog/151734" style="color:red;">http://ssh.javaeye.com/blog/151734</a>&nbsp;
          发表时间: 2007年12月29日
          <br/><br/>
          声明：本文系JavaEye网站发布的原创博客文章，未经作者书面许可，严禁任何网站转载本文，否则必将追究法律责任！
          <br/><br/>
          spring+quartz配置 <br />一个Cron-表达式是一个由六至七个字段组成由空格分隔的字符串，其中6个字段是必须的而一个是可选的，如下： <br />字段名 允许的值 允许的特殊字符 <br />秒 0-59 , - * / <br />分 0-59 , - * / <br />小时 0-23 , - * / <br />日 1-31 , - * ? / L W C <br />月 1-12 or JAN-DEC , - * / <br />周几 1-7 or SUN-SAT , - * ? / L C # <br />年 (可选字段) empty, 1970-2099 , - * / <br /><br />'*' 字符可以用于所有字段，在“分”字段中设为"*"表示"每一分钟"的含义。 <br /><br />'?' 字符可以用在“日”和“周几”字段. 它用来指定 '不明确的值'. 这在你需要指定这两个字段中的某一个值而不是另外一个的时候会被用到。在后面的例子中可以看到其含义。 <br /><br />'-' 字符被用来指定一个值的范围，比如在“小时”字段中设为"10-12"表示"10点到12点". <br /><br />',' 字符指定数个值。比如在“周几”字段中设为"MON,WED,FRI"表示"the days Monday, Wednesday, and Friday". <br /><br />'/' 字符用来指定一个值的的增加幅度. 比如在“秒”字段中设置为"0/15"表示"第0, 15, 30, 和 45秒"。而 "5/15"则表示"第5, 20, 35, 和 50". 在'/'前加"*"字符相当于指定从0秒开始. 每个字段都有一系列可以开始或结束的数值。对于“秒”和“分”字段来说，其数值范围为0到59，对于“小时”字段来说其为0到23, 对于“日”字段来说为0到31, 而对于“月”字段来说为1到12。"/"字段仅仅只是帮助你在允许的数值范围内从开始"第n"的值。 因此 对于“月”字段来说"7/6"只是表示7月被开启而不是“每六个月”, 请注意其中微妙的差别。 <br /><br />'L'字符可用在“日”和“周几”这两个字段。它是"last"的缩写, 但是在这两个字段中有不同的含义。例如,“日”字段中的"L"表示"一个月中的最后一天" —— 对于一月就是31号对于二月来说就是28号（非闰年）。而在“周几”字段中, 它简单的表示"7" or "SAT"，但是如果在“周几”字段中使用时跟在某个数字之后, 它表示"该月最后一个星期×" —— 比如"6L"表示"该月最后一个周五"。当使用'L'选项时,指定确定的列表或者范围非常重要，否则你会被结果搞糊涂的。 <br /><br />'W' 可用于“日”字段。用来指定历给定日期最近的工作日(周一到周五) 。比如你将“日”字段设为"15W"，意为: "离该月15号最近的工作日"。因此如果15号为周六，触发器会在14号即周五调用。如果15号为周日, 触发器会在16号也就是周一触发。如果15号为周二,那么当天就会触发。然而如果你将“日”字段设为"1W", 而一号又是周六, 触发器会于下周一也就是当月的3号触发,因为它不会越过当月的值的范围边界。'W'字符只能用于“日”字段的值为单独的一天而不是一系列值的时候。 <br /><br />'L'和'W'可以组合用于“日”字段表示为'LW'，意为"该月最后一个工作日"。 <br /><br />'#' 字符可用于“周几”字段。该字符表示“该月第几个周×”，比如"6#3"表示该月第三个周五( 6表示周五而"#3"该月第三个)。再比如: "2#1" = 表示该月第一个周一而 "4#5" = 该月第五个周三。注意如果你指定"#5"该月没有第五个“周×”，该月是不会触发的。 <br /><br />'C' 字符可用于“日”和“周几”字段，它是"calendar"的缩写。 它表示为基于相关的日历所计算出的值（如果有的话）。如果没有关联的日历, 那它等同于包含全部日历。“日”字段值为"5C"表示"日历中的第一天或者5号以后"，“周几”字段值为"1C"则表示"日历中的第一天或者周日以后"。 <br /><br />对于“月份”字段和“周几”字段来说合法的字符都不是大小写敏感的。 <br /><br />下面是一些完整的例子: <br />表达式 含义 <br />"0 0 12 * * ?" 每天中午十二点触发 <br />"0 15 10 ? * *" 每天早上10：15触发 <br />"0 15 10 * * ?" 每天早上10：15触发 <br />"0 15 10 * * ? *" 每天早上10：15触发 <br />"0 15 10 * * ? 2005" 2005年的每天早上10：15触发 <br />"0 * 14 * * ?" 每天从下午2点开始到2点59分每分钟一次触发 <br />"0 0/5 14 * * ?" 每天从下午2点开始到2：55分结束每5分钟一次触发 <br />"0 0/5 14,18 * * ?" 每天的下午2点至2：55和6点至6点55分两个时间段内每5分钟一次触发 <br />"0 0-5 14 * * ?" 每天14:00至14:05每分钟一次触发 <br />"0 10,44 14 ? 3 WED" 三月的每周三的14：10和14：44触发 <br />"0 15 10 ? * MON-FRI" 每个周一、周二、周三、周四、周五的10：15触发 <br />"0 15 10 15 * ?" 每月15号的10：15触发 <br />"0 15 10 L * ?" 每月的最后一天的10：15触发 <br />"0 15 10 ? * 6L" 每月最后一个周五的10：15触发 <br />"0 15 10 ? * 6L" 每月最后一个周五的10：15触发 <br />"0 15 10 ? * 6L 2002-2005" 2002年至2005年的每月最后一个周五的10：15触发 <br />"0 15 10 ? * 6#3" 每月的第三个周五的10：15触发
          <br/><br/>
          <span style="color:red;">
            <a href="http://ssh.javaeye.com/blog/151734#comments" style="color:red;">已有 <strong>0</strong> 人发表留言，猛击-&gt;&gt;<strong>这里</strong>&lt;&lt;-参与讨论</a>
          </span>
          <br/><br/><br/>
          <span style="color:#E28822;">JavaEye推荐</span>
          <br/>
          <ul class='adverts'><li><a href='/adverts/42' target='_blank'><span style="color:red;font-weight:bold;">搜狐网站诚聘Java、PHP和C++工程师</span></a></li><li><a href='/adverts/41' target='_blank'><span style="color:red;font-weight:bold;">Windows7在微软WinHEC 2008上揭开神秘面纱</span></a></li></ul>
          <br/><br/><br/>
          ]]>
        </description>
        <pubDate>Sat, 29 Dec 2007 11:28:57 +0800</pubDate>
        <link>http://ssh.javaeye.com/blog/151734</link>
        <guid>http://ssh.javaeye.com/blog/151734</guid>
      </item>
          <item>
        <title>ehcache在spring+ hibernate中的配置</title>
        <author>duobin3000</author>
        <description>
          <![CDATA[
          <br/>
          作者: <a href="http://ssh.javaeye.com">duobin3000</a>&nbsp;
                    链接：<a href="http://ssh.javaeye.com/blog/150921" style="color:red;">http://ssh.javaeye.com/blog/150921</a>&nbsp;
          发表时间: 2007年12月26日
          <br/><br/>
          声明：本文系JavaEye网站发布的原创博客文章，未经作者书面许可，严禁任何网站转载本文，否则必将追究法律责任！
          <br/><br/>
          大量数据流动是web应用性能问题常见的原因，而缓存被广泛的用于优化数据库应用。cache被设计为通过保存从数据库里load的数据来减少应用和数据库之间的数据流动。数据库访问只有当检索的数据不在cache里可用时才必要。hibernate可以用两种不同的对象缓存：first-level cache 和 second-level cache。first-level cache和Session对象关联，而second-level cache是和Session Factory对象关联。 <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 缺省地，hibernate已经使用基于每个事务的first-level cache。Hibernate用first-level cache主要是减少在一个事务内的sql查询数量。例如，如果一个对象在同一个事务内被修改多次，hibernate将只生成一个包括所有修改的UPDATE SQL语句。为了减少数据流动，second-level cache在Session Factory级的不同事务之间保持load的对象，这些对象对整个应用可用，不只是对当前用户正在运行的查询。这样，每次查询将返回已经load在缓存里的对象，避免一个或更多潜在的数据库事务。<br /><br />下载ehcache，hibernate3.2必须要ehcache1.2以上才能支持。可以修改log4j配置文件log4j.logger.net.sf.hibernate.cache=debug查看日志<br /><br />1.在类路径上ehcache.xml：<br /><br />&lt;ehcache><br /><br />&nbsp;&nbsp;&nbsp;&nbsp; &lt;!-- Sets the path to the directory where cache .data files are created.<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If the path is a Java System Property it is replaced by<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; its value in the running VM.<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The following properties are translated:<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; user.home - User's home directory<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; user.dir - User's current working directory<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; java.io.tmpdir - Default temp file path --><br />&nbsp;&nbsp;&nbsp;&nbsp; &lt;diskStore path="java.io.tmpdir"/><br /><br /><br />&nbsp;&nbsp;&nbsp;&nbsp; &lt;!--Default Cache configuration. These will applied to caches programmatically created through<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; the CacheManager.<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The following attributes are required:<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; maxElementsInMemory&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - Sets the maximum number of objects that will be created in memory<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; eternal&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - Sets whether elements are eternal. If eternal,&nbsp;&nbsp; timeouts are ignored and the<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; element is never expired.<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; overflowToDisk&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - Sets whether elements can overflow to disk when the in-memory cache<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; has reached the maxInMemory limit.<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The following attributes are optional:<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; timeToIdleSeconds&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - Sets the time to idle for an element before it expires.<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; i.e. The maximum amount of time between accesses before an element expires<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Is only used if the element is not eternal.<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Optional attribute. A value of 0 means that an Element can idle for infinity.<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The default value is 0.<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; timeToLiveSeconds&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - Sets the time to live for an element before it expires.<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; i.e. The maximum time between creation time and when an element expires.<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Is only used if the element is not eternal.<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Optional attribute. A value of 0 means that and Element can live for infinity.<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The default value is 0.<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; diskPersistent&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - Whether the disk store persists between restarts of the Virtual Machine.<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The default value is false.<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; diskExpiryThreadIntervalSeconds- The number of seconds between runs of the disk expiry thread. The default value<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; is 120 seconds.<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; --><br /><br />&nbsp;&nbsp;&nbsp;&nbsp; &lt;defaultCache<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; maxElementsInMemory="10000"<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; eternal="false"<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; overflowToDisk="true"<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; timeToIdleSeconds="120"<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; timeToLiveSeconds="120"<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; diskPersistent="false"<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; diskExpiryThreadIntervalSeconds="120"/><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />&nbsp;&nbsp;&nbsp;&nbsp; &lt;!-- See http://ehcache.sourceforge.net/documentation/#mozTocId258426 for how to configure caching for your objects --><br />&lt;/ehcache><br /><br /><br />2.applicationContext-hibernate.xml里Hibernate SessionFactory配置：<br /><br />&nbsp;&nbsp;&nbsp;&nbsp; &lt;!-- Hibernate SessionFactory --><br />&nbsp;&nbsp;&nbsp;&nbsp; &lt;bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;property name="dataSource" ref="dataSource"/><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;property name="configLocation">&lt;value>classpath:hibernate.cfg.xml&lt;/value>&lt;/property><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;!-- The property below is commented out b/c it doesn't work when run via<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Ant in Eclipse.&nbsp;&nbsp; It works fine for individual JUnit tests and in IDEA ??<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;property name="mappingJarLocations"><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;list>&lt;value>file:dist/appfuse-dao.jar&lt;/value>&lt;/list><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/property><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; --><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;property name="hibernateProperties"><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;props><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;prop key="hibernate.dialect">@HIBERNATE-DIALECT@&lt;/prop><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;!--&lt;prop key="hibernate.show_sql">true&lt;/prop>--><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;prop key="hibernate.max_fetch_depth">3&lt;/prop><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;prop key="hibernate.hibernate.use_outer_join">true&lt;/prop><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;prop key="hibernate.jdbc.batch_size">10&lt;/prop><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;prop key="hibernate.cache.use_query_cache">true&lt;/prop><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;prop key="hibernate.cache.use_second_level_cache">true&lt;/prop><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;prop key="hibernate.cache.provider_class">org.hibernate.cache.EhCacheProvider&lt;/prop><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;!--<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;prop key="hibernate.use_sql_comments">false&lt;/prop><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; --><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;!-- Create/update the database tables automatically when the JVM starts up<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;prop key="hibernate.hbm2ddl.auto">update&lt;/prop> --><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;!-- Turn batching off for better error messages under PostgreSQL<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;prop key="hibernate.jdbc.batch_size">0&lt;/prop> --><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/props><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/property><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;property name="entityInterceptor"><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;ref local="auditLogInterceptor"/><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/property><br />&nbsp;&nbsp;&nbsp;&nbsp; &lt;/bean><br />说明：如果不设置“查询缓存”，那么hibernate只会缓存使用load()方法获得的单个持久化对象，如果想缓存使用findall()、 list()、Iterator()、createCriteria()、createQuery()等方法获得的数据结果集的话，就需要设置hibernate.cache.use_query_cache true 才行<br /><br />3.model类里采用Xdoclet生成*.hbm.xml里的cache xml标签，即&lt;cache usage="read-only"/><br /><br />/**<br />* @hibernate.class table="WF_WORKITEM_HIS"<br />* @hibernate.cache usage="read-write"<br />* <br />*/<br /><br /><br />4.对于"query cache"，需要在程序里编码：<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; getHibernateTemplate().setCacheQueries(true);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return getHibernateTemplate().find(hql);
          <br/><br/>
          <span style="color:red;">
            <a href="http://ssh.javaeye.com/blog/150921#comments" style="color:red;">已有 <strong>0</strong> 人发表留言，猛击-&gt;&gt;<strong>这里</strong>&lt;&lt;-参与讨论</a>
          </span>
          <br/><br/><br/>
          <span style="color:#E28822;">JavaEye推荐</span>
          <br/>
          <ul class='adverts'><li><a href='/adverts/42' target='_blank'><span style="color:red;font-weight:bold;">搜狐网站诚聘Java、PHP和C++工程师</span></a></li><li><a href='/adverts/41' target='_blank'><span style="color:red;font-weight:bold;">Windows7在微软WinHEC 2008上揭开神秘面纱</span></a></li></ul>
          <br/><br/><br/>
          ]]>
        </description>
        <pubDate>Wed, 26 Dec 2007 13:31:29 +0800</pubDate>
        <link>http://ssh.javaeye.com/blog/150921</link>
        <guid>http://ssh.javaeye.com/blog/150921</guid>
      </item>
          <item>
        <title>移动数据同步</title>
        <author>duobin3000</author>
        <description>
          <![CDATA[
          <br/>
          作者: <a href="http://ssh.javaeye.com">duobin3000</a>&nbsp;
                    链接：<a href="http://ssh.javaeye.com/blog/148826" style="color:red;">http://ssh.javaeye.com/blog/148826</a>&nbsp;
          发表时间: 2007年12月17日
          <br/><br/>
          声明：本文系JavaEye网站发布的原创博客文章，未经作者书面许可，严禁任何网站转载本文，否则必将追究法律责任！
          <br/><br/>
          同步工具说明<br />以PDA同步到后台数据库为例说明<br />一、网络拓扑图<br /> <br /><br />二、远程数据访问—Https/Http<br />&nbsp;&nbsp; 手机或PDA通过万维网HTTPS协议，访问同步服务器---------------采用Servlet。<br />我们同步服务器可以采用任何MVC框架开发，最好是Struts2或JSF，方便以后我们的扩展。<br />PDA的HTTP请求，我太不清楚，手机的大体流程：<br /><br />由j2me组提供<br />PDA由.net组提供<br />/*<br />初步可以传递的参数是userId，取得上次同步的最后一条数据的对应于pda的主键值-----A，以及错误日志里没有同步成功的数据id.----B<br />根据A—B，我们在终端取得我们待同步的数据。<br />*/<br />三、	同步服务器读写后台数据库<br />同步服务器直接和Web 后台进行通信，对有关数据表进行CRUD---------一个完全的java应用程序。<br />从Request对象中，我们取得传递的条件，进行数据库查询。<br />&nbsp;&nbsp; 这里要结合j2me和.net组讨论决定，因为他们传递过来的不是web的http格式<br /> <br />四、	终端过滤待同步数据<br />获取到节点数据，查询终端数据库，过滤出待同步数据<br />五、	转换数据格式----注意表结构的关联<br />通过上面的步骤，我们已经得到待发数据。现在需要将这些数据进行排序----排序规则待定-----以满足后台数据库约束。主要是数据库完整性等方面的约束。<br /><br />5.1数据格式:---自定义<br />目的：<br />	<br />要求条件：<br />i.	数据量小<br />ii.	方便校验<br />iii.	方便解析<br />数据分割符：!#<br />结束分割符：!@<br />为空的时候：<br />类型	为空时的值	类型	为空时的值<br />varchar	‘’		<br />text	‘’		<br />date			<br />Int			<br />number			<br />示例：<br />Id&nbsp; name sex&nbsp; birthday&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; address<br />1&nbsp;&nbsp;&nbsp; d,d&nbsp;&nbsp; 1&nbsp; 2007-11-23&nbsp;&nbsp;&nbsp; SH<br />2&nbsp;&nbsp;&nbsp; rr&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br /><br />1!#dd!#1!#2007-11-23!#SH@<br />2!#rr!#0!# @<br />说明： <br />六、	验证数据的可用性<br />七、	启用安全传输----支持断点续传<br />八、	同步服务器接收数据----校验数据<br /><br />CRC?<br />九、	反转数据格式<br />十三、生成SQL<br /><br /><br />十四、与数据库通信<br /><br />十五、写日志<br />对于错误信息写入错误日志表<br />十六、回写错误信息<br /><br />说明：<br />数据库基本信息同步到PDA端，与上述
          <br/><br/>
          <span style="color:red;">
            <a href="http://ssh.javaeye.com/blog/148826#comments" style="color:red;">已有 <strong>0</strong> 人发表留言，猛击-&gt;&gt;<strong>这里</strong>&lt;&lt;-参与讨论</a>
          </span>
          <br/><br/><br/>
          <span style="color:#E28822;">JavaEye推荐</span>
          <br/>
          <ul class='adverts'><li><a href='/adverts/42' target='_blank'><span style="color:red;font-weight:bold;">搜狐网站诚聘Java、PHP和C++工程师</span></a></li><li><a href='/adverts/41' target='_blank'><span style="color:red;font-weight:bold;">Windows7在微软WinHEC 2008上揭开神秘面纱</span></a></li></ul>
          <br/><br/><br/>
          ]]>
        </description>
        <pubDate>Mon, 17 Dec 2007 11:49:02 +0800</pubDate>
        <link>http://ssh.javaeye.com/blog/148826</link>
        <guid>http://ssh.javaeye.com/blog/148826</guid>
      </item>
          <item>
        <title>发唠叨的项目团队</title>
        <author>duobin3000</author>
        <description>
          <![CDATA[
          <br/>
          作者: <a href="http://ssh.javaeye.com">duobin3000</a>&nbsp;
                    链接：<a href="http://ssh.javaeye.com/blog/146683" style="color:red;">http://ssh.javaeye.com/blog/146683</a>&nbsp;
          发表时间: 2007年12月07日
          <br/><br/>
          声明：本文系JavaEye网站发布的原创博客文章，未经作者书面许可，严禁任何网站转载本文，否则必将追究法律责任！
          <br/><br/>
          呵呵。。。。。。。。。。。。。。<br /><br />祝贺你，你的团队里还有人在啊唠叨！！
          <br/><br/>
          <span style="color:red;">
            <a href="http://ssh.javaeye.com/blog/146683#comments" style="color:red;">已有 <strong>0</strong> 人发表留言，猛击-&gt;&gt;<strong>这里</strong>&lt;&lt;-参与讨论</a>
          </span>
          <br/><br/><br/>
          <span style="color:#E28822;">JavaEye推荐</span>
          <br/>
          <ul class='adverts'><li><a href='/adverts/42' target='_blank'><span style="color:red;font-weight:bold;">搜狐网站诚聘Java、PHP和C++工程师</span></a></li><li><a href='/adverts/41' target='_blank'><span style="color:red;font-weight:bold;">Windows7在微软WinHEC 2008上揭开神秘面纱</span></a></li></ul>
          <br/><br/><br/>
          ]]>
        </description>
        <pubDate>Fri, 07 Dec 2007 15:17:19 +0800</pubDate>
        <link>http://ssh.javaeye.com/blog/146683</link>
        <guid>http://ssh.javaeye.com/blog/146683</guid>
      </item>
          <item>
        <title>中小软件企业如何留住80后开发人员</title>
        <author>duobin3000</author>
        <description>
          <![CDATA[
          <br/>
          作者: <a href="http://ssh.javaeye.com">duobin3000</a>&nbsp;
                    链接：<a href="http://ssh.javaeye.com/blog/146679" style="color:red;">http://ssh.javaeye.com/blog/146679</a>&nbsp;
          发表时间: 2007年12月07日
          <br/><br/>
          声明：本文系JavaEye网站发布的原创博客文章，未经作者书面许可，严禁任何网站转载本文，否则必将追究法律责任！
          <br/><br/>
          <p>1、工作环境</p>
<p>2、新知识的渴望</p>
<p>3、被认可度</p>
<p>4、待遇---工资+期权/股票</p>
          <br/><br/>
          <span style="color:red;">
            <a href="http://ssh.javaeye.com/blog/146679#comments" style="color:red;">已有 <strong>0</strong> 人发表留言，猛击-&gt;&gt;<strong>这里</strong>&lt;&lt;-参与讨论</a>
          </span>
          <br/><br/><br/>
          <span style="color:#E28822;">JavaEye推荐</span>
          <br/>
          <ul class='adverts'><li><a href='/adverts/41' target='_blank'><span style="color:red;font-weight:bold;">Windows7在微软WinHEC 2008上揭开神秘面纱</span></a></li><li><a href='/adverts/42' target='_blank'><span style="color:red;font-weight:bold;">搜狐网站诚聘Java、PHP和C++工程师</span></a></li></ul>
          <br/><br/><br/>
          ]]>
        </description>
        <pubDate>Fri, 07 Dec 2007 15:06:34 +0800</pubDate>
        <link>http://ssh.javaeye.com/blog/146679</link>
        <guid>http://ssh.javaeye.com/blog/146679</guid>
      </item>
          <item>
        <title>cache--hibernate</title>
        <author>duobin3000</author>
        <description>
          <![CDATA[
          <br/>
          作者: <a href="http://ssh.javaeye.com">duobin3000</a>&nbsp;
                    链接：<a href="http://ssh.javaeye.com/blog/146653" style="color:red;">http://ssh.javaeye.com/blog/146653</a>&nbsp;
          发表时间: 2007年12月07日
          <br/><br/>
          声明：本文系JavaEye网站发布的原创博客文章，未经作者书面许可，严禁任何网站转载本文，否则必将追究法律责任！
          <br/><br/>
          <p>哎。。。。。。。。。。。。。。</p>
<p>系统开发完毕，不上线不知道。上线后，性能啊----一个&quot;差&quot;字了得！</p>
<p>Hiberante 提供了cache功能：一个是在一级cache，存在与session中，用户不用刻意去处理cache，它属于事务级别的数据缓冲。</p>
<p>另一个是二级Cache，是SessionFactory级别的Cache，所有的session共享该cache.</p>
<p>废话就不说了：使用方式：</p>
<p>1、配置cache </p>
<p>hibernate.cache.provider_class org.hibernate.cache.EhCacheProvider----位于hibetnate3.x包里。</p>
<p>2、将ehcache.xml放在classes下：</p>
<p>注意修改配置文件！！！！！</p>
<p>3、修改用户自己的hbm映射文件加入：</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cache usage=&quot;read-write&quot; 注意位置</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;这里仅仅是对DAO层的缓存处理，关于web页面 等其他地方的缓存不在此范围</p>
          <br/><br/>
          <span style="color:red;">
            <a href="http://ssh.javaeye.com/blog/146653#comments" style="color:red;">已有 <strong>0</strong> 人发表留言，猛击-&gt;&gt;<strong>这里</strong>&lt;&lt;-参与讨论</a>
          </span>
          <br/><br/><br/>
          <span style="color:#E28822;">JavaEye推荐</span>
          <br/>
          <ul class='adverts'><li><a href='/adverts/42' target='_blank'><span style="color:red;font-weight:bold;">搜狐网站诚聘Java、PHP和C++工程师</span></a></li><li><a href='/adverts/41' target='_blank'><span style="color:red;font-weight:bold;">Windows7在微软WinHEC 2008上揭开神秘面纱</span></a></li></ul>
          <br/><br/><br/>
          ]]>
        </description>
        <pubDate>Fri, 07 Dec 2007 13:51:22 +0800</pubDate>
        <link>http://ssh.javaeye.com/blog/146653</link>
        <guid>http://ssh.javaeye.com/blog/146653</guid>
      </item>
          <item>
        <title>乐观锁的实现</title>
        <author>duobin3000</author>
        <description>
          <![CDATA[
          <br/>
          作者: <a href="http://ssh.javaeye.com">duobin3000</a>&nbsp;
                    链接：<a href="http://ssh.javaeye.com/blog/146609" style="color:red;">http://ssh.javaeye.com/blog/146609</a>&nbsp;
          发表时间: 2007年12月07日
          <br/><br/>
          声明：本文系JavaEye网站发布的原创博客文章，未经作者书面许可，严禁任何网站转载本文，否则必将追究法律责任！
          <br/><br/>
          <p>hibernate推荐使用version来处理。</p>
<p>废话就不多说了</p>
<p>说说怎么实现吧：</p>
<p>class optimistic-lock=&quot;version&quot;.....</p>
<p>id</p>
<p>version name=&quot;version&quot; column=&quot;version&quot; type=&quot;int&quot;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>方法session.lock() 比session.update危险，</p>
<p>session.lock(xxx,LockMode.READ)</p>
          <br/><br/>
          <span style="color:red;">
            <a href="http://ssh.javaeye.com/blog/146609#comments" style="color:red;">已有 <strong>0</strong> 人发表留言，猛击-&gt;&gt;<strong>这里</strong>&lt;&lt;-参与讨论</a>
          </span>
          <br/><br/><br/>
          <span style="color:#E28822;">JavaEye推荐</span>
          <br/>
          <ul class='adverts'><li><a href='/adverts/42' target='_blank'><span style="color:red;font-weight:bold;">搜狐网站诚聘Java、PHP和C++工程师</span></a></li><li><a href='/adverts/41' target='_blank'><span style="color:red;font-weight:bold;">Windows7在微软WinHEC 2008上揭开神秘面纱</span></a></li></ul>
          <br/><br/><br/>
          ]]>
        </description>
        <pubDate>Fri, 07 Dec 2007 11:51:24 +0800</pubDate>
        <link>http://ssh.javaeye.com/blog/146609</link>
        <guid>http://ssh.javaeye.com/blog/146609</guid>
      </item>
          <item>
        <title>cascade属性的用法</title>
        <author>duobin3000</author>
        <description>
          <![CDATA[
          <br/>
          作者: <a href="http://ssh.javaeye.com">duobin3000</a>&nbsp;
                    链接：<a href="http://ssh.javaeye.com/blog/146600" style="color:red;">http://ssh.javaeye.com/blog/146600</a>&nbsp;
          发表时间: 2007年12月07日
          <br/><br/>
          声明：本文系JavaEye网站发布的原创博客文章，未经作者书面许可，严禁任何网站转载本文，否则必将追究法律责任！
          <br/><br/>
          <p>cascade= </p>
<ul>
<li>none&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;默认操作 对级联对象的操作，不影响附属对象</li>
<li>save-update&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 在保存更新当前对象时，级联保存更新附属对象</li>
<li>delete&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 删除当前对象级联删除附属对象</li>
<li>all&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 保护delete sava-update</li>
<li>delete-orphan&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 删除和当前对象失去关联的附属对象</li>
</ul>
          <br/><br/>
          <span style="color:red;">
            <a href="http://ssh.javaeye.com/blog/146600#comments" style="color:red;">已有 <strong>0</strong> 人发表留言，猛击-&gt;&gt;<strong>这里</strong>&lt;&lt;-参与讨论</a>
          </span>
          <br/><br/><br/>
          <span style="color:#E28822;">JavaEye推荐</span>
          <br/>
          <ul class='adverts'><li><a href='/adverts/42' target='_blank'><span style="color:red;font-weight:bold;">搜狐网站诚聘Java、PHP和C++工程师</span></a></li><li><a href='/adverts/41' target='_blank'><span style="color:red;font-weight:bold;">Windows7在微软WinHEC 2008上揭开神秘面纱</span></a></li></ul>
          <br/><br/><br/>
          ]]>
        </description>
        <pubDate>Fri, 07 Dec 2007 11:35:52 +0800</pubDate>
        <link>http://ssh.javaeye.com/blog/146600</link>
        <guid>http://ssh.javaeye.com/blog/146600</guid>
      </item>
          <item>
        <title>数据检索策略</title>
        <author>duobin3000</author>
        <description>
          <![CDATA[
          <br/>
          作者: <a href="http://ssh.javaeye.com">duobin3000</a>&nbsp;
                    链接：<a href="http://ssh.javaeye.com/blog/146586" style="color:red;">http://ssh.javaeye.com/blog/146586</a>&nbsp;
          发表时间: 2007年12月07日
          <br/><br/>
          声明：本文系JavaEye网站发布的原创博客文章，未经作者书面许可，严禁任何网站转载本文，否则必将追究法律责任！
          <br/><br/>
          <p>检索策略：</p>
<ol>
<li>立即检索</li>
<li>&nbsp;延迟检索</li>
<li>预先抓取</li>
<li>批量立即加载</li>
<li>批量延迟加载</li>
</ol>
<p>&nbsp;</p>
<ul>
<li>立即检索</li>
</ul>
<p>lazy=&quot;false&quot; </p>
<ul>
<li>&nbsp;延迟检索</li>
</ul>
<p>lazy=&quot;true&quot;</p>
<ul>
<li>预先抓取</li>
</ul>
<ol>
<li>&nbsp;如果 对象之间全部是立即加载，会导致加载一个对象附带着加载更多的关联对象------------------无效开销太大</li>
<li>&nbsp;如果对象之间全部是预先抓取，通过一条sql语句完成所有的关联操作。设置hibernate_max_fetch_depth=?外连接的表的个数。一对多 多对多使用延迟加载；一对一，多对一使用预先抓取</li>
</ol>

<ul>
<li>批量加载</li>
</ul>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 一对多 多对多的时候 在多的一端，配置文件在一的一端设置&lt;set &nbsp;inverse = &quot;true&quot; batch-size=3......</p>
<ol>
<li>批量立即加载：少发送sql :in(?,?) 注意适当配置batch-size的大小</li>
<li>批量延迟加载：</li>
</ol>
          <br/><br/>
          <span style="color:red;">
            <a href="http://ssh.javaeye.com/blog/146586#comments" style="color:red;">已有 <strong>0</strong> 人发表留言，猛击-&gt;&gt;<strong>这里</strong>&lt;&lt;-参与讨论</a>
          </span>
          <br/><br/><br/>
          <span style="color:#E28822;">JavaEye推荐</span>
          <br/>
          <ul class='adverts'><li><a href='/adverts/42' target='_blank'><span style="color:red;font-weight:bold;">搜狐网站诚聘Java、PHP和C++工程师</span></a></li><li><a href='/adverts/41' target='_blank'><span style="color:red;font-weight:bold;">Windows7在微软WinHEC 2008上揭开神秘面纱</span></a></li></ul>
          <br/><br/><br/>
          ]]>
        </description>
        <pubDate>Fri, 07 Dec 2007 11:16:11 +0800</pubDate>
        <link>http://ssh.javaeye.com/blog/146586</link>
        <guid>http://ssh.javaeye.com/blog/146586</guid>
      </item>
          <item>
        <title>用例分析问题</title>
        <author>duobin3000</author>
        <description>
          <![CDATA[
          <br/>
          作者: <a href="http://ssh.javaeye.com">duobin3000</a>&nbsp;
                    链接：<a href="http://ssh.javaeye.com/blog/145060" style="color:red;">http://ssh.javaeye.com/blog/145060</a>&nbsp;
          发表时间: 2007年11月30日
          <br/><br/>
          声明：本文系JavaEye网站发布的原创博客文章，未经作者书面许可，严禁任何网站转载本文，否则必将追究法律责任！
          <br/><br/>
          <p>请记住： </p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 用例是用 <font size="4" color="#ff0000">动词+名词</font> 来表达的</p>
<ul>
    <li>&nbsp;用例是不表达业务流程的，业务流程采用活动图来表达，用例仅仅是表达参与者在某个时间点使用系统的局部功能观点</li>
</ul>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </p>
<ul>
    <li>改变模块化的思维方式，用例都是可以个别在某个时间点内、系统能履行功能满足参与者使用系统的目的，</li>
</ul>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 简单地说行政人员不能直接操作主文件，要分为维护人员信息、维护劳保建信息等</p>
<ul>
    <li>how to问题：Coding充当SA的角色就经常会联想到实作，包括权限掌控，企业逻辑等-------这个是循序图的问题</li>
</ul>
<p>&nbsp;</p>
<ul>
    <li>不要把系统自己当作用例，比如系统定时器功能-----排程系统</li>
    <li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;子系统划分不明确</li>
    <li>&nbsp;</li>
</ul>
<p>&nbsp;</p>
<ul>
    <li>&nbsp;</li>
</ul>
<p>&nbsp;</p>
          <br/><br/>
          <span style="color:red;">
            <a href="http://ssh.javaeye.com/blog/145060#comments" style="color:red;">已有 <strong>0</strong> 人发表留言，猛击-&gt;&gt;<strong>这里</strong>&lt;&lt;-参与讨论</a>
          </span>
          <br/><br/><br/>
          <span style="color:#E28822;">JavaEye推荐</span>
          <br/>
          <ul class='adverts'><li><a href='/adverts/41' target='_blank'><span style="color:red;font-weight:bold;">Windows7在微软WinHEC 2008上揭开神秘面纱</span></a></li><li><a href='/adverts/42' target='_blank'><span style="color:red;font-weight:bold;">搜狐网站诚聘Java、PHP和C++工程师</span></a></li></ul>
          <br/><br/><br/>
          ]]>
        </description>
        <pubDate>Fri, 30 Nov 2007 12:00:11 +0800</pubDate>
        <link>http://ssh.javaeye.com/blog/145060</link>
        <guid>http://ssh.javaeye.com/blog/145060</guid>
     