﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>BlogJava-深蓝色心情-随笔分类-Java</title><link>http://www.blogjava.net/darkbluefeeling/category/4986.html</link><description>过来聊聊~~~~</description><language>zh-cn</language><lastBuildDate>Wed, 18 Jul 2012 02:11:49 GMT</lastBuildDate><pubDate>Wed, 18 Jul 2012 02:11:49 GMT</pubDate><ttl>60</ttl><item><title>万众期待的guzz新版终于发布啦！各种期待的功能噢～～</title><link>http://www.blogjava.net/darkbluefeeling/archive/2012/07/18/guzz-1-3-1-released.html</link><dc:creator>深蓝色心情</dc:creator><author>深蓝色心情</author><pubDate>Wed, 18 Jul 2012 00:32:00 GMT</pubDate><guid>http://www.blogjava.net/darkbluefeeling/archive/2012/07/18/guzz-1-3-1-released.html</guid><wfw:comment>http://www.blogjava.net/darkbluefeeling/comments/383361.html</wfw:comment><comments>http://www.blogjava.net/darkbluefeeling/archive/2012/07/18/guzz-1-3-1-released.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/darkbluefeeling/comments/commentRss/383361.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/darkbluefeeling/services/trackbacks/383361.html</trackback:ping><description><![CDATA[<br style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; " /><span style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; ">亲爱的你萌是不是觉得哀家已经放弃了小谷子，不不不，原因只是因为哀家最近比较懒木有更新而已。哀家每年总有那么十来个月是比较懒的～～【望天</span><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; " /><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; " /><span style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; ">不过，这次更新绝对有货！在7月中发，也用来纪念我家的小桔梗殿下吧。</span><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; " /><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; " /><span style="font-family: Helvetica, Tahoma, Arial, sans-serif; text-align: left; background-color: #ffffff; font-size: large; "><strong>guzz 1.3.1 20120712更新介绍：</strong></span><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; " /><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; " /><strong style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; ">大版本更新噢：</strong><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; " /><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; " /><span style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; ">1. 动态拼接SQL终于发布啦，等的花都谢了。现在，乃可以写一个有条件的sql语句，然后在执行时，guzz娘会根据传入的参数构造成真正需要的sql语句，然后再绑定参数执行。古娘默认是基于Velocity模板实现的，于是动态SQL拼接的语法、灵活性、易用性、学习成本是绝对足够的，velocity文档也是绝对的丰富和成熟。来仔细瞧瞧吧：</span><a href="http://code.google.com/p/guzz/wiki/TutorialTemplatedSQLService?wl=zh-Hans" target="_blank" style="color: #006699; text-decoration: none; font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; ">http://code.google.com/p/guzz/wiki/TutorialTemplatedSQLService?wl=zh-Hans</a><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; " /><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; " /><span style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; ">2. 受够了一个一个的添加域对象到guzz.xml中？是解放自己的时候啦。面对着大半年来的各种诉求，1.3.1版这次终于良心发现，增加了package-scan功能【泪目】。咱们也可以扫描文件并批量添加business啦。介是这个脑残：</span><a href="http://code.google.com/p/guzz/wiki/TutorialHbmPackageScan?wl=zh-Hans" target="_blank" style="color: #006699; text-decoration: none; font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; ">http://code.google.com/p/guzz/wiki/TutorialHbmPackageScan?wl=zh-Hans</a><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; " /><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; " /><span style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; ">3. 在SQL中写时间串就报错？ 虽然是小功能，但转义字符支持这次还是放出来啦。不害怕SQL注入，一门心思拼接SQL语句的孩纸们请看这里：</span><a href="http://code.google.com/p/guzz/wiki/TutorialGuzzXml?wl=zh-Hans#sql语句中特殊字符转义" target="_blank" style="color: #006699; text-decoration: none; font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; ">http://code.google.com/p/guzz/wiki/TutorialGuzzXml?wl=zh-Hans#sql语句中特殊字符转义</a><span style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; ">&nbsp;。搞死就这么玩吧，勇士们自己被黑了求别黑我家小谷子。</span><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; " /><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; " /><span style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; ">4. JDNI数据源这次也支持啦。感谢波波提供的代码。借机也感谢波波提供的其他代码。</span><a href="http://code.google.com/p/guzz/wiki/TutorialDatasourceProvider?wl=zh-Hans#guzz内置连接池实现" target="_blank" style="color: #006699; text-decoration: none; font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; ">http://code.google.com/p/guzz/wiki/TutorialDatasourceProvider?wl=zh-Hans#guzz内置连接池实现</a>&nbsp;<br style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; " /><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; " /><span style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; ">5. 其他小功能和bug修正，本宫就不废话了。亲爱的你萌有兴趣就自己去对比SVN代码吧。</span><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; " /><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; " /><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; " /><span style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; ">下面照例复制下宣传介绍。</span><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; " /><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; " /><span style="font-family: Helvetica, Tahoma, Arial, sans-serif; text-align: left; background-color: #ffffff; font-size: large; "><strong>什么是guzz?</strong></span><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; " /><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; " /><span style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; ">guzz是一套用于多数据库编程的Java ORM框架，用于替代hibernate和ibatis，实现在一套系统中轻松使用多台数据库。guzz同时提供通用数据计算和配置管理等，简化系统复杂度，为系统在数据层的设计提供一站式解决方案。</span><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; " /><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; " /><strong style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; ">guzz主要功能与特点：</strong><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; " /><ul style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; "><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">现代大规模系统设计，技术上吸收了ibatis/hibernate的优点</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">支持应用程序使用大量的数据库和主从读写分离</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">支持数据库表在多组机器间水平分布（Shard），并自动维护多组机器之间的分布式事务</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">支持1张表按照业务规则分切成多张小表（Shadow），并支持每张小表拥有自己特殊的属性字段（Custom）</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">支持1张大表分切后的小表，分布到不同的数据库中（VirtualDB）</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">支持超越范式的特殊关联、非结构化数据等异构资源POJO模式的统一读取</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">支持组件化服务（SOA）和服务相互依赖，构建企业/项目实施基础平台</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">提供面向对象的数据库读取标签(JSP Taglib)，加快页面展示层的快速变更、开发与部署</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">对于大部分场景，支持像hibernate一样的对象持久、映射和方便的增删改查，提高开发效率</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">对于复杂场景，支持像ibatis一样，让DBA参与SQL设计的复杂数据库操作和优化，以及SQL在线调试</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">更简洁、更好用、更容易控制的批操作接口</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">支持在线加载与调试SQL。按照应用策略，从文件/数据库/Web Service等途径，动态提取与使用SQL语句（Dynamic SQL）</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">支持配置管理服务器，可以使用一套软件系统对所有应用程序的配置进行统一管理</li></ul><strong style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; ">项目地址：</strong><a href="http://code.google.com/p/guzz/" target="_blank" style="color: #006699; text-decoration: none; font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; ">http://code.google.com/p/guzz/</a><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; " /><strong style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; ">文档：</strong><a href="http://code.google.com/p/guzz/wiki/AboutGuzz?tm=6" target="_blank" style="color: #006699; text-decoration: none; font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; ">http://code.google.com/p/guzz/wiki/AboutGuzz?tm=6</a><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; " /><strong style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; ">下载：</strong><a href="http://code.google.com/p/guzz/downloads/list" target="_blank" style="color: #006699; text-decoration: none; font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; ">http://code.google.com/p/guzz/downloads/list</a>&nbsp;<br style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; " /><strong style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; ">新浪微博：</strong><a href="http://weibo.com/guzzframework" target="_blank" style="color: #006699; text-decoration: none; font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; ">http://weibo.com/guzzframework</a><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; " /><strong style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; ">扣扣群：</strong><span style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; ">&nbsp;36429094&nbsp; 218658794</span><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; " /><strong style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; ">Mail List：</strong><a href="https://lists.sourceforge.net/lists/listinfo/guzz-mail-users" target="_blank" style="color: #006699; text-decoration: none; font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; ">https://lists.sourceforge.net/lists/listinfo/guzz-mail-users<br /><br /></a><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 12px; line-height: 18px; text-align: left; background-color: #ffffff; " /><img src ="http://www.blogjava.net/darkbluefeeling/aggbug/383361.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/darkbluefeeling/" target="_blank">深蓝色心情</a> 2012-07-18 08:32 <a href="http://www.blogjava.net/darkbluefeeling/archive/2012/07/18/guzz-1-3-1-released.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>chrome扩展程序“超级提醒”，源代码开放！</title><link>http://www.blogjava.net/darkbluefeeling/archive/2011/12/01/365281.html</link><dc:creator>深蓝色心情</dc:creator><author>深蓝色心情</author><pubDate>Thu, 01 Dec 2011 05:16:00 GMT</pubDate><guid>http://www.blogjava.net/darkbluefeeling/archive/2011/12/01/365281.html</guid><wfw:comment>http://www.blogjava.net/darkbluefeeling/comments/365281.html</wfw:comment><comments>http://www.blogjava.net/darkbluefeeling/archive/2011/12/01/365281.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.blogjava.net/darkbluefeeling/comments/commentRss/365281.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/darkbluefeeling/services/trackbacks/365281.html</trackback:ping><description><![CDATA[<div><span style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; background-color: #efefef; "><br /></span>chrome插件，用于统一提醒来自gmail, yahoo，hotmail，新浪微博。。。等多家主流网站的新邮件或新通知。喜欢的朋友可以加入此项目，继续加对更多网站的支持！&nbsp;<br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; " /><br style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; " /><a href="http://code.google.com/p/notifyall/" target="_blank" style="color: #006699; font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; text-align: left; background-color: #efefef; ">http://code.google.com/p/notifyall/</a>&nbsp;<br /></div><img src ="http://www.blogjava.net/darkbluefeeling/aggbug/365281.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/darkbluefeeling/" target="_blank">深蓝色心情</a> 2011-12-01 13:16 <a href="http://www.blogjava.net/darkbluefeeling/archive/2011/12/01/365281.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>guzz1.2.9多数据库框架更新发布</title><link>http://www.blogjava.net/darkbluefeeling/archive/2011/08/30/357584.html</link><dc:creator>深蓝色心情</dc:creator><author>深蓝色心情</author><pubDate>Tue, 30 Aug 2011 09:11:00 GMT</pubDate><guid>http://www.blogjava.net/darkbluefeeling/archive/2011/08/30/357584.html</guid><wfw:comment>http://www.blogjava.net/darkbluefeeling/comments/357584.html</wfw:comment><comments>http://www.blogjava.net/darkbluefeeling/archive/2011/08/30/357584.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.blogjava.net/darkbluefeeling/comments/commentRss/357584.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/darkbluefeeling/services/trackbacks/357584.html</trackback:ping><description><![CDATA[<span class="Apple-style-span" style="font-family: Helvetica, Tahoma, Arial, sans-serif; line-height: 25px; background-color: #f7f7f7; "><br /><strong style="font-weight: bold; ">如无意外，本次更新为1.2.9最后一次更新，随后将进行下一个大版本的开发，设计新的功能，欢迎提供想法。</strong>&nbsp;<br /><br /><span style="font-size: large; "><strong style="font-weight: bold; ">guzz 1.2.9 20110830更新介绍：</strong></span>&nbsp;<br /><br /><strong style="font-weight: bold; ">本次更新：</strong>&nbsp;<br /><br />1. fix issue 16. 为paramMapping 增加了type属性，用于直接指定参数类型，用于在没有java属性直接可用的情况下，为参数设置强类型。&nbsp;<br /><br />2. fix issue 14, 15。允许基于对象的数字类型，如Long, Integer设置和获取null值。修正了nullValue属性设置后无效的bug。 &#8221;null&#8221;作为nullValue的保留字，用于将默认值设置为java null对象。&nbsp;<br /><br />3. 增加了hbm.xml中新格式的支持。新支持的格式为：&nbsp;<br />&lt;property name="xxx" type="java.lang.Long"&gt;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;column name="col_xxxx" precision="18" scale="0" not-null="true"&gt;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;comment&gt;注释xxxx&lt;/comment&gt;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/column&gt;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/property&gt;&nbsp;<br /><br />4. 增加了对空sql参数的检测。如 select xxx where abc in() xxx；当in 操作集合为空时，直接返回查询结果为空，避免sql错误。检测仅限于基于taglib和SeachExpression对象化的查询。&nbsp;<br /><br />5. 修订了配置管理中，连接池类型参数无法重复读取的bug。&nbsp;<br /><br />6. 工程改成了maven管理。&nbsp;<br /><br /><span style="font-size: large; "><strong style="font-weight: bold; ">什么是guzz?</strong></span>&nbsp;<br /><br />guzz是一套用于多数据库编程的ORM框架，用于替代hibernate和ibatis，实现在一套系统中轻松使用多台数据库。guzz同时提供通用数据计算和配置管理等，简化系统复杂度，为系统在数据层的设计提供一站式解决方案。<br /><br /><strong style="font-weight: bold; ">guzz主要功能与特点：</strong>&nbsp;<br /><ul style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">现代大规模系统设计，技术上吸收了ibatis/hibernate的优点</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">支持应用程序使用大量的数据库和主从读写分离</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">支持数据库表在多组机器间水平分布（Shard），并自动维护多组机器之间的分布式事务</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">支持1张表按照业务规则分切成多张小表（Shadow），并支持每张小表拥有自己特殊的属性字段（Custom）</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">支持1张大表分切后的小表，分布到不同的数据库中（VirtualDB）</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">支持超越范式的特殊关联、非结构化数据等异构资源POJO模式的统一读取</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">支持组件化服务（SOA）和服务相互依赖，构建企业/项目实施基础平台</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">提供面向对象的数据库读取标签(JSP Taglib)，加快页面展示层的快速变更、开发与部署</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">对于大部分场景，支持像hibernate一样的对象持久、映射和方便的增删改查，提高开发效率</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">对于复杂场景，支持像ibatis一样，让DBA参与SQL设计的复杂数据库操作和优化，以及SQL在线调试</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">更简洁、更好用、更容易控制的批操作接口</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">支持在线加载与调试SQL。按照应用策略，从文件/数据库/Web Service等途径，动态提取与使用SQL语句（Dynamic SQL）</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">支持配置管理服务器，可以使用一套软件系统对所有应用程序的配置进行统一管理</li></ul><strong style="font-weight: bold; ">项目地址：</strong><a href="http://code.google.com/p/guzz/" target="_blank" style="color: #006699; text-decoration: underline; ">http://code.google.com/p/guzz/</a>&nbsp;<br /><strong style="font-weight: bold; ">文档：</strong><a href="http://code.google.com/p/guzz/wiki/WikiHomePage?tm=6" target="_blank" style="color: #006699; text-decoration: underline; ">http://code.google.com/p/guzz/wiki/WikiHomePage?tm=6</a>&nbsp;<br /><strong style="font-weight: bold; ">下载：</strong><a href="http://code.google.com/p/guzz/downloads/list" target="_blank" style="color: #006699; text-decoration: underline; ">http://code.google.com/p/guzz/downloads/list</a>&nbsp;<br /></span><img src ="http://www.blogjava.net/darkbluefeeling/aggbug/357584.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/darkbluefeeling/" target="_blank">深蓝色心情</a> 2011-08-30 17:11 <a href="http://www.blogjava.net/darkbluefeeling/archive/2011/08/30/357584.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>通用操作日志系统设计。一次编写，所有项目共同使用！</title><link>http://www.blogjava.net/darkbluefeeling/archive/2011/08/01/355509.html</link><dc:creator>深蓝色心情</dc:creator><author>深蓝色心情</author><pubDate>Mon, 01 Aug 2011 10:35:00 GMT</pubDate><guid>http://www.blogjava.net/darkbluefeeling/archive/2011/08/01/355509.html</guid><wfw:comment>http://www.blogjava.net/darkbluefeeling/comments/355509.html</wfw:comment><comments>http://www.blogjava.net/darkbluefeeling/archive/2011/08/01/355509.html#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://www.blogjava.net/darkbluefeeling/comments/commentRss/355509.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/darkbluefeeling/services/trackbacks/355509.html</trackback:ping><description><![CDATA[<br /><span class="Apple-style-span" style="font-family: Tahoma; line-height: 25px; -webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 1px; ">基于分表和自定义表结构的日志系统。真正足够灵活的，实现成本较低的通用日志架构。&nbsp;<br /><br />新浪微盘下载PDF文档：<a href="http://t.cn/aY8XIT" target="_blank" style="color: #006699; text-decoration: underline; ">http://t.cn/aY8XIT</a>&nbsp;<br /><br /><br /><br /></span><img src ="http://www.blogjava.net/darkbluefeeling/aggbug/355509.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/darkbluefeeling/" target="_blank">深蓝色心情</a> 2011-08-01 18:35 <a href="http://www.blogjava.net/darkbluefeeling/archive/2011/08/01/355509.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>guzz1.2.9更新发布，支持选举服务</title><link>http://www.blogjava.net/darkbluefeeling/archive/2011/07/29/355282.html</link><dc:creator>深蓝色心情</dc:creator><author>深蓝色心情</author><pubDate>Fri, 29 Jul 2011 01:14:00 GMT</pubDate><guid>http://www.blogjava.net/darkbluefeeling/archive/2011/07/29/355282.html</guid><wfw:comment>http://www.blogjava.net/darkbluefeeling/comments/355282.html</wfw:comment><comments>http://www.blogjava.net/darkbluefeeling/archive/2011/07/29/355282.html#Feedback</comments><slash:comments>6</slash:comments><wfw:commentRss>http://www.blogjava.net/darkbluefeeling/comments/commentRss/355282.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/darkbluefeeling/services/trackbacks/355282.html</trackback:ping><description><![CDATA[<span class="Apple-style-span" style="font-family: Arial, sans-serif, Helvetica, Tahoma; line-height: 25px; "><br /><span style="font-size: large; "><strong style="font-weight: bold; ">guzz 1.2.9更新介绍：</strong></span>&nbsp;<br /><br /><strong style="font-weight: bold; ">本次更新：</strong>&nbsp;<br /><br />1. 优化了批操作接口。增加了默认的自动提交和清除选项，使得调用者可以连续插入百万记录而不用自己计数，手工分batchSize提交。默认batchSize的大小根据数据库类型和版本，自动选择性价比最合适的；当然调用者也可以在程序中修改。&nbsp;<br /><br />2. 新提供Leader服务接口。Leader接口用于在集群环境下确认自己是不是主机，一个集群下一般只允许1台主机。新提供的LeaderService仅为接口，开发者需要根据自身情况选择适合自己的实现。halo-cloud工程实现了基于zookeeper的Leader服务，代码：[http://code.google.com/p/halo-cloud/source/browse/trunk/misc/com/guzzservices/version/impl/ZKLeaderElectionServiceImpl.java]&nbsp;<br /><br /><span style="font-size: large; "><strong style="font-weight: bold; ">什么是guzz?</strong></span>&nbsp;<br /><br />guzz是一套用于多数据库编程的ORM框架，用于替代hibernate和ibatis，实现在一套系统中轻松使用多台数据库。guzz同时提供通用数据计算和配置管理等，简化系统复杂度，为系统在数据层的设计提供一站式解决方案。<br /><br /><strong style="font-weight: bold; ">guzz主要功能与特点：</strong>&nbsp;<br /><ul style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">现代大规模系统设计，技术上吸收了ibatis/hibernate的优点</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">支持应用程序使用大量的数据库和主从读写分离</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">支持数据库表在多组机器间水平分布（Shard），并自动维护多组机器之间的分布式事务</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">支持1张表按照业务规则分切成多张小表（Shadow），并支持每张小表拥有自己特殊的属性字段（Custom）</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">支持1张大表分切后的小表，分布到不同的数据库中（VirtualDB）</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">支持超越范式的特殊关联、非结构化数据等异构资源POJO模式的统一读取</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">支持组件化服务（SOA）和服务相互依赖，构建企业/项目实施基础平台</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">提供面向对象的数据库读取标签(JSP Taglib)，加快页面展示层的快速变更、开发与部署</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">对于大部分场景，支持像hibernate一样的对象持久、映射和方便的增删改查，提高开发效率</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">对于复杂场景，支持像ibatis一样，让DBA参与SQL设计的复杂数据库操作和优化，以及SQL在线调试</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">更简洁、更好用、更容易控制的批操作接口</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">支持在线加载与调试SQL。按照应用策略，从文件/数据库/Web Service等途径，动态提取与使用SQL语句（Dynamic SQL）</li><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">支持配置管理服务器，可以使用一套软件系统对所有应用程序的配置进行统一管理</li></ul><strong style="font-weight: bold; ">项目地址：</strong><a href="http://code.google.com/p/guzz/" target="_blank" style="color: #006699; text-decoration: underline; ">http://code.google.com/p/guzz/</a>&nbsp;<br /><strong style="font-weight: bold; ">文档：</strong><a href="http://code.google.com/p/guzz/wiki/WikiHomePage?tm=6" target="_blank" style="color: #006699; text-decoration: underline; ">http://code.google.com/p/guzz/wiki/WikiHomePage?tm=6</a>&nbsp;<br /><strong style="font-weight: bold; ">下载：</strong><a href="http://code.google.com/p/guzz/downloads/list" target="_blank" style="color: #006699; text-decoration: underline; ">http://code.google.com/p/guzz/downloads/list</a>&nbsp;<br /></span><br /><img src ="http://www.blogjava.net/darkbluefeeling/aggbug/355282.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/darkbluefeeling/" target="_blank">深蓝色心情</a> 2011-07-29 09:14 <a href="http://www.blogjava.net/darkbluefeeling/archive/2011/07/29/355282.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>halo-cloud开源私有云平台 新增调度任务和邮件发送服务</title><link>http://www.blogjava.net/darkbluefeeling/archive/2011/07/07/353842.html</link><dc:creator>深蓝色心情</dc:creator><author>深蓝色心情</author><pubDate>Thu, 07 Jul 2011 00:43:00 GMT</pubDate><guid>http://www.blogjava.net/darkbluefeeling/archive/2011/07/07/353842.html</guid><wfw:comment>http://www.blogjava.net/darkbluefeeling/comments/353842.html</wfw:comment><comments>http://www.blogjava.net/darkbluefeeling/archive/2011/07/07/353842.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/darkbluefeeling/comments/commentRss/353842.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/darkbluefeeling/services/trackbacks/353842.html</trackback:ping><description><![CDATA[<span class="Apple-style-span" style="font-family: Arial, sans-serif, Helvetica, Tahoma; line-height: 25px; "><span style="font-size: large; "><strong style="font-weight: bold; ">halo-cloud介绍</strong></span>&nbsp;<br /><br /><strong style="font-weight: bold; ">halo-cloud是什么？</strong>&nbsp;<br /><br />可由1到100台机器组成，并用普通编程方式扩展的小型私有云计算平台。&nbsp;<br /><br /><strong style="font-weight: bold; ">halo-cloud有何价值？</strong>&nbsp;<br /><br />不是每个公司都像google、像淘宝、像新浪微博一样庞大，需要复杂的成千上万台机器组成的大型云计算平台，那样技术太复杂，成本太高。&nbsp;<br /><br />更没有多少中国公司会使用GAE、Amaze EC之类公共云平台，那样网络吃不消。&nbsp;<br /><br />对于普通的公司，100台以内机器组成的私有云是最好的选择。规模适中、容易开发、易于维护。&nbsp;<br /><br />我们对云不炒作，不报幻想，只是希望有了他，我在一个项目中写过一遍的功能代码，在以后的项目中可以直接用，不用重复开发。我也不需要什么这规范那规范，因为我从不打算开放成公共云，够我的主要项目用，速度快就好。&nbsp;<br /><br />总的来说：我希望我的云是个云，没有单点问题；我希望我的云可以节省我的开发和维护成本，基础功能统统只用写一遍就可以复用；我希望我的云速度快，不要有SOAP Web Service之类的问题，当我真的需要性能的时候；我希望我的云能让现有的团队来维护和继续开发，不要学一大堆东西，甚至牵扯到个人悟性上。&nbsp;<br /><br />这就是halo-cloud诞生的理由。私有的、小型的、简单的云计算基础服务平台。你可以直接使用上面的服务，也可以低成本的在上面开发自己的新服务。&nbsp;<br /><br />PS：如果你觉得云这个名字不爽，就叫他分布式基础服务吧。&nbsp;<br /><br /><span style="font-size: large; "><strong style="font-weight: bold; ">主要更新：</strong></span>&nbsp;<br /><br />1. 新增任务调度功能。<strong style="font-weight: bold; ">项目价值：</strong>使用quartz统一实现调度，对于java项目开发基本不在需要配置调度；对于php等不具备任务功能的语言，自动获取某个页面定时执行的新功能。&nbsp;<br /><br />2. 新增邮件发送功能。<strong style="font-weight: bold; ">项目价值：</strong>对于项目开发，基本不用在配置重复的配置邮件服务器，编写邮件发送代码。只需要调用一个API即可。&nbsp;<br /><br />3. 服务器端增加客户端感知功能。编写服务器端程序时（服务提供者），新接口允许提供者获知当前调用者的IP地址和端口，用于进行权限校验等。&nbsp;<br /><br /><strong style="font-weight: bold; ">详细说明：</strong><a href="http://code.google.com/p/halo-cloud/wiki/AboutFAQ" target="_blank" style="color: #006699; text-decoration: underline; ">http://code.google.com/p/halo-cloud/wiki/AboutFAQ</a>&nbsp;<br /><br /><strong style="font-weight: bold; ">项目地址：</strong><a href="http://code.google.com/p/halo-cloud/" target="_blank" style="color: #006699; text-decoration: underline; ">http://code.google.com/p/halo-cloud/</a>&nbsp;<br /><br /><br /><br /><br /><br /></span><img src ="http://www.blogjava.net/darkbluefeeling/aggbug/353842.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/darkbluefeeling/" target="_blank">深蓝色心情</a> 2011-07-07 08:43 <a href="http://www.blogjava.net/darkbluefeeling/archive/2011/07/07/353842.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>大型系统设计第1课--可扩展的数据库层架构设计 PDF分享</title><link>http://www.blogjava.net/darkbluefeeling/archive/2011/03/29/347225.html</link><dc:creator>深蓝色心情</dc:creator><author>深蓝色心情</author><pubDate>Tue, 29 Mar 2011 09:23:00 GMT</pubDate><guid>http://www.blogjava.net/darkbluefeeling/archive/2011/03/29/347225.html</guid><wfw:comment>http://www.blogjava.net/darkbluefeeling/comments/347225.html</wfw:comment><comments>http://www.blogjava.net/darkbluefeeling/archive/2011/03/29/347225.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/darkbluefeeling/comments/commentRss/347225.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/darkbluefeeling/services/trackbacks/347225.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 《手把手，教你编写1个可以并行运行在5台数据库上的留言板》 <br><br>前言： <br><br>对于大规模系统而言，最复杂，往往也是最大的性能瓶颈，主要都产生在数据层。对于大型系统数据层的设计，主要包括缓存系统和数据库的可扩展性两方面。缓存系统比较简单，网上讨论的也比较多，方案也相对成熟，一般来说只要部署一大堆memcached之类的缓存服务器就可以解决了，扩展性也好；但对于可扩展的数据库层架构设计，通用方案较少，网上资料更是寥寥无几。 <br><br>这也有情可原，现在的主流通用数据库框架，如hibernate和ibatis基本上都只支持1个系统运行在1台数据库上。对应的，基于这些框架的系统，也基本上只能运行在单台数据库上了，框架对数据库扩展性的支持几乎没有，开发者也只能被迫接受。 <br><br>这篇文档，主要补充“重要”却被主流遗失的“数据库层可扩展”架构设计，让你的系统在“需要”时，可以随时通过增加机器就能最简单的解决数据库的性能瓶颈。 &nbsp;&nbsp;<a href='http://www.blogjava.net/darkbluefeeling/archive/2011/03/29/347225.html'>阅读全文</a><img src ="http://www.blogjava.net/darkbluefeeling/aggbug/347225.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/darkbluefeeling/" target="_blank">深蓝色心情</a> 2011-03-29 17:23 <a href="http://www.blogjava.net/darkbluefeeling/archive/2011/03/29/347225.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>数据库分布式设计很简单--guzz分布式切表功能正式发布</title><link>http://www.blogjava.net/darkbluefeeling/archive/2011/02/10/344018.html</link><dc:creator>深蓝色心情</dc:creator><author>深蓝色心情</author><pubDate>Thu, 10 Feb 2011 07:31:00 GMT</pubDate><guid>http://www.blogjava.net/darkbluefeeling/archive/2011/02/10/344018.html</guid><wfw:comment>http://www.blogjava.net/darkbluefeeling/comments/344018.html</wfw:comment><comments>http://www.blogjava.net/darkbluefeeling/archive/2011/02/10/344018.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/darkbluefeeling/comments/commentRss/344018.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/darkbluefeeling/services/trackbacks/344018.html</trackback:ping><description><![CDATA[<span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">今天，经过一个多月的线上运行，我们很荣幸的发布guzz 1.2.9分布式切表功能。分布式切表是指将一张大表分切成N张小表，并将这些小表储存到不同的数据库（机器）中，从而实现数据的分散存储和分散查询。</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">&nbsp;</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">对于大型系统和数据规模较大的系统，分布式切表提供了非常好的解决方案，有效的解决了大数据分散存储、查询、归档和维护等诸多的问题。但市面上流行的数据层框架，对于此特性几乎无人涉及。guzz首次将这种技术做成了通用框架级别，更全面的提供&#8220;一站式数据层解决方案&#8221;。</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">&nbsp;</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><span style="font-size: large; "><strong style="font-weight: bold; ">guzz 1.2.9 build20110209 更新介绍：</strong></span></span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">&nbsp;</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><strong style="font-weight: bold; ">分布式切表：</strong></span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">&nbsp;</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">guzz特性。</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">&nbsp;</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">分布式切表以guzz的Shadow Table为基础。在Shadow Table的基础上，通过配置完成，应用不需要修改现有代码即可完成小表的分布式存储。具体请参看：</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><a href="http://code.google.com/p/guzz/wiki/TutorialVirtualDB?wl=zh-Hans" target="_blank" style="color: #006699; text-decoration: underline; ">http://code.google.com/p/guzz/wiki/TutorialVirtualDB?wl=zh-Hans</a></span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">&nbsp;</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">至此，guzz已经通过6个层面完成了全面的数据分切支持：</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">&nbsp;</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span>
<ul style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">
    <li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">数据表比较多，总体较大，将表分到不同的数据库组中。第3章dbgroup：<a href="http://code.google.com/p/guzz/wiki/TutorialGuzzXml?wl=zh-Hans" target="_blank" style="color: #006699; text-decoration: underline; ">http://code.google.com/p/guzz/wiki/TutorialGuzzXml?wl=zh-Hans</a></li>
    <li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">某些表太大，将大表分成N张小表。第15章ShadowTable：<a href="http://code.google.com/p/guzz/wiki/TutorialShadowTable?wl=zh-Hans" target="_blank" style="color: #006699; text-decoration: underline; ">http://code.google.com/p/guzz/wiki/TutorialShadowTable?wl=zh-Hans</a></li>
    <li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">业务比较特殊，每张小表可能包含自己的特性字段。第16章CustomTable：<a href="http://code.google.com/p/guzz/wiki/TutorialCustomTable?wl=zh-Hans" target="_blank" style="color: #006699; text-decoration: underline; ">http://code.google.com/p/guzz/wiki/TutorialCustomTable?wl=zh-Hans</a></li>
    <li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">分成小表后，小表太多，或在单库中总量太大，将小表分散到不同的数据库中。第17章VirtualDB：<a href="http://code.google.com/p/guzz/wiki/TutorialVirtualDB?wl=zh-Hans" target="_blank" style="color: #006699; text-decoration: underline; ">http://code.google.com/p/guzz/wiki/TutorialVirtualDB?wl=zh-Hans</a></li>
    <li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">表中的某些字段太大，或者有特殊操作要求，将这些字段存到别的地方。第11章自定义加载属性：<a href="http://code.google.com/p/guzz/wiki/TutorialLazyLoad?wl=zh-Hans" target="_blank" style="color: #006699; text-decoration: underline; ">http://code.google.com/p/guzz/wiki/TutorialLazyLoad?wl=zh-Hans</a></li>
    <li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">访问量的确太高，使用guzz原生支持的读写分离，部署更多读数据库。</li>
</ul>
<span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><strong style="font-weight: bold; ">支持记录SQL执行时间：&nbsp;</strong></span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">在打印执行的SQL和SQL参数的同时，通过 调试服务（DebugService） 两个新的参数允许打印出sql执行所花费的时间，并且允许控制只打印执行时间超过一定时长的sql语句。时间单位为纳秒。</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">&nbsp;</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">具体请参看：</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><a href="http://code.google.com/p/guzz/wiki/AppendCoreService?wl=zh-Hans" target="_blank" style="color: #006699; text-decoration: underline; ">http://code.google.com/p/guzz/wiki/AppendCoreService?wl=zh-Hans</a></span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">&nbsp;</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><strong style="font-weight: bold; ">支持hbm.xml的package属性：</strong></span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">&nbsp;</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">支持配置hbm.xml的类名时，指定package。用于支持某些hibernate工具自动生成的配置文件。</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">&nbsp;</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><strong style="font-weight: bold; ">其他：</strong></span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">&nbsp;</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">1. 更改LogService为InsertQueueService；</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">&nbsp;</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">2. 修复了几个bug。</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">&nbsp;</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><span style="font-size: large; "><strong style="font-weight: bold; ">什么是guzz?</strong></span></span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">&nbsp;</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">guzz是一套用来解决ORM、多数据源管理、以及通用数据计算的数据层框架，为系统在数据层的设计提供一站式解决方案。guzz可以看作是 ibatis/hibernate的一大补充和延伸，并可以取代这2个东西。</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">&nbsp;</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><strong style="font-weight: bold; ">guzz主要功能与特点：</strong></span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">&nbsp;</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span>
<ul style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">
    <li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">现代大规模系统设计，技术上吸收了ibatis/hibernate的优点</li>
    <li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">对于大部分场景，支持像hibernate一样的对象持久、映射和方便的增删改查，提高开发效率</li>
    <li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">对于复杂场景，支持像ibatis一样，让DBA参与SQL设计的复杂数据库操作和优化，以及SQL在线调试</li>
    <li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">更简洁、更好用、更容易控制的批操作接口</li>
    <li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">支持在线加载与调试SQL。按照应用策略，从文件/数据库/Web Service等途径，动态提取与使用SQL语句（Dynamic SQL）</li>
    <li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">支持应用程序使用大量的数据库和主从读写分离</li>
    <li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">支持数据库表在多组机器间水平分布（Shard），并自动维护多组机器之间的分布式事务</li>
    <li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">支持1张表按照业务规则分切成多张小表（Shadow），并支持每张小表拥有自己特殊的属性字段（Custom）</li>
    <li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">支持1张大表分切后的小表，分布到不同的数据库中（VirtualDB）</li>
    <li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">支持超越范式的特殊关联、非结构化数据等异构资源POJO模式的统一读取</li>
    <li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">支持组件化服务（SOA）和服务相互依赖，构建企业/项目实施基础平台</li>
    <li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">提供面向对象的数据库读取标签(JSP Taglib)，加快页面展示层的快速变更、开发与部署</li>
    <li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">支持配置管理服务器，可以使用一套软件系统对所有应用程序的配置进行统一管理</li>
</ul>
<span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><strong style="font-weight: bold; ">项目地址：</strong></span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><a href="http://code.google.com/p/guzz/" target="_blank" style="color: #006699; text-decoration: underline; ">http://code.google.com/p/guzz/</a></span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">&nbsp;</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><strong style="font-weight: bold; ">文档：</strong></span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><a href="http://code.google.com/p/guzz/wiki/WikiHomePage?tm=6" target="_blank" style="color: #006699; text-decoration: underline; ">http://code.google.com/p/guzz/wiki/WikiHomePage?tm=6</a></span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">&nbsp;</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><strong style="font-weight: bold; ">下载：</strong></span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><a href="http://code.google.com/p/guzz/downloads/list" target="_blank" style="color: #006699; text-decoration: underline; ">http://code.google.com/p/guzz/downloads/list</a></span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">&nbsp;</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><span style="font-size: large; "><strong style="font-weight: bold; ">下一个build更新计划：</strong></span></span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">&nbsp;</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span>
<ul style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">
    <li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">做什么哪？开源一个云服务项目？</li>
    <li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">辅助诊断类功能？</li>
</ul>
<span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span>
<img src ="http://www.blogjava.net/darkbluefeeling/aggbug/344018.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/darkbluefeeling/" target="_blank">深蓝色心情</a> 2011-02-10 15:31 <a href="http://www.blogjava.net/darkbluefeeling/archive/2011/02/10/344018.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>服务发布：GuzzServices支持PHP客户端</title><link>http://www.blogjava.net/darkbluefeeling/archive/2010/12/26/341580.html</link><dc:creator>深蓝色心情</dc:creator><author>深蓝色心情</author><pubDate>Sun, 26 Dec 2010 13:09:00 GMT</pubDate><guid>http://www.blogjava.net/darkbluefeeling/archive/2010/12/26/341580.html</guid><wfw:comment>http://www.blogjava.net/darkbluefeeling/comments/341580.html</wfw:comment><comments>http://www.blogjava.net/darkbluefeeling/archive/2010/12/26/341580.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/darkbluefeeling/comments/commentRss/341580.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/darkbluefeeling/services/trackbacks/341580.html</trackback:ping><description><![CDATA[<span style="color: #444444; font-family: Arial, Helvetica, sans-serif; ">
<p mid="221101223865898935" type="1" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 6px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; line-height: 22px; font-size: 14px; "><span  style="font-family: verdana, arial, sans-serif; font-size: 13px; line-height: 18px; color: #000000; ">GuzzServices的PHP客户端实现，已经实现了：IP反查，敏感词审查，以及从html代码中抽取纯文本和图片。</span></p>
<p mid="221101223865898935" type="1" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 6px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; line-height: 22px; font-size: 14px; "><span  style="font-family: verdana, arial, sans-serif; font-size: 13px; line-height: 18px; color: #000000; ">
<p style="margin-top: 1em; margin-bottom: 1em; padding-top: 0px; padding-bottom: 0px; margin-right: 0px; margin-left: 0px; padding-right: 0px; padding-left: 0px; display: block; ">需要php服务器支持json，配置方式：<a href="http://php.net/manual/en/book.json.php" style="color: #365da0; font-weight: bold; text-decoration: none; ">http://php.net/manual/en/book.json.php</a></p>
<p style="margin-top: 1em; margin-bottom: 1em; padding-top: 0px; padding-bottom: 0px; margin-right: 0px; margin-left: 0px; padding-right: 0px; padding-left: 0px; display: block; ">客户端的使用方式请参看examples.php中的例子。</p>
<p style="margin-top: 1em; margin-bottom: 1em; padding-top: 0px; padding-bottom: 0px; margin-right: 0px; margin-left: 0px; padding-right: 0px; padding-left: 0px; display: block; "><a href="http://www.guzzservices.com/wp-content/uploads/2010/12/gs_phpclient.zip" style="color: #365da0; font-weight: bold; text-decoration: none; ">php客户端下载</a></p>
<p style="margin-top: 1em; margin-bottom: 1em; padding-top: 0px; padding-bottom: 0px; margin-right: 0px; margin-left: 0px; padding-right: 0px; padding-left: 0px; display: block; "><br />
</p>
</span></p>
</span>
<img src ="http://www.blogjava.net/darkbluefeeling/aggbug/341580.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/darkbluefeeling/" target="_blank">深蓝色心情</a> 2010-12-26 21:09 <a href="http://www.blogjava.net/darkbluefeeling/archive/2010/12/26/341580.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>guzz1.2.9 build20101021发布，新增两项原创功能</title><link>http://www.blogjava.net/darkbluefeeling/archive/2010/10/25/336049.html</link><dc:creator>深蓝色心情</dc:creator><author>深蓝色心情</author><pubDate>Mon, 25 Oct 2010 00:17:00 GMT</pubDate><guid>http://www.blogjava.net/darkbluefeeling/archive/2010/10/25/336049.html</guid><wfw:comment>http://www.blogjava.net/darkbluefeeling/comments/336049.html</wfw:comment><comments>http://www.blogjava.net/darkbluefeeling/archive/2010/10/25/336049.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/darkbluefeeling/comments/commentRss/336049.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/darkbluefeeling/services/trackbacks/336049.html</trackback:ping><description><![CDATA[<span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">guzz是一套用来解决ORM、多数据源管理、以及通用数据计算的数据层框架，为系统在数据层的设计提供一站式解决方案。guzz可以看作是 ibatis/hibernate的一大的延伸，并可以取代这2个东西。</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">&nbsp;</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><strong style="font-weight: bold; ">guzz主要功能与特点：</strong></span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">&nbsp;</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span>
<ul style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">
    <li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">现代大规模系统设计，技术上吸收了ibatis/hibernate的优点</li>
    <li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">支持像hibernate一样的对象化持久、映射和方便的增删改查</li>
    <li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">支持像ibatis一样，让dba参与sql设计的复杂数据库操作和优化</li>
    <li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">支持在线加载与调试SQL。按照应用策略，从文件/数据库/Web Service等途径，动态提取与使用SQL语句（Dynamic SQL）</li>
    <li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">支持应用程序使用大量的数据库和主从读写分离</li>
    <li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">支持超越范式的特殊关联、非结构化数据等异构资源的统一管理</li>
    <li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">支持数据表在多组机器间水平分布（Shard），并自动维护多组机器之间的分布式事务</li>
    <li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">支持1张表按照业务规则分切成多张小表（Shadow），并支持每张小表拥有自己特殊的属性字段（Custom）</li>
    <li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">支持组件化服务（Service），以及服务间依赖，帮助构建企业/项目实施基础平台</li>
    <li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">提供面向对象的数据库读取标签(JSP Taglib)，加快页面展示层的快速变更、开发与部署</li>
    <li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">支持配置管理服务器，可以使用一套软件系统对所有应用程序的配置进行统一管理</li>
</ul>
<span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><strong style="font-weight: bold; ">项目地址：</strong></span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><a href="http://code.google.com/p/guzz/" target="_blank" style="color: #006699; text-decoration: underline; ">http://code.google.com/p/guzz/</a></span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">&nbsp;</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><strong style="font-weight: bold; ">文档：</strong></span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><a href="http://code.google.com/p/guzz/wiki/WikiHomePage?tm=6" target="_blank" style="color: #006699; text-decoration: underline; ">http://code.google.com/p/guzz/wiki/WikiHomePage?tm=6</a></span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">&nbsp;</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><strong style="font-weight: bold; ">下载：</strong></span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><a href="http://code.google.com/p/guzz/downloads/list" target="_blank" style="color: #006699; text-decoration: underline; ">http://code.google.com/p/guzz/downloads/list</a></span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">&nbsp;</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><span style="font-size: large; "><strong style="font-weight: bold; ">guzz 1.2.9 build20101021 更新介绍：</strong></span></span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">&nbsp;</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><strong style="font-weight: bold; ">增强服务，支持服务间相互依赖</strong></span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">&nbsp;</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">服务在配置时，通过dependsOn属性设置依赖的服务，guzz进行IOC注入。例如您将一套通信协议设计成一个通信服务，当其他服务需要进行通信时，直接依赖通信服务完成远程调用或数据传送。</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">&nbsp;</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">为了说明服务的价值与使用方式，guzz设计了一些常用的基础服务，供测试或者直接使用。使用时，一般只需要几行代码，就可以完成本来的一个大模块。限于篇幅，请参看：</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><a href="http://www.guzzservices.com/category/developer-guide/" target="_blank" style="color: #006699; text-decoration: underline; ">http://www.guzzservices.com/category/developer-guide/</a></span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">&nbsp;</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">guzzservices.com中目前提供的服务包括：可以主动推送修改后配置项的系统配置管理，敏感词管理与文字过滤服务，以及通过IP查询地理位置服务。后续还将增加一些。试一下，就能发现guzz服务带来的开发与维护优势。</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">&nbsp;</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">服务以及注入文档：</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><a href="http://code.google.com/p/guzz/wiki/TutorialService?wl=zh-Hans#配置服务：" target="_blank" style="color: #006699; text-decoration: underline; ">http://code.google.com/p/guzz/wiki/TutorialService?wl=zh-Hans#配置服务：</a></span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">&nbsp;</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><strong style="font-weight: bold; ">新增random主键生成器（原创）：&nbsp;</strong></span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">random主键用于解决guid和uuid产生的主键在较短时间内比较类似，虽然不会重复，但容易被猜出来的问题。对于某些应用场景，如对外API的key，需要确保无法被猜出，这时就需要random主键策略。</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">&nbsp;</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">random主键生成一段随机字符串，由数字和小写字母组成。随机串长度默认为32，可以通过length属性进行调整。</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">&nbsp;</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><strong style="font-weight: bold; ">其他：</strong></span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">&nbsp;</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">1. 修复了一些bug；</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">&nbsp;</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">2. 完成英文版文档翻译。</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">&nbsp;</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><span style="font-size: large; "><strong style="font-weight: bold; ">下一个build更新计划：</strong></span></span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">&nbsp;</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span  style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span>
<ul style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">
    <li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">支持将一张大表分切到多台机器上。</li>
    <li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">其他</li>
    <li></li>
</ul>
<img src ="http://www.blogjava.net/darkbluefeeling/aggbug/336049.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/darkbluefeeling/" target="_blank">深蓝色心情</a> 2010-10-25 08:17 <a href="http://www.blogjava.net/darkbluefeeling/archive/2010/10/25/336049.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>重要变动：3行代码实现IP到地理位置反查服务，地址和API变更通知</title><link>http://www.blogjava.net/darkbluefeeling/archive/2010/10/21/335815.html</link><dc:creator>深蓝色心情</dc:creator><author>深蓝色心情</author><pubDate>Thu, 21 Oct 2010 12:08:00 GMT</pubDate><guid>http://www.blogjava.net/darkbluefeeling/archive/2010/10/21/335815.html</guid><wfw:comment>http://www.blogjava.net/darkbluefeeling/comments/335815.html</wfw:comment><comments>http://www.blogjava.net/darkbluefeeling/archive/2010/10/21/335815.html#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://www.blogjava.net/darkbluefeeling/comments/commentRss/335815.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/darkbluefeeling/services/trackbacks/335815.html</trackback:ping><description><![CDATA[<p style="margin-top: 1em; margin-bottom: 1em; padding-top: 0px; padding-bottom: 0px; margin-right: 0px; margin-left: 0px; padding-right: 0px; padding-left: 0px; display: block; font-family: verdana, arial, sans-serif; font-size: 13px; line-height: 18px; ">服务已经切换至guzzservices.com，并更改了API。请使用新的接口，具体参看：<a href="http://www.guzzservices.com/2010/man_ip_service/" style="color: #365da0; font-weight: bold; text-decoration: none; ">http://www.guzzservices.com/2010/man_ip_service/</a></p>
<p style="margin-top: 1em; margin-bottom: 1em; padding-top: 0px; padding-bottom: 0px; margin-right: 0px; margin-left: 0px; padding-right: 0px; padding-left: 0px; display: block; font-family: verdana, arial, sans-serif; font-size: 13px; line-height: 18px; ">使用时，需要将guzz升级到1.2.9以及以上版本。</p>
<p style="margin-top: 1em; margin-bottom: 1em; padding-top: 0px; padding-bottom: 0px; margin-right: 0px; margin-left: 0px; padding-right: 0px; padding-left: 0px; display: block; font-family: verdana, arial, sans-serif; font-size: 13px; line-height: 18px; ">如果您已经在使用，请尽快切换。新的地址应该不会在变化。非常抱歉进行了服务变化。</p>
<p style="margin-top: 1em; margin-bottom: 1em; padding-top: 0px; padding-bottom: 0px; margin-right: 0px; margin-left: 0px; padding-right: 0px; padding-left: 0px; display: block; font-family: verdana, arial, sans-serif; font-size: 13px; line-height: 18px; "><br />
</p>
<img src ="http://www.blogjava.net/darkbluefeeling/aggbug/335815.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/darkbluefeeling/" target="_blank">深蓝色心情</a> 2010-10-21 20:08 <a href="http://www.blogjava.net/darkbluefeeling/archive/2010/10/21/335815.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>数据库分切设计何必纠结于hibernate shard模式，应该简单化了</title><link>http://www.blogjava.net/darkbluefeeling/archive/2010/10/18/335488.html</link><dc:creator>深蓝色心情</dc:creator><author>深蓝色心情</author><pubDate>Mon, 18 Oct 2010 13:02:00 GMT</pubDate><guid>http://www.blogjava.net/darkbluefeeling/archive/2010/10/18/335488.html</guid><wfw:comment>http://www.blogjava.net/darkbluefeeling/comments/335488.html</wfw:comment><comments>http://www.blogjava.net/darkbluefeeling/archive/2010/10/18/335488.html#Feedback</comments><slash:comments>5</slash:comments><wfw:commentRss>http://www.blogjava.net/darkbluefeeling/comments/commentRss/335488.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/darkbluefeeling/services/trackbacks/335488.html</trackback:ping><description><![CDATA[<span style="font-family: Tahoma; font-size: 12px; line-height: 18px; ">最近讨论db shard的帖子比较多，感觉很多都是在参考hibernate shard的思路，但hibernate分表真的那么好吗？我觉得它最少有2个问题：</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; ">&nbsp;</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; ">1. 改成shard后，代码的API调用要变。代码改动很大。</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; ">&nbsp;</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; ">2. 设计很复杂，不清晰，逻辑关系难以理解。</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; ">&nbsp;</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; ">hibernate shard基本上就是为了shard而对hibernate做的增增补补，凑合用还行，根本不具备设计上的参考价值。</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; ">&nbsp;</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; ">对数据库分切方面，到目前为止，我觉得还是guzz的设计最清晰，如果我说的不对，欢迎理性讨论。不管您是否使用guzz，但是guzz在数据库分切方面的设计，对于清晰的设计模式，比hibernate shard更具有借鉴意义。</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; ">&nbsp;</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><span style="font-size: medium; "><strong style="font-weight: bold; ">guzz垂直切分</strong></span></span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; ">&nbsp;</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; ">垂直切分是指将不同的表分别存储到不同的数据库中。guzz默认配置级支持，不需要写任何代码，可以在任何时候，在需要时，将每张表存储到自己单独的一组服务器上，应该说是垂直分切的极限了。而且设计上，无论什么时候怎么分切，都不需要你改动代码。开发时你可以让所有表在一个库上；部署时，分到多个库上；以后业务增加了，再更加分散的放。</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; ">&nbsp;</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><strong style="font-weight: bold; ">垂直分切简单配置方式：</strong></span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; ">&nbsp;</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; ">1. 声明你要用多少台数据库，数据库之间什么关系。</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; ">&nbsp;</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span>
<div class="dp-highlighter" style="font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', Consolas, 'Courier New', monospace; font-size: 12px; background-color: transparent; width: 766px; overflow-x: auto; overflow-y: auto; margin-left: 9px; padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; word-break: break-all; word-wrap: break-word; line-height: 18px; ">
<div class="bar">
<div class="tools" style="padding-top: 3px; padding-right: 3px; padding-bottom: 3px; padding-left: 3px; text-align: left; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: black; font-weight: bold; ">Xml代码&nbsp;<embed src="http://www.javaeye.com/javascripts/syntaxhighlighter/clipboard_new.swf" width="14" height="15" flashvars="clipboard=%20%20%20%20%20%20%20%20%3Cdialect%20class%3D%22org.guzz.dialect.H2Dialect%22%3E%3C%2Fdialect%3E%0A%20%20%20%20%20%20%20%20%3Cdialect%20name%3D%22mysql5dialect%22%20class%3D%22org.guzz.dialect.Mysql5Dialect%22%20%2F%3E%0A%20%20%20%20%20%20%20%20%3Cdialect%20name%3D%22oracle10gdialect%22%20class%3D%22org.guzz.dialect.Oracle10gDialect%22%20%2F%3E%0A%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%3Ctran%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cdbgroup%20name%3D%22default%22%20masterDBConfigName%3D%22masterDB%22%20%2F%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cdbgroup%20name%3D%22mysql%22%20masterDBConfigName%3D%22masterDB%22%20slaveDBConfigName%3D%22mysqlSlaveDB%22%20dialectName%3D%22mysql5dialect%22%20%2F%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cdbgroup%20name%3D%22oracle%22%20masterDBConfigName%3D%22oracleDB%22%20dialectName%3D%22oracle10gdialect%22%20%2F%3E%0A%20%20%20%20%20%20%20%20%3C%2Ftran%3E%20%0A" quality="high" allowscriptaccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></div>
</div>
<ol start="1" class="dp-xml" style="font-size: 1em; line-height: 1.4em; margin-top: 0px; margin-right: 0px; margin-bottom: 1px; margin-left: 0px; padding-top: 2px; padding-right: 0px; padding-bottom: 2px; padding-left: 0px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: #d1d7dc; border-right-color: #d1d7dc; border-bottom-color: #d1d7dc; border-left-color: #d1d7dc; list-style-type: decimal; list-style-position: initial; list-style-image: initial; background-color: #ffffff; color: #2b91af; ">
    <li style="font-size: 1em; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 38px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 10px; border-left-width: 1px; border-left-style: solid; border-left-color: #d1d7dc; background-color: #fafafa; line-height: 18px; "><span style="color: black; "><span class="tag" style="color: #006699; font-weight: bold; ">&lt;</span><span class="tag-name" style="color: #006699; font-weight: bold; ">dialect</span><span style="color: black; ">&nbsp;</span><span class="attribute" style="color: red; ">class</span><span style="color: black; ">=</span><span class="attribute-value" style="color: blue; ">"org.guzz.dialect.H2Dialect"</span><span class="tag" style="color: #006699; font-weight: bold; ">&gt;</span><span class="tag" style="color: #006699; font-weight: bold; ">&lt;/</span><span class="tag-name" style="color: #006699; font-weight: bold; ">dialect</span><span class="tag" style="color: #006699; font-weight: bold; ">&gt;</span><span style="color: black; ">&nbsp;&nbsp;</span></span></li>
    <li style="font-size: 1em; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 38px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 10px; border-left-width: 1px; border-left-style: solid; border-left-color: #d1d7dc; background-color: #fafafa; line-height: 18px; "><span style="color: black; "><span class="tag" style="color: #006699; font-weight: bold; ">&lt;</span><span class="tag-name" style="color: #006699; font-weight: bold; ">dialect</span><span style="color: black; ">&nbsp;</span><span class="attribute" style="color: red; ">name</span><span style="color: black; ">=</span><span class="attribute-value" style="color: blue; ">"mysql5dialect"</span><span style="color: black; ">&nbsp;</span><span class="attribute" style="color: red; ">class</span><span style="color: black; ">=</span><span class="attribute-value" style="color: blue; ">"org.guzz.dialect.Mysql5Dialect"</span><span style="color: black; ">&nbsp;</span><span class="tag" style="color: #006699; font-weight: bold; ">/&gt;</span><span style="color: black; ">&nbsp;&nbsp;</span></span></li>
    <li style="font-size: 1em; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 38px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 10px; border-left-width: 1px; border-left-style: solid; border-left-color: #d1d7dc; background-color: #fafafa; line-height: 18px; "><span style="color: black; "><span class="tag" style="color: #006699; font-weight: bold; ">&lt;</span><span class="tag-name" style="color: #006699; font-weight: bold; ">dialect</span><span style="color: black; ">&nbsp;</span><span class="attribute" style="color: red; ">name</span><span style="color: black; ">=</span><span class="attribute-value" style="color: blue; ">"oracle10gdialect"</span><span style="color: black; ">&nbsp;</span><span class="attribute" style="color: red; ">class</span><span style="color: black; ">=</span><span class="attribute-value" style="color: blue; ">"org.guzz.dialect.Oracle10gDialect"</span><span style="color: black; ">&nbsp;</span><span class="tag" style="color: #006699; font-weight: bold; ">/&gt;</span><span style="color: black; ">&nbsp;&nbsp;</span></span></li>
    <li style="font-size: 1em; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 38px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 10px; border-left-width: 1px; border-left-style: solid; border-left-color: #d1d7dc; background-color: #fafafa; line-height: 18px; "><span style="color: black; ">&nbsp;&nbsp;</span></li>
    <li style="font-size: 1em; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 38px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 10px; border-left-width: 1px; border-left-style: solid; border-left-color: #d1d7dc; background-color: #fafafa; line-height: 18px; "><span style="color: black; "><span class="tag" style="color: #006699; font-weight: bold; ">&lt;</span><span class="tag-name" style="color: #006699; font-weight: bold; ">tran</span><span class="tag" style="color: #006699; font-weight: bold; ">&gt;</span><span style="color: black; ">&nbsp;&nbsp;</span></span></li>
    <li style="font-size: 1em; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 38px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 10px; border-left-width: 1px; border-left-style: solid; border-left-color: #d1d7dc; background-color: #fafafa; line-height: 18px; "><span style="color: black; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="tag" style="color: #006699; font-weight: bold; ">&lt;</span><span class="tag-name" style="color: #006699; font-weight: bold; ">dbgroup</span><span style="color: black; ">&nbsp;</span><span class="attribute" style="color: red; ">name</span><span style="color: black; ">=</span><span class="attribute-value" style="color: blue; ">"default"</span><span style="color: black; ">&nbsp;</span><span class="attribute" style="color: red; ">masterDBConfigName</span><span style="color: black; ">=</span><span class="attribute-value" style="color: blue; ">"masterDB"</span><span style="color: black; ">&nbsp;</span><span class="tag" style="color: #006699; font-weight: bold; ">/&gt;</span><span style="color: black; ">&nbsp;&nbsp;</span></span></li>
    <li style="font-size: 1em; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 38px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 10px; border-left-width: 1px; border-left-style: solid; border-left-color: #d1d7dc; background-color: #fafafa; line-height: 18px; "><span style="color: black; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="tag" style="color: #006699; font-weight: bold; ">&lt;</span><span class="tag-name" style="color: #006699; font-weight: bold; ">dbgroup</span><span style="color: black; ">&nbsp;</span><span class="attribute" style="color: red; ">name</span><span style="color: black; ">=</span><span class="attribute-value" style="color: blue; ">"mysql"</span><span style="color: black; ">&nbsp;</span><span class="attribute" style="color: red; ">masterDBConfigName</span><span style="color: black; ">=</span><span class="attribute-value" style="color: blue; ">"masterDB"</span><span style="color: black; ">&nbsp;</span><span class="attribute" style="color: red; ">slaveDBConfigName</span><span style="color: black; ">=</span><span class="attribute-value" style="color: blue; ">"mysqlSlaveDB"</span><span style="color: black; ">&nbsp;</span><span class="attribute" style="color: red; ">dialectName</span><span style="color: black; ">=</span><span class="attribute-value" style="color: blue; ">"mysql5dialect"</span><span style="color: black; ">&nbsp;</span><span class="tag" style="color: #006699; font-weight: bold; ">/&gt;</span><span style="color: black; ">&nbsp;&nbsp;</span></span></li>
    <li style="font-size: 1em; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 38px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 10px; border-left-width: 1px; border-left-style: solid; border-left-color: #d1d7dc; background-color: #fafafa; line-height: 18px; "><span style="color: black; ">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="tag" style="color: #006699; font-weight: bold; ">&lt;</span><span class="tag-name" style="color: #006699; font-weight: bold; ">dbgroup</span><span style="color: black; ">&nbsp;</span><span class="attribute" style="color: red; ">name</span><span style="color: black; ">=</span><span class="attribute-value" style="color: blue; ">"oracle"</span><span style="color: black; ">&nbsp;</span><span class="attribute" style="color: red; ">masterDBConfigName</span><span style="color: black; ">=</span><span class="attribute-value" style="color: blue; ">"oracleDB"</span><span style="color: black; ">&nbsp;</span><span class="attribute" style="color: red; ">dialectName</span><span style="color: black; ">=</span><span class="attribute-value" style="color: blue; ">"oracle10gdialect"</span><span style="color: black; ">&nbsp;</span><span class="tag" style="color: #006699; font-weight: bold; ">/&gt;</span><span style="color: black; ">&nbsp;&nbsp;</span></span></li>
    <li style="font-size: 1em; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 38px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 10px; border-left-width: 1px; border-left-style: solid; border-left-color: #d1d7dc; background-color: #fafafa; line-height: 18px; "><span style="color: black; "><span class="tag" style="color: #006699; font-weight: bold; ">&lt;/</span><span class="tag-name" style="color: #006699; font-weight: bold; ">tran</span><span class="tag" style="color: #006699; font-weight: bold; ">&gt;</span><span style="color: black; ">&nbsp;&nbsp;&nbsp;</span></span></li>
</ol>
</div>
<span style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; ">这里我们声明了3组数据库，而且数据库类型还不一样。</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; ">&nbsp;</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; ">2. 对每张表，配置应该存储到那个库里</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; ">&nbsp;</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span>
<div class="dp-highlighter" style="font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', Consolas, 'Courier New', monospace; font-size: 12px; background-color: transparent; width: 766px; overflow-x: auto; overflow-y: auto; margin-left: 9px; padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; word-break: break-all; word-wrap: break-word; line-height: 18px; ">
<div class="bar">
<div class="tools" style="padding-top: 3px; padding-right: 3px; padding-bottom: 3px; padding-left: 3px; text-align: left; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: black; font-weight: bold; ">Xml代码&nbsp;<embed src="http://www.javaeye.com/javascripts/syntaxhighlighter/clipboard_new.swf" width="14" height="15" flashvars="clipboard=%09%3Ca-business%20dbgroup%3D%22default%22%20name%3D%22filterWord%22%20class%3D%22com.guzzservices.business.FilterWord%22%20%2F%3E%0A%09%3Ca-business%20dbgroup%3D%22mysql%22%20name%3D%22filterWordGroup%22%20class%3D%22com.guzzservices.business.FilterWordGroup%22%20%2F%3E%0A%09%3Ca-business%20dbgroup%3D%22oracle%22%20name%3D%22configuration%22%20class%3D%22com.guzzservices.business.Configuration%22%20%2F%3E%0A" quality="high" allowscriptaccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></div>
</div>
<ol start="1" class="dp-xml" style="font-size: 1em; line-height: 1.4em; margin-top: 0px; margin-right: 0px; margin-bottom: 1px; margin-left: 0px; padding-top: 2px; padding-right: 0px; padding-bottom: 2px; padding-left: 0px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: #d1d7dc; border-right-color: #d1d7dc; border-bottom-color: #d1d7dc; border-left-color: #d1d7dc; list-style-type: decimal; list-style-position: initial; list-style-image: initial; background-color: #ffffff; color: #2b91af; ">
    <li style="font-size: 1em; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 38px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 10px; border-left-width: 1px; border-left-style: solid; border-left-color: #d1d7dc; background-color: #fafafa; line-height: 18px; "><span style="color: black; "><span class="tag" style="color: #006699; font-weight: bold; ">&lt;</span><span class="tag-name" style="color: #006699; font-weight: bold; ">a-business</span><span style="color: black; ">&nbsp;</span><span class="attribute" style="color: red; ">dbgroup</span><span style="color: black; ">=</span><span class="attribute-value" style="color: blue; ">"default"</span><span style="color: black; ">&nbsp;</span><span class="attribute" style="color: red; ">name</span><span style="color: black; ">=</span><span class="attribute-value" style="color: blue; ">"filterWord"</span><span style="color: black; ">&nbsp;</span><span class="attribute" style="color: red; ">class</span><span style="color: black; ">=</span><span class="attribute-value" style="color: blue; ">"com.guzzservices.business.FilterWord"</span><span style="color: black; ">&nbsp;</span><span class="tag" style="color: #006699; font-weight: bold; ">/&gt;</span><span style="color: black; ">&nbsp;&nbsp;</span></span></li>
    <li style="font-size: 1em; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 38px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 10px; border-left-width: 1px; border-left-style: solid; border-left-color: #d1d7dc; background-color: #fafafa; line-height: 18px; "><span style="color: black; "><span class="tag" style="color: #006699; font-weight: bold; ">&lt;</span><span class="tag-name" style="color: #006699; font-weight: bold; ">a-business</span><span style="color: black; ">&nbsp;</span><span class="attribute" style="color: red; ">dbgroup</span><span style="color: black; ">=</span><span class="attribute-value" style="color: blue; ">"mysql"</span><span style="color: black; ">&nbsp;</span><span class="attribute" style="color: red; ">name</span><span style="color: black; ">=</span><span class="attribute-value" style="color: blue; ">"filterWordGroup"</span><span style="color: black; ">&nbsp;</span><span class="attribute" style="color: red; ">class</span><span style="color: black; ">=</span><span class="attribute-value" style="color: blue; ">"com.guzzservices.business.FilterWordGroup"</span><span style="color: black; ">&nbsp;</span><span class="tag" style="color: #006699; font-weight: bold; ">/&gt;</span><span style="color: black; ">&nbsp;&nbsp;</span></span></li>
    <li style="font-size: 1em; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 38px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 10px; border-left-width: 1px; border-left-style: solid; border-left-color: #d1d7dc; background-color: #fafafa; line-height: 18px; "><span style="color: black; "><span class="tag" style="color: #006699; font-weight: bold; ">&lt;</span><span class="tag-name" style="color: #006699; font-weight: bold; ">a-business</span><span style="color: black; ">&nbsp;</span><span class="attribute" style="color: red; ">dbgroup</span><span style="color: black; ">=</span><span class="attribute-value" style="color: blue; ">"oracle"</span><span style="color: black; ">&nbsp;</span><span class="attribute" style="color: red; ">name</span><span style="color: black; ">=</span><span class="attribute-value" style="color: blue; ">"configuration"</span><span style="color: black; ">&nbsp;</span><span class="attribute" style="color: red; ">class</span><span style="color: black; ">=</span><span class="attribute-value" style="color: blue; ">"com.guzzservices.business.Configuration"</span><span style="color: black; ">&nbsp;</span><span class="tag" style="color: #006699; font-weight: bold; ">/&gt;</span><span style="color: black; ">&nbsp;&nbsp;</span></span></li>
</ol>
</div>
<span style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; ">简单的配置，将三个对象分别存储到3台不同的数据库中，完成垂直分切。</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; ">&nbsp;</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><span style="font-size: medium; "><strong style="font-weight: bold; ">guzz水平切表</strong></span></span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; ">&nbsp;</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; ">水平切表是指将一张大表，分切成许多小表。guzz的设计是当需要水平分表时，原先代码不变，为每个需要分切的表编写一个分表策略类，配置到系统中。然后在调用前，声明分表策略即可。</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; ">&nbsp;</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; ">&nbsp;</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; ">&nbsp;</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; ">&nbsp; 整个过程只需要新写一个类，在调用出增加一行代码即可，对原始系统入侵非常小，风险可控。</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; ">&nbsp;</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; ">&nbsp; 流程总比hibernate shard要清晰很多，具体可以看</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><a href="http://code.google.com/p/guzz/wiki/TutorialShadowTable?wl=zh-Hans" target="_blank" style="color: #006699; text-decoration: underline; ">http://code.google.com/p/guzz/wiki/TutorialShadowTable?wl=zh-Hans</a></span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; ">&nbsp;</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><span style="font-size: medium; "><strong style="font-weight: bold; ">数据库主从分离</strong></span></span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; ">&nbsp;</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; ">从垂直分切部分可以看到，guzz也是配置性的原生支持读写分离。如果需要增加从数据库，可以随时加上，不需要改任何代码。不需要改动代码，而且配置也不复杂，应该算是设计上的极限了吧？</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; ">&nbsp;</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; ">你只需要在dbgroup中增加一个属性&#8220;slaveDBConfigName&#8221;，然后在一个properties文件中加上所有你需要的从数据库连接池配置即可，从数据库可以有许多台。</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; ">&nbsp;</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; ">这个hibernate shard根本就没有涉及到。而且guzz允许程序控制读写库选取，和proxy模式的中间件路由各有优势，毕竟更加容易控制。如果你做过内容提前审核再允许发布的系统，就会明白proxy中间件解决不了全部问题，有些读操作不允许延迟，只能读主库，而是也是读事务，proxy中间件会很尴尬。</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; ">&nbsp;</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><strong style="font-weight: bold; "><span style="font-size: medium; ">异构数据库</span></strong></span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; ">&nbsp;</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; ">这个hibernate以及ibatis之类的更没有了。而且也是对应用透明的，你可以随时选择增加一种数据库，然后把某些表放到上面，如增加一个H2做应用端缓存数据库，自己完成类似Timesten + oracle的架构。</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; ">&nbsp;</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; ">配置方式在上面的垂直分切小节也可以看到。</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; ">&nbsp;</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><span style="font-size: medium; "><strong style="font-weight: bold; ">数据库连接池配置</strong></span></span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; ">&nbsp;</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; ">随着表垂直和水平切分的进行，数据库会越来越多，数据源配置也会越来越多。guzz的设计是配置分组管理，类似Mysql的配置文件。每个数据源配置都在一个组内，无论增加多少都清晰了然，不会名字相互冲突。</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; ">&nbsp;</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; ">示例：</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; ">&nbsp;</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span>
<div class="dp-highlighter" style="font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', Consolas, 'Courier New', monospace; font-size: 12px; background-color: transparent; width: 766px; overflow-x: auto; overflow-y: auto; margin-left: 9px; padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; word-break: break-all; word-wrap: break-word; line-height: 18px; ">
<div class="bar">
<div class="tools" style="padding-top: 3px; padding-right: 3px; padding-bottom: 3px; padding-left: 3px; text-align: left; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: black; font-weight: bold; ">Properties代码&nbsp;<embed src="http://www.javaeye.com/javascripts/syntaxhighlighter/clipboard_new.swf" width="14" height="15" flashvars="clipboard=%5BmasterDB%5D%0Aguzz.identifer%3DblogMasterDB%0Aguzz.IP%3Dlocalhost%0Aguzz.maxLoad%3D120%0AdriverClass%3Dcom.mysql.jdbc.Driver%0AjdbcUrl%3Djdbc%3Amysql%3A%2F%2Flocalhost%3A3306%2Fblog%3FuseUnicode%3Dtrue%26amp%3BcharacterEncoding%3DUTF-8%26amp%3BuseServerPrepStmts%3Dtrue%0Auser%3Droot%0Apassword%3Droot%0AacquireIncrement%3D10%0AidleConnectionTestPeriod%3D60%0A%0A%5BupdateMasterDB%5D%0Aguzz.identifer%3DincUpdateDB1%0Aguzz.IP%3Dlocalhost%0Aguzz.maxLoad%3D20%0AdriverClass%3Dcom.mysql.jdbc.Driver%0AjdbcUrl%3Djdbc%3Amysql%3A%2F%2Flocalhost%3A3306%2FguzzSlowUpdate%3FuseUnicode%3Dtrue%26amp%3BcharacterEncoding%3DUTF-8%0Auser%3Dslowupdate%0Apassword%3Dslowupdate%0AacquireIncrement%3D10%0AidleConnectionTestPeriod%3D60%0A%0A%5BlogMasterDB%5D%0A....%0A" quality="high" allowscriptaccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></div>
</div>
<ol start="1" class="dp-default" style="font-size: 1em; line-height: 1.4em; margin-top: 0px; margin-right: 0px; margin-bottom: 1px; margin-left: 0px; padding-top: 2px; padding-right: 0px; padding-bottom: 2px; padding-left: 0px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: #d1d7dc; border-right-color: #d1d7dc; border-bottom-color: #d1d7dc; border-left-color: #d1d7dc; list-style-type: decimal; list-style-position: initial; list-style-image: initial; background-color: #ffffff; color: #2b91af; ">
    <li style="font-size: 1em; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 38px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 10px; border-left-width: 1px; border-left-style: solid; border-left-color: #d1d7dc; background-color: #fafafa; line-height: 18px; "><span style="color: black; "><span style="color: black; ">[masterDB]&nbsp;&nbsp;</span></span></li>
    <li style="font-size: 1em; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 38px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 10px; border-left-width: 1px; border-left-style: solid; border-left-color: #d1d7dc; background-color: #fafafa; line-height: 18px; "><span style="color: black; ">guzz.identifer=blogMasterDB&nbsp;&nbsp;</span></li>
    <li style="font-size: 1em; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 38px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 10px; border-left-width: 1px; border-left-style: solid; border-left-color: #d1d7dc; background-color: #fafafa; line-height: 18px; "><span style="color: black; ">guzz.IP=localhost&nbsp;&nbsp;</span></li>
    <li style="font-size: 1em; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 38px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 10px; border-left-width: 1px; border-left-style: solid; border-left-color: #d1d7dc; background-color: #fafafa; line-height: 18px; "><span style="color: black; ">guzz.maxLoad=<span class="number" style="color: #c00000; ">120</span><span style="color: black; ">&nbsp;&nbsp;</span></span></li>
    <li style="font-size: 1em; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 38px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 10px; border-left-width: 1px; border-left-style: solid; border-left-color: #d1d7dc; background-color: #fafafa; line-height: 18px; "><span style="color: black; ">driverClass=com.mysql.jdbc.Driver&nbsp;&nbsp;</span></li>
    <li style="font-size: 1em; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 38px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 10px; border-left-width: 1px; border-left-style: solid; border-left-color: #d1d7dc; background-color: #fafafa; line-height: 18px; "><span style="color: black; ">jdbcUrl=jdbc:mysql://localhost:<span class="number" style="color: #c00000; ">3306</span><span style="color: black; ">/blog?useUnicode=true&amp;amp;characterEncoding=UTF-</span><span class="number" style="color: #c00000; ">8</span><span style="color: black; ">&amp;amp;useServerPrepStmts=true&nbsp;&nbsp;</span></span></li>
    <li style="font-size: 1em; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 38px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 10px; border-left-width: 1px; border-left-style: solid; border-left-color: #d1d7dc; background-color: #fafafa; line-height: 18px; "><span style="color: black; ">user=root&nbsp;&nbsp;</span></li>
    <li style="font-size: 1em; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 38px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 10px; border-left-width: 1px; border-left-style: solid; border-left-color: #d1d7dc; background-color: #fafafa; line-height: 18px; "><span style="color: black; ">password=root&nbsp;&nbsp;</span></li>
    <li style="font-size: 1em; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 38px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 10px; border-left-width: 1px; border-left-style: solid; border-left-color: #d1d7dc; background-color: #fafafa; line-height: 18px; "><span style="color: black; ">acquireIncrement=<span class="number" style="color: #c00000; ">10</span><span style="color: black; ">&nbsp;&nbsp;</span></span></li>
    <li style="font-size: 1em; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 38px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 10px; border-left-width: 1px; border-left-style: solid; border-left-color: #d1d7dc; background-color: #fafafa; line-height: 18px; "><span style="color: black; ">idleConnectionTestPeriod=<span class="number" style="color: #c00000; ">60</span><span style="color: black; ">&nbsp;&nbsp;</span></span></li>
    <li style="font-size: 1em; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 38px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 10px; border-left-width: 1px; border-left-style: solid; border-left-color: #d1d7dc; background-color: #fafafa; line-height: 18px; "><span style="color: black; ">&nbsp;&nbsp;</span></li>
    <li style="font-size: 1em; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 38px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 10px; border-left-width: 1px; border-left-style: solid; border-left-color: #d1d7dc; background-color: #fafafa; line-height: 18px; "><span style="color: black; ">[updateMasterDB]&nbsp;&nbsp;</span></li>
    <li style="font-size: 1em; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 38px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 10px; border-left-width: 1px; border-left-style: solid; border-left-color: #d1d7dc; background-color: #fafafa; line-height: 18px; "><span style="color: black; ">guzz.identifer=incUpdateDB1&nbsp;&nbsp;</span></li>
    <li style="font-size: 1em; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 38px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 10px; border-left-width: 1px; border-left-style: solid; border-left-color: #d1d7dc; background-color: #fafafa; line-height: 18px; "><span style="color: black; ">guzz.IP=localhost&nbsp;&nbsp;</span></li>
    <li style="font-size: 1em; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 38px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 10px; border-left-width: 1px; border-left-style: solid; border-left-color: #d1d7dc; background-color: #fafafa; line-height: 18px; "><span style="color: black; ">guzz.maxLoad=<span class="number" style="color: #c00000; ">20</span><span style="color: black; ">&nbsp;&nbsp;</span></span></li>
    <li style="font-size: 1em; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 38px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 10px; border-left-width: 1px; border-left-style: solid; border-left-color: #d1d7dc; background-color: #fafafa; line-height: 18px; "><span style="color: black; ">driverClass=com.mysql.jdbc.Driver&nbsp;&nbsp;</span></li>
    <li style="font-size: 1em; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 38px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 10px; border-left-width: 1px; border-left-style: solid; border-left-color: #d1d7dc; background-color: #fafafa; line-height: 18px; "><span style="color: black; ">jdbcUrl=jdbc:mysql://localhost:<span class="number" style="color: #c00000; ">3306</span><span style="color: black; ">/guzzSlowUpdate?useUnicode=true&amp;amp;characterEncoding=UTF-</span><span class="number" style="color: #c00000; ">8</span><span style="color: black; ">&nbsp;&nbsp;</span></span></li>
    <li style="font-size: 1em; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 38px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 10px; border-left-width: 1px; border-left-style: solid; border-left-color: #d1d7dc; background-color: #fafafa; line-height: 18px; "><span style="color: black; ">user=slowupdate&nbsp;&nbsp;</span></li>
    <li style="font-size: 1em; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 38px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 10px; border-left-width: 1px; border-left-style: solid; border-left-color: #d1d7dc; background-color: #fafafa; line-height: 18px; "><span style="color: black; ">password=slowupdate&nbsp;&nbsp;</span></li>
    <li style="font-size: 1em; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 38px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 10px; border-left-width: 1px; border-left-style: solid; border-left-color: #d1d7dc; background-color: #fafafa; line-height: 18px; "><span style="color: black; ">acquireIncrement=<span class="number" style="color: #c00000; ">10</span><span style="color: black; ">&nbsp;&nbsp;</span></span></li>
    <li style="font-size: 1em; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 38px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 10px; border-left-width: 1px; border-left-style: solid; border-left-color: #d1d7dc; background-color: #fafafa; line-height: 18px; "><span style="color: black; ">idleConnectionTestPeriod=<span class="number" style="color: #c00000; ">60</span><span style="color: black; ">&nbsp;&nbsp;</span></span></li>
    <li style="font-size: 1em; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 38px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 10px; border-left-width: 1px; border-left-style: solid; border-left-color: #d1d7dc; background-color: #fafafa; line-height: 18px; "><span style="color: black; ">&nbsp;&nbsp;</span></li>
    <li style="font-size: 1em; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 38px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 10px; border-left-width: 1px; border-left-style: solid; border-left-color: #d1d7dc; background-color: #fafafa; line-height: 18px; "><span style="color: black; ">[logMasterDB]&nbsp;&nbsp;</span></li>
    <li style="font-size: 1em; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 38px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 10px; border-left-width: 1px; border-left-style: solid; border-left-color: #d1d7dc; background-color: #fafafa; line-height: 18px; "><span style="color: black; ">....&nbsp;&nbsp;</span></li>
</ol>
</div>
<span style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; ">如果一些数据库对某些连接池支持更好，guzz设计上还允许为不同的数据源指定不同的连接池实现。</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; ">&nbsp;</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; ">如果您需要分表，还是放弃hibernate shard或ibatis的设计模式吧，哪些只是临时拼凑出来的东西，设计上根本就不怎么样！</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; ">&nbsp;</span>
<img src ="http://www.blogjava.net/darkbluefeeling/aggbug/335488.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/darkbluefeeling/" target="_blank">深蓝色心情</a> 2010-10-18 21:02 <a href="http://www.blogjava.net/darkbluefeeling/archive/2010/10/18/335488.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>3行代码，实现IP到地理位置的反查功能</title><link>http://www.blogjava.net/darkbluefeeling/archive/2010/06/22/324143.html</link><dc:creator>深蓝色心情</dc:creator><author>深蓝色心情</author><pubDate>Tue, 22 Jun 2010 03:59:00 GMT</pubDate><guid>http://www.blogjava.net/darkbluefeeling/archive/2010/06/22/324143.html</guid><wfw:comment>http://www.blogjava.net/darkbluefeeling/comments/324143.html</wfw:comment><comments>http://www.blogjava.net/darkbluefeeling/archive/2010/06/22/324143.html#Feedback</comments><slash:comments>9</slash:comments><wfw:commentRss>http://www.blogjava.net/darkbluefeeling/comments/commentRss/324143.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/darkbluefeeling/services/trackbacks/324143.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 服务地址和接口已经更改，新的使用手册在：http://www.guzzservices.com/2010/man_ip_service/一．功能介绍&nbsp;通过传入的IP地址，返回IP所在的地理位置。如传入&#8220;58.16.209.19&#8221;，返回&#8220;贵州省六盘水市 &#8221;。&nbsp;返回的地理位置又分为3种精确度，程序可以按照自身需要选...&nbsp;&nbsp;<a href='http://www.blogjava.net/darkbluefeeling/archive/2010/06/22/324143.html'>阅读全文</a><img src ="http://www.blogjava.net/darkbluefeeling/aggbug/324143.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/darkbluefeeling/" target="_blank">深蓝色心情</a> 2010-06-22 11:59 <a href="http://www.blogjava.net/darkbluefeeling/archive/2010/06/22/324143.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>改进架构，实现动态数据源，降低java维护</title><link>http://www.blogjava.net/darkbluefeeling/archive/2010/05/27/322032.html</link><dc:creator>深蓝色心情</dc:creator><author>深蓝色心情</author><pubDate>Thu, 27 May 2010 06:52:00 GMT</pubDate><guid>http://www.blogjava.net/darkbluefeeling/archive/2010/05/27/322032.html</guid><wfw:comment>http://www.blogjava.net/darkbluefeeling/comments/322032.html</wfw:comment><comments>http://www.blogjava.net/darkbluefeeling/archive/2010/05/27/322032.html#Feedback</comments><slash:comments>5</slash:comments><wfw:commentRss>http://www.blogjava.net/darkbluefeeling/comments/commentRss/322032.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/darkbluefeeling/services/trackbacks/322032.html</trackback:ping><description><![CDATA[<span  style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><strong style="font-weight: bold; ">如何不用写java代码来完成开发？</strong></span><span  style="font-family: Tahoma; font-size: 12px; line-height: 18px; ">&nbsp;</span><span  style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span  style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span  style="font-family: Tahoma; font-size: 12px; line-height: 18px; ">对于大部分的产品和项目来说，页面变化是非常头痛的事情。每次小功能上线，新客户到来，都需要进行定制改造，不断的开发维护。每次开发一方面要改动页面，一方面要改动服务器代码，然后部署。而借助动态数据源，可以不用开发后端应用，直接完成功能开发。</span><span  style="font-family: Tahoma; font-size: 12px; line-height: 18px; ">&nbsp;</span><span  style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span  style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span  style="font-family: Tahoma; font-size: 12px; line-height: 18px; ">新功能开发时，只需要定义需要的数据格式和获取方法，如通过xml上传1个sql语句，系统根据sql语句自动提取数据并转成通用的格式。开发过程中，后台java开发部分只是写好sql并且上传，这样前台通过某一个servlet可以动态的读取执行sql，并将结果按照json返给前端，以后所有的开发只需要前端做ajax实现页面即可。</span><span  style="font-family: Tahoma; font-size: 12px; line-height: 18px; ">&nbsp;</span><span  style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span  style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span  style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><strong style="font-weight: bold; ">完整业务流程如下：</strong></span><span  style="font-family: Tahoma; font-size: 12px; line-height: 18px; ">&nbsp;</span><span  style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span  style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span  style="font-family: Tahoma; font-size: 12px; line-height: 18px; ">1. 用户在前端操作，如需要读取经济类图书。</span><span  style="font-family: Tahoma; font-size: 12px; line-height: 18px; ">&nbsp;</span><span  style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span  style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span  style="font-family: Tahoma; font-size: 12px; line-height: 18px; ">2. 前端js判断是什么操作，然后发送ajax请求到：http://services.guzz.org/commonServlet?id=f2354239sfASASFASfasf6&amp;catId=47&amp;keyword=jingji.....</span><span  style="font-family: Tahoma; font-size: 12px; line-height: 18px; ">&nbsp;</span><span  style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span  style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span  style="font-family: Tahoma; font-size: 12px; line-height: 18px; ">3. 服务器端有一个类似dispatcher-servlet的东西（我们这儿的commonServlet），拦截请求，根据id知道加载数据需要执行名称为f2354239sfASASFASfasf6的sql文件，执行时需要参数：catId=47和keyword=jingji</span><span  style="font-family: Tahoma; font-size: 12px; line-height: 18px; ">&nbsp;</span><span  style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span  style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span  style="font-family: Tahoma; font-size: 12px; line-height: 18px; ">4. commonServlet从文件系统中读取f2354239sfASASFASfasf6.xml文件（这个文件在一个隐藏的目录下，从浏览器是不能直接获取到的；集群环境会存放在集中存储上），解析sql以及对象映射ORM。</span><span  style="font-family: Tahoma; font-size: 12px; line-height: 18px; ">&nbsp;</span><span  style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span  style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span  style="font-family: Tahoma; font-size: 12px; line-height: 18px; ">5. commonServlet打开数据库连接，根据sql构造查询语句，将第一步传入的参数全部作为命名参数传给查询语句，执行查询。</span><span  style="font-family: Tahoma; font-size: 12px; line-height: 18px; ">&nbsp;</span><span  style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span  style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span  style="font-family: Tahoma; font-size: 12px; line-height: 18px; ">6. commonServlet把查询的ResultSet根据ORM转成java类，再转成json，返回前台。</span><span  style="font-family: Tahoma; font-size: 12px; line-height: 18px; ">&nbsp;</span><span  style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span  style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span  style="font-family: Tahoma; font-size: 12px; line-height: 18px; ">7. 前台根据json构造出页面并展示。结束流程。</span><span  style="font-family: Tahoma; font-size: 12px; line-height: 18px; ">&nbsp;</span><span  style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span  style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span  style="font-family: Tahoma; font-size: 12px; line-height: 18px; ">在整个过程中，有2个关键步骤，一是动态加载SQL并进行ORM映射，一是自动进行sql所需要参数的类型转换和匹配，进行命名查询。如果系统规模较大，还需要解决查询时分库分表的问题。对于这种sql使用方式，由于在系统上线时，并不知道以后会用哪些sql语句，我们称作动态SQL。</span><span  style="font-family: Tahoma; font-size: 12px; line-height: 18px; ">&nbsp;</span><span  style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span  style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span  style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><strong style="font-weight: bold; ">实现方式：</strong></span><span  style="font-family: Tahoma; font-size: 12px; line-height: 18px; ">&nbsp;</span><span  style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span  style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span  style="font-family: Tahoma; font-size: 12px; line-height: 18px; ">步骤1. 实现servlet。定义一个普通的servlet，或者jsp，或者webwork/spring action，接收参数，获取到sql的id，以及所有传入的参数，然后转入处理类处理。处理完成后，将返回结果转成json返回前端。</span><span  style="font-family: Tahoma; font-size: 12px; line-height: 18px; ">&nbsp;</span><span  style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span  style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span  style="font-family: Tahoma; font-size: 12px; line-height: 18px; ">步骤2. 实现动态SQL加载与查询。处理类根据id加载sql并执行，返回数据库查询结果。guzz 1.2.8 beta2提供了动态SQL服务，根据此服务可以直接实现此功能。详细说明：</span><span  style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><a href="http://code.google.com/p/guzz/wiki/TutorialDynamicSQLService" target="_blank" style="color: #006699; text-decoration: underline; ">http://code.google.com/p/guzz/wiki/TutorialDynamicSQLService</a></span><span  style="font-family: Tahoma; font-size: 12px; line-height: 18px; ">&nbsp;</span><span  style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span  style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span  style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><strong style="font-weight: bold; ">好处：</strong></span><span  style="font-family: Tahoma; font-size: 12px; line-height: 18px; ">&nbsp;</span><span  style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span  style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span  style="font-family: Tahoma; font-size: 12px; line-height: 18px; ">实现以后，基本上后台开发就会很稳定很稳定了，大部分的工作只是前端做页面。可以大幅度的降低开发成本，提高开发进度。</span><span  style="font-family: Tahoma; font-size: 12px; line-height: 18px; ">&nbsp;</span><span  style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span  style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span  style="font-family: Tahoma; font-size: 12px; line-height: 18px; ">上面的实现是以上传文件来定义和管理sql，也可以通过数据库来管理。这样管理起来更加简单。</span><span  style="font-family: Tahoma; font-size: 12px; line-height: 18px; ">&nbsp;</span><span  style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span  style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span  style="font-family: Tahoma; font-size: 12px; line-height: 18px; ">如果使用guzz作为动态SQL提供者，可以自动获得命名查询，类型自动匹配（转成枚举类型都可以），分库，自动分切表，自定义属性表等附加支持。</span><span  style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span  style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span  style="font-family: Tahoma; font-size: 12px; line-height: 18px; ">啧啧～～</span><span  style="font-family: Tahoma; font-size: 12px; line-height: 18px; ">&nbsp;</span><span  style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span>
<div><span  style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br />
</span></div>
<img src ="http://www.blogjava.net/darkbluefeeling/aggbug/322032.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/darkbluefeeling/" target="_blank">深蓝色心情</a> 2010-05-27 14:52 <a href="http://www.blogjava.net/darkbluefeeling/archive/2010/05/27/322032.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>guzz1.2.8 beta2发布--支持动态加载在线调试SQL</title><link>http://www.blogjava.net/darkbluefeeling/archive/2010/05/26/321888.html</link><dc:creator>深蓝色心情</dc:creator><author>深蓝色心情</author><pubDate>Wed, 26 May 2010 02:13:00 GMT</pubDate><guid>http://www.blogjava.net/darkbluefeeling/archive/2010/05/26/321888.html</guid><wfw:comment>http://www.blogjava.net/darkbluefeeling/comments/321888.html</wfw:comment><comments>http://www.blogjava.net/darkbluefeeling/archive/2010/05/26/321888.html#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://www.blogjava.net/darkbluefeeling/comments/commentRss/321888.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/darkbluefeeling/services/trackbacks/321888.html</trackback:ping><description><![CDATA[<br />
<span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">guzz是一套用来解决ORM、多数据源管理、以及通用数据计算的数据层框架，为系统在数据层的设计提供一站式解决方案。guzz可以看作是 ibatis/hibernate的一大的延伸，并可以取代这2个东西。</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">&nbsp;</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><strong style="font-weight: bold; ">guzz主要功能与特点：</strong></span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">&nbsp;</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span>
<ul style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">
    <li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">现代大规模系统设计，技术上吸收了ibatis/hibernate的优点</li>
    <li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">支持像hibernate一样的对象化持久、映射和方便的增删改查</li>
    <li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">支持像ibatis一样，让dba参与sql设计的复杂数据库操作和优化</li>
    <li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">支持在线加载与调试SQL。按照应用策略，从文件/数据库/Web Service等途径，动态提取与使用SQL语句（Dynamic SQL）</li>
    <li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">支持应用程序使用大量的数据库和主从读写分离</li>
    <li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">支持超越范式的特殊关联、非结构化数据等异构资源的统一管理</li>
    <li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">支持数据表在多组机器间水平分布（Shard），并自动维护多组机器之间的分布式事务</li>
    <li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">支持1张表按照业务规则分切成多张小表（Shadow），并支持每张小表拥有自己特殊的属性字段（Custom）</li>
    <li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">支持组件化服务（SOA），构建企业/项目实施基础平台</li>
    <li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">提供面向对象的数据库读取标签(JSP Taglib)，加快页面展示层的快速变更、开发与部署</li>
    <li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">支持配置管理服务器，可以使用一套软件系统对所有应用程序的配置进行统一管理</li>
</ul>
<span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><strong style="font-weight: bold; ">项目地址：</strong></span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><a href="http://code.google.com/p/guzz/" target="_blank" style="color: #006699; text-decoration: underline; ">http://code.google.com/p/guzz/</a></span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">&nbsp;</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><strong style="font-weight: bold; ">文档：</strong></span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><a href="http://code.google.com/p/guzz/wiki/WikiHomePage?tm=6" target="_blank" style="color: #006699; text-decoration: underline; ">http://code.google.com/p/guzz/wiki/WikiHomePage?tm=6</a></span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">&nbsp;</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><span style="font-size: large; "><strong style="font-weight: bold; ">1.2.8 beta2更新介绍：</strong></span></span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">&nbsp;</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><strong style="font-weight: bold; ">支持动态管理SQL：&nbsp;</strong></span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">动态SQL（Dynamic SQL）不是指应用程序动态的拼接SQL语句，动态SQL是指应用程序可以动态的获取配置好的SQL语句。在获取的过程中，SQL语句如何管理，由应用系统自身决定。</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">&nbsp;</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">换句话说，在ibatis中，SQL语句配置到ibatis.xml文件中，在guzz中，配置到guzz.xml中。但当配置完成后，在系统运行期间这些SQL都是不能变动的，如果需要添加1个或者修改优化1个SQL语句，必须重启应用才能生效。而动态SQL允许应用系统动态的管理（添加/修改/优化/删除）sql语句以及查询结果到对象的映射关系（ORM），对于SQL的变更不再需要重启应用系统，以简化维护与应对需求变化。</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">&nbsp;</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">动态SQL主要有两种应用场景：SQL优化和动态数据源。具体介绍请参看：</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><a href="http://code.google.com/p/guzz/wiki/TutorialDynamicSQLService" target="_blank" style="color: #006699; text-decoration: underline; ">http://code.google.com/p/guzz/wiki/TutorialDynamicSQLService</a></span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">&nbsp;</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><strong style="font-weight: bold; ">改进远程服务设计：</strong></span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">&nbsp;</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">增加对hessian, burlap协议的支持。目前guzz内置支持phprpc, hessian, burlap三种协议进行RPC远程调用。使用时，三种协议可以透明替换，类似spring对RMI类协议的封装。具体介绍请参看：</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><a href="http://code.google.com/p/guzz/wiki/TutorialFutureService" target="_blank" style="color: #006699; text-decoration: underline; ">http://code.google.com/p/guzz/wiki/TutorialFutureService</a></span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">&nbsp;</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><strong style="font-weight: bold; ">增加枚举类型与类型参数化支持：</strong></span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">&nbsp;</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">按照TopLink的模式，支持JDK5 enum。Enum在使用时和普通类型一样，不需要实现特殊的接口（hibernate要求实现接口）。Enum支持通过JPA的Enumeration注释声明，也支持在hbm.xml中通过xml定义。通过xml的定义方式参看：</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><a href="http://code.google.com/p/guzz/wiki/TutorialHbmXml" target="_blank" style="color: #006699; text-decoration: underline; ">http://code.google.com/p/guzz/wiki/TutorialHbmXml</a></span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">&nbsp;</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">类型参数化为guzz的特殊功能，用于处理动态SQL参数和Jsp Taglib条件参数时，将String类型自动转换成需要的数据类型。参数化类型主要为日期和枚举。详细介绍：</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><a href="http://code.google.com/p/guzz/wiki/TutorialHbmXml" target="_blank" style="color: #006699; text-decoration: underline; ">http://code.google.com/p/guzz/wiki/TutorialHbmXml</a></span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">&nbsp;</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><strong style="font-weight: bold; ">增加对数据库保留字的支持：</strong></span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">&nbsp;</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">在定义数据库列名时，可以用`（ESC下面的键）将列名引起来，避免字段名称与数据库保留字冲突。此功能与hibernate提供的处理保留字方法相同，但guzz只支持字段，不支持`表名`。</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">&nbsp;</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><strong style="font-weight: bold; ">增加对Microsoft SQL Server的支持(未测试)：</strong></span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">&nbsp;</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">参考hibernate实现了一个SQL Server 2000 &amp; 2005的dialect，不支持分页。没有测试过。Dialect实现类：org.guzz.dialect.MSSQLDialect</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">&nbsp;</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">Guzz已经能够支持的数据库和数据类型请参看：</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">&nbsp;</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><a href="http://code.google.com/p/guzz/wiki/TutorialGuzzXml" target="_blank" style="color: #006699; text-decoration: underline; ">http://code.google.com/p/guzz/wiki/TutorialGuzzXml</a></span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">&nbsp;</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><span style="font-size: large; "><strong style="font-weight: bold; ">应用示例说明：</strong></span></span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">&nbsp;</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><a href="http://code.google.com/p/guzz/wiki/TutorialDynamicSQLService" target="_blank" style="color: #006699; text-decoration: underline; ">http://code.google.com/p/guzz/wiki/TutorialDynamicSQLService</a></span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">&nbsp;</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><span style="font-size: large; "><strong style="font-weight: bold; ">下一版本计划：</strong></span></span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">&nbsp;</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br />
</span>
<ul style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">
    <li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">修复发现的bug。</li>
    <li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">设计一些常见的服务，推广guzz基础服务理念。</li>
    <li></li>
</ul>
<img src ="http://www.blogjava.net/darkbluefeeling/aggbug/321888.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/darkbluefeeling/" target="_blank">深蓝色心情</a> 2010-05-26 10:13 <a href="http://www.blogjava.net/darkbluefeeling/archive/2010/05/26/321888.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>guzz1.2.8 beta1发布--支持annotation</title><link>http://www.blogjava.net/darkbluefeeling/archive/2010/05/05/320099.html</link><dc:creator>深蓝色心情</dc:creator><author>深蓝色心情</author><pubDate>Wed, 05 May 2010 02:36:00 GMT</pubDate><guid>http://www.blogjava.net/darkbluefeeling/archive/2010/05/05/320099.html</guid><wfw:comment>http://www.blogjava.net/darkbluefeeling/comments/320099.html</wfw:comment><comments>http://www.blogjava.net/darkbluefeeling/archive/2010/05/05/320099.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/darkbluefeeling/comments/commentRss/320099.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/darkbluefeeling/services/trackbacks/320099.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: guzz是一套用来解决ORM、多数据源管理、以及通用数据计算的数据层框架，为系统在数据层的设计提供一站式解决方案。guzz可以看作是 ibatis/hibernate的一大的延伸，并可以取代这2个东西。&nbsp;guzz主要功能与特点：&nbsp;    现代大规模系统设计，技术上吸收了ibatis/hibernate的优点    支持像hibernate一样的对象化持久...&nbsp;&nbsp;<a href='http://www.blogjava.net/darkbluefeeling/archive/2010/05/05/320099.html'>阅读全文</a><img src ="http://www.blogjava.net/darkbluefeeling/aggbug/320099.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/darkbluefeeling/" target="_blank">深蓝色心情</a> 2010-05-05 10:36 <a href="http://www.blogjava.net/darkbluefeeling/archive/2010/05/05/320099.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title> guzz1.2.7正式版发布，支持表分切和动态表字段</title><link>http://www.blogjava.net/darkbluefeeling/archive/2010/04/09/317850.html</link><dc:creator>深蓝色心情</dc:creator><author>深蓝色心情</author><pubDate>Fri, 09 Apr 2010 06:55:00 GMT</pubDate><guid>http://www.blogjava.net/darkbluefeeling/archive/2010/04/09/317850.html</guid><wfw:comment>http://www.blogjava.net/darkbluefeeling/comments/317850.html</wfw:comment><comments>http://www.blogjava.net/darkbluefeeling/archive/2010/04/09/317850.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.blogjava.net/darkbluefeeling/comments/commentRss/317850.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/darkbluefeeling/services/trackbacks/317850.html</trackback:ping><description><![CDATA[<div id="news_content" style="font-size: 14px; line-height: 1.8em; font-family: Arial, sans-serif, Helvetica, Tahoma; ">guzz是一套用来解决ORM、多数据源管理、以及通用数据计算的数据层框架，为系统在数据层的设计提供一站式解决方案。guzz可以看作是 ibatis/hibernate的一大的延伸，并可以取代这2个东西。&nbsp;<br />
<br />
<strong style="font-weight: bold; ">guzz主要功能与特点：</strong>&nbsp;<br />
<ul style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">
    <li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">现代大规模系统设计，技术上吸收了ibatis/hibernate的优点</li>
    <li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">支持像hibernate一样的对象化持久、映射和方便的增删改查</li>
    <li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">支持像ibatis一样，让dba参与sql设计的复杂数据库操作和优化</li>
    <li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">支持应用程序使用大量的数据库和主从读写分离</li>
    <li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">支持超越范式的特殊关联、非结构化数据等异构资源的统一管理</li>
    <li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">支持数据表在多组机器间水平分布（Shard），并自动维护多组机器之间的分布式事务</li>
    <li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">支持1张表按照业务规则分切成多张小表（Shadow），并支持每张小表拥有自己特殊的属性字段（Custom）</li>
    <li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">支持组件化服务（SOA），构建企业/项目实施基础平台</li>
    <li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">提供面向对象的数据库读取标签(JSP Taglib)，加快页面展示层的快速变更、开发与部署</li>
    <li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">支持配置管理服务器，可以使用一套软件系统对所有应用程序的配置进行统一管理</li>
</ul>
<strong style="font-weight: bold; ">项目地址：</strong><a href="http://code.google.com/p/guzz/" target="_blank" style="color: #006699; text-decoration: underline; ">http://code.google.com/p/guzz/</a>&nbsp;<br />
<strong style="font-weight: bold; ">文档：</strong><a href="http://www.guzz.org/wiki/GuzzGuide" target="_blank" style="color: #006699; text-decoration: underline; ">http://www.guzz.org/wiki/GuzzGuide</a>&nbsp;<br />
<br />
<span style="font-size: large; "><strong style="font-weight: bold; ">1.2.7正式版 更新介绍：</strong></span>&nbsp;<br />
<br />
<ul style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">
    <li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><strong style="font-weight: bold; ">支持表分切</strong>。允许同一对象按照业务规则，分别存储在不同的表中。如新闻评论：新闻频道的评论存放在 tb_c1，娱乐：tb_c2，体育tb_c3，其他：tb_c4，满足同类在线数据的数据表平行扩展需要。表分切命名为：Shadow Table。</li>
    <br />
    <li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><strong style="font-weight: bold; ">支持自定义属性表</strong>。允许分切后的每张小表拥有自己的动态对象属性和字段。如购物网站中：商品对象拥有统一的名称、价格、编号、评分等，但不同的商品可能有自己特殊的属性，如图书拥有ISBN和出版社作者，服装拥有尺码、颜色、款式等等。自定义属性允许程序只定义1个商品域对象，然后通过自定义属性和切表，将每1种特定的商品分切到1张自己特殊的表中，这张表同时拥有商品通用的字段以及这种商品自己的字段，查询时可以按照特殊字段直接在数据库中进行关系查询。在guzz中，自定义属性的定义允许存储到数据库中，像普通对象一样动态生成和管理，不用配置复杂的xml。自定义属性命名为：Custom Table。</li>
    <br />
    <li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><strong style="font-weight: bold; ">增加并行任务支持</strong>。用于多个远程服务同步的调用，降低等待时间。</li>
    <br />
    <li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><strong style="font-weight: bold; ">增加hilo和seqhilo主健生成策略</strong>。至此，hibernate支持的常见主健生成策略，guzz都支持了。</li>
    <br />
    <li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><strong style="font-weight: bold; ">增加外挂环境接口</strong>。如果在spring中启动，允许在guzz中获取spring定义的bean。</li>
</ul>
<span style="font-size: large; "><strong style="font-weight: bold; ">应用示例说明：</strong></span>&nbsp;<br />
<br />
本次更新有很多新概念需要介绍，因此篇幅较长。详细的示例和说明请参看：&nbsp;<br />
<br />
表分切：<a href="http://www.guzz.org/wiki/GuzzShadow" target="_blank" style="color: #006699; text-decoration: underline; ">http://www.guzz.org/wiki/GuzzShadow</a>&nbsp;<br />
<br />
自定义属性表（基于表分切）：[url]http://www.guzz.org/wiki/GuzzCustomTable [/url]&nbsp;<br />
<br />
并行任务执行（基于服务）：<a href="http://www.guzz.org/wiki/GuzzFutureService" target="_blank" style="color: #006699; text-decoration: underline; ">http://www.guzz.org/wiki/GuzzFutureService</a>&nbsp;<br />
<br />
主健生成策略：<a href="http://www.guzz.org/wiki/GuzzHbm" target="_blank" style="color: #006699; text-decoration: underline; ">http://www.guzz.org/wiki/GuzzHbm</a>&nbsp;<br />
<br />
<span style="font-size: large; "><strong style="font-weight: bold; ">下一版本计划：</strong></span>&nbsp;<br />
<br />
<ul style="margin-top: 0px; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">
    <li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><strong style="font-weight: bold; ">数据库自动分库支持</strong>。允许同一张表，分散在多台数据库中。</li>
    <li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">提供更多对服务的支持。</li>
    <li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">探索<strong style="font-weight: bold; ">SASS</strong>（软件就是服务）的数据层模型。</li>
    <li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.25em; margin-left: 30px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><strong style="font-weight: bold; ">其他</strong>。</li>
</ul>
</div>
<div id="news_recommended_n2" style="padding-top: 5px; padding-right: 5px; padding-bottom: 5px; padding-left: 5px; font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; "><ins style="display: inline-table; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; height: 60px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; position: relative; visibility: visible; width: 468px; "></ins></div>
<img src ="http://www.blogjava.net/darkbluefeeling/aggbug/317850.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/darkbluefeeling/" target="_blank">深蓝色心情</a> 2010-04-09 14:55 <a href="http://www.blogjava.net/darkbluefeeling/archive/2010/04/09/317850.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>guzz使用效果和经验技巧分享</title><link>http://www.blogjava.net/darkbluefeeling/archive/2010/04/09/317849.html</link><dc:creator>深蓝色心情</dc:creator><author>深蓝色心情</author><pubDate>Fri, 09 Apr 2010 06:52:00 GMT</pubDate><guid>http://www.blogjava.net/darkbluefeeling/archive/2010/04/09/317849.html</guid><wfw:comment>http://www.blogjava.net/darkbluefeeling/comments/317849.html</wfw:comment><comments>http://www.blogjava.net/darkbluefeeling/archive/2010/04/09/317849.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/darkbluefeeling/comments/commentRss/317849.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/darkbluefeeling/services/trackbacks/317849.html</trackback:ping><description><![CDATA[<span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; ">我们主要是web应用，web规模也不能确定，有可能一天几千万甚至上亿的PV，也有可能根本没人用。最初设计guzz的目的就是让大型网站和小型网站一样设计编写，因为谁也不知道这个应用上去以后有多少人用，同时解决系统被要求页面天天改来该去的问题。</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; ">&nbsp;</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; "><strong style="font-weight: bold; ">使用guzz以来的效果：</strong></span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; ">&nbsp;</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; ">1. 框架性能上没有看得出的快慢区别。我觉得不会比hibernate和biatis慢，我看过他们的一些代码，流程挺复杂的。guzz很简单，整个持久化过程需要转手的类至少要比这两个少很多。</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; ">&nbsp;</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; ">2. 以前我们用hibernate较多，一般数据库设计就是一个库，读写全部做。现在在设计时大家脑子里面直接就是分出3个数据库（可能部署在1台mysql上）--业务主库，临时信息库，日志库，然后把表分到不同的库中。然后数据库安装时直接主从安装，主从使用。虽然看起来库复杂了，但程序上没有任何成本代价，基本上已经形成一种设计流程。这种模式感觉可以作为最佳实践。</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; ">&nbsp;</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; ">3. 编程上，一开始开发人员还是建个spring action类 + 在dao和manager中增加需要的方法 + 修改dispatcher-servlet.xml配置映射 + jsp实现view。但现在很多功能都是直接jsp，用taglib直接读库，基本上后台的读数据库操作页面已经看不到action的影子了。java代码比先前的工程，同样的功能少了大概60%-70%。</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; ">&nbsp;</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; ">4. 我们的系统一般后台功能比较复杂，以往编辑要改点东西大家都很郁闷。不过现在抵制少了很多，基本上就是改改jsp或者在复制1个新的jsp改改，然后传到服务器上，一大堆集群机器的重启工作都免了，无论是开发还是部署都很省事。和php差不多。</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; ">&nbsp;</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; "><strong style="font-weight: bold; ">guzz1.2.7分表和自定义表的应用实例：</strong></span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; ">&nbsp;</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; ">我们有1套调查系统，使用了这项技术，也是第一个线上测试。每个调查都不太一样，需要网友填一些东西，需要填什么，填的个数类型都不定。一个调查进行过程中，或者结束后要求对数据进行统计报表。统计的内容可能也包括那些自定义的填空题。</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; ">&nbsp;</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; ">在1.2.7之前，我们解决方案是：将所有自定义的调查项，按照key-value生成一个xml字符串，存储到数据库大字段中(Mysql text字段)。需要统计时，根据mysql5.1对xml支持的新特性使用ExtraValue函数解析这个xml生成一个新表（create table xxxx select ExtraValue(xx) as a, .....from 主调查记录表），然后在根据新的xxxx表统计。每次都要手工来弄，非常繁琐。</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; ">&nbsp;</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; ">1.2.7，使用切表和自定义属性后，现在的解决方案：每次创建投票并建立好自定义调查项（自定义调查项存储在数据库中），根据这些自动生成一个mysql create table的语句，创建好需要的表。在配置CustomTableView动态的映射用户提交的数据存储到对应的表中。完全自动，后续处理简化了很多。</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; ">&nbsp;</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; ">而且由于整个过程是实时的，以前的过程是手工的，所以很多线上的报表功能也可以开发了。开发也非常简单，我们用guzz jsp tablib直接读库，像操作普通java属性一样操作自定义属性，一个类型的表报1个jsp。特殊调查的特殊报表也就是往服务器上放1个特殊处理的jsp，应用都不用重启，非常方便。</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; ">&nbsp;</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; "><strong style="font-weight: bold; ">guzz1.2.7分表和自定义表的下一个应用计划：</strong></span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; ">&nbsp;</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; ">这是一个计划，还没有做，不过我们准备很快就开始做。</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; ">&nbsp;</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; ">我们的所有系统对日志都有要求，日志必须记录！但日志的开发很烦人，全是没有技术含量的重复工作。我们准备开发一个日志服务，所有系统以后就不用开发日志了，直接使用这个服务。日志服务分为服务器端和客户端。</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; ">&nbsp;</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; ">服务器端：</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; ">&nbsp;</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; ">一个标准的java web系统，有日志数据库，用来存储所有系统的日志信息，并提供查询和统计等界面。如果有人需要查日志，就到这个系统来查。</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; ">&nbsp;</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; ">服务器端有1个应用数据库，用来创建和管理授权的应用系统。1个新的应用上线的时候，在这里创建一个应用和他的授权码，然后录入他的个性日志字段和数据类型（类似上面提到调查的个性选项），服务器自动在数据库中给他创建1个日志表，用来存储这个应用的日志数据。我们准备按季度分表，让每个日志表1个季度分成1张子表。</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; ">&nbsp;</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; ">客户端：</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; ">&nbsp;</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; ">实现一个标准的guzz service，提供日志插入接口</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; ">&nbsp;</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; "><br />
</span>
<div class="dp-highlighter" style="font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', Consolas, 'Courier New', monospace; font-size: 12px; background-color: transparent; width: 694px; overflow-x: auto; overflow-y: auto; margin-left: 9px; padding-top: 1px; padding-right: 1px; padding-bottom: 1px; padding-left: 1px; word-break: break-all; word-wrap: break-word; line-height: 18px; ">
<div class="bar">
<div class="tools" style="padding-top: 3px; padding-right: 3px; padding-bottom: 3px; padding-left: 3px; text-align: left; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: black; font-weight: bold; ">Java代码&nbsp;<embed src="http://guzz.javaeye.com/javascripts/syntaxhighlighter/clipboard_new.swf" width="14" height="15" flashvars="clipboard=public%20void%20log(UserLog%20log)%20%3B%0A" quality="high" allowscriptaccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></div>
</div>
<ol start="1" class="dp-j" style="font-size: 1em; line-height: 1.4em; margin-top: 0px; margin-right: 0px; margin-bottom: 1px; margin-left: 0px; padding-top: 2px; padding-right: 0px; padding-bottom: 2px; padding-left: 0px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: #d1d7dc; border-right-color: #d1d7dc; border-bottom-color: #d1d7dc; border-left-color: #d1d7dc; list-style-type: decimal; list-style-position: initial; list-style-image: initial; background-color: #ffffff; color: #2b91af; ">
    <li style="font-size: 1em; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 38px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 10px; border-left-width: 1px; border-left-style: solid; border-left-color: #d1d7dc; background-color: #fafafa; line-height: 18px; "><span style="color: black; "><span class="keyword" style="color: #7f0055; font-weight: bold; ">public</span><span style="color: black; ">&nbsp;</span><span class="keyword" style="color: #7f0055; font-weight: bold; ">void</span><span style="color: black; ">&nbsp;log(UserLog&nbsp;log)&nbsp;;&nbsp;&nbsp;</span></span></li>
</ol>
</div>
<span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; ">每个系统开发时，将日志服务的jar包放到工程中，并在guzz.xml中声明此服务，代码直接调用就OK了。</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; ">&nbsp;</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; ">这样以后就不用为每个系统开发日志管理模块了。并且还能获取到统计某一个用户在所有系统中活动记录的额外增强（例如我们可以在服务器端将日志记录两份，一份按应用系统，一份按操做者记录）～～</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; ">&nbsp;</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; "><br />
</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; "><br />
</span>
<img src ="http://www.blogjava.net/darkbluefeeling/aggbug/317849.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/darkbluefeeling/" target="_blank">深蓝色心情</a> 2010-04-09 14:52 <a href="http://www.blogjava.net/darkbluefeeling/archive/2010/04/09/317849.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Hibernate入门 - 基础配置</title><link>http://www.blogjava.net/darkbluefeeling/archive/2005/12/02/22218.html</link><dc:creator>深蓝色心情</dc:creator><author>深蓝色心情</author><pubDate>Fri, 02 Dec 2005 03:48:00 GMT</pubDate><guid>http://www.blogjava.net/darkbluefeeling/archive/2005/12/02/22218.html</guid><wfw:comment>http://www.blogjava.net/darkbluefeeling/comments/22218.html</wfw:comment><comments>http://www.blogjava.net/darkbluefeeling/archive/2005/12/02/22218.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/darkbluefeeling/comments/commentRss/22218.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/darkbluefeeling/services/trackbacks/22218.html</trackback:ping><description><![CDATA[<BR><BR>Hibernate配置文件可以有两种格式，一种是&nbsp;hibernate.properties&nbsp;，另一种是&nbsp;hibernate.cfg.xml&nbsp; <BR><BR>后者稍微方便一些，当增加hbm映射文件的时候，可以直接在&nbsp;hibernate.cfg.xml&nbsp;里面增加，不必像&nbsp;hibernate.properties&nbsp;必须在初始化代码中加入。 <BR><BR>但不管怎么说，两种的配置项都是一样的，下面详细介绍： <BR><BR>在Hibernate的src目录下有一个&nbsp;hibernate.properties&nbsp;模板，我们不必自己从头写，修改模板就可以了:) <BR><BR>
<DIV style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><SPAN style="COLOR: #000000">hibernate.query.substitutions&nbsp;true&nbsp;1,&nbsp;false&nbsp;0,&nbsp;yes&nbsp;'Y',&nbsp;no&nbsp;'N'&nbsp;<BR></SPAN></DIV><BR><BR>这个配置意思是当你在Hibernate里面输入true的时候，Hibernate会转化为1插入数据库，当你在Hibernate里面输入false的时候，Hibernate会转化为0插入数据库，后面的Y，N同理。 <BR><BR>对于某些数据库，例如Oracle来说，没有boolean数据类型，就是采用1代表true，0代表false，因此使用这个配置在Hibernate里面直接用true/false会非常直观。 <BR><BR>
<DIV style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><SPAN style="COLOR: #008080">1</SPAN><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #000000">hibernate.dialect&nbsp;net.sf.hibernate.dialect.MySQLDialect&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">2</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>hibernate.connection.driver_class&nbsp;com.mysql.jdbc.Driver&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">3</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>hibernate.connection.url&nbsp;jdbc:mysql:///test&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">4</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>hibernate.connection.username&nbsp;root&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">5</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>hibernate.connection.password&nbsp;&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">6</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN></DIV><BR><BR>这是一个连接MySQL数据库的例子，很直观，不必解释，不同的数据库的连接参数模板中全部给出了。 <BR><BR><BR>hibernate.connection.pool_size&nbsp;1 <BR>hibernate.statement_cache.size&nbsp;25 <BR><BR>这是Hibernate自带的连接池的配置参数，在默认情况下将采用。意义很直观，不多解释。 <BR><BR>只是提醒一点，Hibernate这个连接池是非常原始非常简单的连接池，如果你在项目中用Hibernate的话，建议你首选App&nbsp;Server的连接池，次选Hibernate带的DBCP连接池。自带的连接池应该做为末选。 <BR><BR>如果你采用DBCP连接池，除了要配置DBCP连接池以外，还需要取消掉下行的注释： <BR><BR>hibernate.connection.provider_class&nbsp;net.sf.hibernate.connection.DBCPConnectionProvider <BR><BR>其它的连接池同理。 <BR><BR>如果采用App&nbsp;Server的连接池，假设App&nbsp;Server连接池的DataSource的JNDI名称为"mypool"的话，配置应该如下： <BR><BR>hibernate.dialect&nbsp;net.sf.hibernate.dialect.MySQLDialect <BR>hibernate.connection.datasource&nbsp;mypool <BR>hibernate.connection.provider_class&nbsp;net.sf.hibernate.connection.DatasourceConnectionProvider <BR><BR>其它参数就不必写了，因为已经在App&nbsp;Server配置连接池的时候指定好了。 <BR><BR>如果你不是在App&nbsp;Server环境中使用Hibernate，例如远程客户端程序，但是你又想用App&nbsp;Server的数据库连接池，那么你还需要配置JNDI的参数，例如Hibernate连接远程Weblogic上的数据库连接池： <BR><BR>hibernate.dialect&nbsp;net.sf.hibernate.dialect.MySQLDialect <BR>hibernate.connection.datasource&nbsp;mypool <BR>hibernate.connection.provider_class&nbsp;net.sf.hibernate.connection.DatasourceConnectionProvider <BR>hibernate.jndi.class&nbsp;weblogic.jndi.WLInitialContextFactory <BR>hibernate.jndi.url&nbsp;t3://servername:7001/ <BR><BR><BR>最后，如果你需要在EJB或者JTA中使用Hibernate，需要取消下行的注释： <BR><BR>hibernate.transaction.factory_class&nbsp;net.sf.hibernate.transaction.JTATransactionFactory <BR><BR>杂项配置： <BR><BR><BR>hibernate.show_sql&nbsp;false <BR><BR>是否将Hibernate发送给数据库的sql显示出来，这是一个非常非常有用处的功能。当你在调试Hibernate的时候，让Hibernate打印sql语句，可以帮助你迅速解决问题。 <BR><BR><BR>#hibernate.connection.isolation&nbsp;4 <BR><BR>指定数据库的隔离级别，往往不同的数据库有自己定义的隔离级别，未必是Hibernate的设置所能更改的，所以也不必去管它了。 <BR><BR>
<DIV style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #000000">hibernate.jdbc.fetch_size&nbsp;50&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>hibernate.jdbc.batch_size&nbsp;25&nbsp;</SPAN></DIV><BR><BR>这两个选项非常非常非常重要！！！将严重影响Hibernate的CRUD性能! <BR><BR>C&nbsp;=&nbsp;create,&nbsp;R&nbsp;=&nbsp;read,&nbsp;U&nbsp;=&nbsp;update,&nbsp;D&nbsp;=&nbsp;delete <BR><BR>Fetch&nbsp;Size&nbsp;是设定JDBC的Statement读取数据的时候每次从数据库中取出的记录条数。 <BR><BR>例如一次查询1万条记录，对于Oracle的JDBC驱动来说，是不会1次性把1万条取出来的，而只会取出Fetch&nbsp;Size条数，当纪录集遍历完了这些记录以后，再去数据库取Fetch&nbsp;Size条数据。 <BR><BR>因此大大节省了无谓的内存消耗。当然Fetch&nbsp;Size设的越大，读数据库的次数越少，速度越快；Fetch&nbsp;Size越小，读数据库的次数越多，速度越慢。 <BR><BR>这有点像平时我们写程序写硬盘文件一样，设立一个Buffer，每次写入Buffer，等Buffer满了以后，一次写入硬盘，道理相同。 <BR><BR>Oracle数据库的JDBC驱动默认的Fetch&nbsp;Size=10，是一个非常保守的设定，根据我的测试，当Fetch&nbsp;Size=50的时候，性能会提升1倍之多，当Fetch&nbsp;Size=100，性能还能继续提升20%，Fetch&nbsp;Size继续增大，性能提升的就不显著了。 <BR><BR>因此我建议使用Oracle的一定要将Fetch&nbsp;Size设到50。 <BR><BR>不过并不是所有的数据库都支持Fetch&nbsp;Size特性，例如MySQL就不支持。 <BR><BR>MySQL就像我上面说的那种最坏的情况，他总是一下就把1万条记录完全取出来，内存消耗会非常非常惊人！这个情况就没有什么好办法了&nbsp;:( <BR><BR>Batch&nbsp;Size是设定对数据库进行批量删除，批量更新和批量插入的时候的批次大小，有点相当于设置Buffer缓冲区大小的意思。 <BR><BR>Batch&nbsp;Size越大，批量操作的向数据库发送sql的次数越少，速度就越快。我做的一个测试结果是当Batch&nbsp;Size=0的时候，使用Hibernate对Oracle数据库删除1万条记录需要25秒，Batch&nbsp;Size&nbsp;=&nbsp;50的时候，删除仅仅需要5秒！！！ <BR><BR>可见有多么大的性能提升！很多人做Hibernate和JDBC的插入性能测试会奇怪的发现Hibernate速度至少是JDBC的两倍，就是因为Hibernate使用了Batch&nbsp;Insert，而他们写的JDBC没有使用Batch的缘故。 <BR><BR>以我的经验来看，Oracle数据库&nbsp;Batch&nbsp;Size&nbsp;=&nbsp;30&nbsp;的时候比较合适，50也不错，性能会继续提升，50以上，性能提升的非常微弱，反而消耗内存更加多，就没有必要了。 <BR><BR><BR>#hibernate.jdbc.use_scrollable_resultset&nbsp;true <BR><BR>设定是否可以使用JDBC2.0规范的可滚动结果集，这对Hibernate的分页显示有一定的作用，默认就好了。 <BR><BR>
<DIV style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #000000">#hibernate.cglib.use_reflection_optimizer&nbsp;false&nbsp;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN></DIV><BR><BR>默认打开，启用cglib反射优化。cglib是用来在Hibernate中动态生成PO字节码的，打开优化可以加快字节码构造的速度。 <BR><BR>不过，当你在调试程序过程中，特别是和proxy，lazy&nbsp;loading相关的应用中，代码出错，但是出错提示信息有语焉不详，那么你可以把cglib优化关掉，这样Hibernate会输出比较详细的调试信息，帮助你debug。 <BR><img src ="http://www.blogjava.net/darkbluefeeling/aggbug/22218.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/darkbluefeeling/" target="_blank">深蓝色心情</a> 2005-12-02 11:48 <a href="http://www.blogjava.net/darkbluefeeling/archive/2005/12/02/22218.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>spring+hibernate+oracle9i用clob</title><link>http://www.blogjava.net/darkbluefeeling/archive/2005/11/18/20387.html</link><dc:creator>深蓝色心情</dc:creator><author>深蓝色心情</author><pubDate>Fri, 18 Nov 2005 02:42:00 GMT</pubDate><guid>http://www.blogjava.net/darkbluefeeling/archive/2005/11/18/20387.html</guid><wfw:comment>http://www.blogjava.net/darkbluefeeling/comments/20387.html</wfw:comment><comments>http://www.blogjava.net/darkbluefeeling/archive/2005/11/18/20387.html#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://www.blogjava.net/darkbluefeeling/comments/commentRss/20387.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/darkbluefeeling/services/trackbacks/20387.html</trackback:ping><description><![CDATA[<FONT size=2>&nbsp;</FONT> 
<DIV>
<DIV>数据库驱动更新为classes12-9i.jar<BR>修改hibernate的配置如下<BR></DIV>
<TABLE cellSpacing=1 cellPadding=3 width="95%" align=center border=0>
<TBODY>
<TR>
<TD><B>代码</B> </TD></TR>
<TR>
<TD>
<DIV style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">bean&nbsp;</SPAN><SPAN style="COLOR: #ff0000">id</SPAN><SPAN style="COLOR: #0000ff">="nativeJdbcExtractor"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;class</SPAN><SPAN style="COLOR: #0000ff">="org.springframework.jdbc.support.nativejdbc.SimpleNativeJdbcExtractor"</SPAN><SPAN style="COLOR: #0000ff">/&gt;</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">bean&nbsp;</SPAN><SPAN style="COLOR: #ff0000">id</SPAN><SPAN style="COLOR: #0000ff">="oracleLobHandle"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;class</SPAN><SPAN style="COLOR: #0000ff">="org.springframework.jdbc.support.lob.OracleLobHandler"</SPAN><SPAN style="COLOR: #ff0000">&nbsp;Lazy-init</SPAN><SPAN style="COLOR: #0000ff">="true"</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">property&nbsp;</SPAN><SPAN style="COLOR: #ff0000">name</SPAN><SPAN style="COLOR: #0000ff">="nativeJdbcExtractor"</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">ref&nbsp;</SPAN><SPAN style="COLOR: #ff0000">local</SPAN><SPAN style="COLOR: #0000ff">="nativejdbcExtractor"</SPAN><SPAN style="COLOR: #0000ff">/&gt;</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;</SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">property</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">&lt;/</SPAN><SPAN style="COLOR: #800000">bean</SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN></DIV></TD></TR></TBODY></TABLE>
<DIV><BR><BR>在有clob类型sessionFactory(org.springframework.com<WBR>.hibernate.LocalSessionFractory<WBR>Bean)中加入<BR>&lt;property name="lobHandler"&gt;&lt;ref bean="oracleLobHandle"/&gt;&lt;<WBR>/property&gt;<BR><BR>在需要clob的JavaBean对应的hbm.xml中，改对应的clob类型的字段<BR><BR></DIV>
<TABLE cellSpacing=1 cellPadding=3 width="95%" align=center border=0>
<TBODY>
<TR>
<TD><B>代码</B> </TD></TR>
<TR>
<TD>
<DIV style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #0000ff">&lt;</SPAN><SPAN style="COLOR: #800000">property<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;</SPAN><SPAN style="COLOR: #ff0000">name</SPAN><SPAN style="COLOR: #0000ff">="<IMG src="http://www.blogjava.net/images/dot.gif">"</SPAN><SPAN style="COLOR: #ff0000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;type</SPAN><SPAN style="COLOR: #0000ff">="org.springframework.orm.hibernate.support.ClobStringType"</SPAN><SPAN style="COLOR: #ff0000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;clumn</SPAN><SPAN style="COLOR: #0000ff">="<IMG src="http://www.blogjava.net/images/dot.gif">"</SPAN><SPAN style="COLOR: #ff0000"><BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>&nbsp;length</SPAN><SPAN style="COLOR: #0000ff">="XXXXXX" &lt;!--</SPAN><SPAN style="COLOR: #ff0000">定义clob字段大小(以字节为单位，最大2GB)--&gt;<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">&gt;</SPAN></DIV></TD></TR></TBODY></TABLE>
<DIV><BR>JavaBean的对应的属性类型为String<BR><BR>------------------------------------------------------------------------------<BR>----<SPAN style="FONT-SIZE: larger"><B>hibernate3 使用blob 和 clob 演例代码-----<BR><BR>
<DIV><FONT size=2>hibernate3 使用blob 和 clob 演例代码：<BR><BR>
<DIV style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><SPAN style="COLOR: #008080">&nbsp;1</SPAN><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #0000ff">import</SPAN><SPAN style="COLOR: #000000">&nbsp;java.io.File;<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;2</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">import</SPAN><SPAN style="COLOR: #000000">&nbsp;java.io.FileInputStream;<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;3</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">import</SPAN><SPAN style="COLOR: #000000">&nbsp;java.io.OutputStream;<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;4</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">import</SPAN><SPAN style="COLOR: #000000">&nbsp;java.io.Writer;<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;5</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">import</SPAN><SPAN style="COLOR: #000000">&nbsp;java.sql.Clob;<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;6</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">import</SPAN><SPAN style="COLOR: #000000">&nbsp;oracle.sql.CLOB;<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;7</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">import</SPAN><SPAN style="COLOR: #000000">&nbsp;org.hibernate.LockMode;<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;8</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">import</SPAN><SPAN style="COLOR: #000000">&nbsp;org.hibernate.Transaction;<BR></SPAN><SPAN style="COLOR: #008080">&nbsp;9</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">import</SPAN><SPAN style="COLOR: #000000">&nbsp;org.hibernate.Session;<BR></SPAN><SPAN style="COLOR: #008080">10</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">import</SPAN><SPAN style="COLOR: #000000">&nbsp;org.hibernate.Hibernate;<BR></SPAN><SPAN style="COLOR: #008080">11</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">import</SPAN><SPAN style="COLOR: #000000">&nbsp;org.hibernate.lob.SerializableBlob;<BR></SPAN><SPAN style="COLOR: #008080">12</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">import</SPAN><SPAN style="COLOR: #000000">&nbsp;org.hibernate.lob.SerializableClob;<BR></SPAN><SPAN style="COLOR: #008080">13</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><BR></SPAN><SPAN style="COLOR: #008080">14</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><BR></SPAN><SPAN style="COLOR: #008080">15</SPAN><SPAN style="COLOR: #000000"><IMG id=Codehighlighter1_385_2944_Open_Image onclick="this.style.display='none'; Codehighlighter1_385_2944_Open_Text.style.display='none'; Codehighlighter1_385_2944_Closed_Image.style.display='inline'; Codehighlighter1_385_2944_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockStart.gif" align=top><IMG id=Codehighlighter1_385_2944_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_385_2944_Closed_Text.style.display='none'; Codehighlighter1_385_2944_Open_Image.style.display='inline'; Codehighlighter1_385_2944_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedBlock.gif" align=top></SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">class</SPAN><SPAN style="COLOR: #000000">&nbsp;test1&nbsp;</SPAN><SPAN id=Codehighlighter1_385_2944_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.blogjava.net/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_385_2944_Open_Text><SPAN style="COLOR: #000000">{<BR></SPAN><SPAN style="COLOR: #008080">16</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top><BR></SPAN><SPAN style="COLOR: #008080">17</SPAN><SPAN style="COLOR: #000000"><IMG id=Codehighlighter1_396_433_Open_Image onclick="this.style.display='none'; Codehighlighter1_396_433_Open_Text.style.display='none'; Codehighlighter1_396_433_Closed_Image.style.display='inline'; Codehighlighter1_396_433_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_396_433_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_396_433_Closed_Text.style.display='none'; Codehighlighter1_396_433_Open_Image.style.display='inline'; Codehighlighter1_396_433_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN id=Codehighlighter1_396_433_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">/**&nbsp;*/</SPAN><SPAN id=Codehighlighter1_396_433_Open_Text><SPAN style="COLOR: #008000">/**</SPAN><SPAN style="COLOR: #008000"><BR></SPAN><SPAN style="COLOR: #008080">18</SPAN><SPAN style="COLOR: #008000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</SPAN><SPAN style="COLOR: #808080">@param</SPAN><SPAN style="COLOR: #008000">&nbsp;args<BR></SPAN><SPAN style="COLOR: #008080">19</SPAN><SPAN style="COLOR: #008000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #008000">*/</SPAN></SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">20</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">static</SPAN><SPAN style="COLOR: #000000">&nbsp;Session&nbsp;session&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;HibernateSessionFactory.currentSession();<BR></SPAN><SPAN style="COLOR: #008080">21</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">22</SPAN><SPAN style="COLOR: #000000"><IMG id=Codehighlighter1_560_2485_Open_Image onclick="this.style.display='none'; Codehighlighter1_560_2485_Open_Text.style.display='none'; Codehighlighter1_560_2485_Closed_Image.style.display='inline'; Codehighlighter1_560_2485_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_560_2485_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_560_2485_Closed_Text.style.display='none'; Codehighlighter1_560_2485_Open_Image.style.display='inline'; Codehighlighter1_560_2485_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">boolean</SPAN><SPAN style="COLOR: #000000">&nbsp;inserted(TStu&nbsp;obj)</SPAN><SPAN id=Codehighlighter1_560_2485_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.blogjava.net/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_560_2485_Open_Text><SPAN style="COLOR: #000000">{<BR></SPAN><SPAN style="COLOR: #008080">23</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">24</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Transaction&nbsp;tran&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;session.beginTransaction();<BR></SPAN><SPAN style="COLOR: #008080">25</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;session.save(obj);<BR></SPAN><SPAN style="COLOR: #008080">26</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;session.flush();<BR></SPAN><SPAN style="COLOR: #008080">27</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;session.refresh(obj,LockMode.UPGRADE);<BR></SPAN><SPAN style="COLOR: #008080">28</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">try</SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">29</SPAN><SPAN style="COLOR: #000000"><IMG id=Codehighlighter1_801_2312_Open_Image onclick="this.style.display='none'; Codehighlighter1_801_2312_Open_Text.style.display='none'; Codehighlighter1_801_2312_Closed_Image.style.display='inline'; Codehighlighter1_801_2312_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_801_2312_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_801_2312_Closed_Text.style.display='none'; Codehighlighter1_801_2312_Open_Image.style.display='inline'; Codehighlighter1_801_2312_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN id=Codehighlighter1_801_2312_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.blogjava.net/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_801_2312_Open_Text><SPAN style="COLOR: #000000">{<BR></SPAN><SPAN style="COLOR: #008080">30</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SerializableBlob&nbsp;sb&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;(SerializableBlob)obj.getImg();<BR></SPAN><SPAN style="COLOR: #008080">31</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;java.sql.Blob&nbsp;wrapblob&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;sb.getWrappedBlob();<BR></SPAN><SPAN style="COLOR: #008080">32</SPAN><SPAN style="COLOR: #000000"><IMG id=Codehighlighter1_990_1491_Open_Image onclick="this.style.display='none'; Codehighlighter1_990_1491_Open_Text.style.display='none'; Codehighlighter1_990_1491_Closed_Image.style.display='inline'; Codehighlighter1_990_1491_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_990_1491_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_990_1491_Closed_Text.style.display='none'; Codehighlighter1_990_1491_Open_Image.style.display='inline'; Codehighlighter1_990_1491_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">if</SPAN><SPAN style="COLOR: #000000">(wrapblob&nbsp;</SPAN><SPAN style="COLOR: #0000ff">instanceof</SPAN><SPAN style="COLOR: #000000">&nbsp;oracle.sql.BLOB)</SPAN><SPAN id=Codehighlighter1_990_1491_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.blogjava.net/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_990_1491_Open_Text><SPAN style="COLOR: #000000">{<BR></SPAN><SPAN style="COLOR: #008080">33</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;oracle.sql.BLOB&nbsp;blob&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;(oracle.sql.BLOB)&nbsp;wrapblob;<BR></SPAN><SPAN style="COLOR: #008080">34</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;OutputStream&nbsp;bout&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;blob.getBinaryOutputStream();<BR></SPAN><SPAN style="COLOR: #008080">35</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;FileInputStream&nbsp;fin&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000">&nbsp;FileInputStream(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">d:\\a.jpg</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">);</SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">修改你要存入的图片</SPAN><SPAN style="COLOR: #008000"><BR></SPAN><SPAN style="COLOR: #008080">36</SPAN><SPAN style="COLOR: #008000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top></SPAN><SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">byte</SPAN><SPAN style="COLOR: #000000">&nbsp;[]&nbsp;buf&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">byte</SPAN><SPAN style="COLOR: #000000">[</SPAN><SPAN style="COLOR: #000000">10240</SPAN><SPAN style="COLOR: #000000">];</SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">做为10K的缓存写入</SPAN><SPAN style="COLOR: #008000"><BR></SPAN><SPAN style="COLOR: #008080">37</SPAN><SPAN style="COLOR: #008000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top></SPAN><SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000">&nbsp;len;<BR></SPAN><SPAN style="COLOR: #008080">38</SPAN><SPAN style="COLOR: #000000"><IMG id=Codehighlighter1_1349_1414_Open_Image onclick="this.style.display='none'; Codehighlighter1_1349_1414_Open_Text.style.display='none'; Codehighlighter1_1349_1414_Closed_Image.style.display='inline'; Codehighlighter1_1349_1414_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_1349_1414_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_1349_1414_Closed_Text.style.display='none'; Codehighlighter1_1349_1414_Open_Image.style.display='inline'; Codehighlighter1_1349_1414_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">while</SPAN><SPAN style="COLOR: #000000">((len&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;fin.read(buf))</SPAN><SPAN style="COLOR: #000000">&gt;</SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">)</SPAN><SPAN id=Codehighlighter1_1349_1414_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.blogjava.net/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_1349_1414_Open_Text><SPAN style="COLOR: #000000">{<BR></SPAN><SPAN style="COLOR: #008080">39</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bout.write(buf,</SPAN><SPAN style="COLOR: #000000">0</SPAN><SPAN style="COLOR: #000000">,len);<BR></SPAN><SPAN style="COLOR: #008080">40</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">41</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bout.close();<BR></SPAN><SPAN style="COLOR: #008080">42</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fin.close();<BR></SPAN><SPAN style="COLOR: #008080">43</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">44</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">45</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SerializableClob&nbsp;&nbsp;sc&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;(SerializableClob)obj.getResu();<BR></SPAN><SPAN style="COLOR: #008080">46</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Clob&nbsp;wrapclob&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;sc.getWrappedClob();<BR></SPAN><SPAN style="COLOR: #008080">47</SPAN><SPAN style="COLOR: #000000"><IMG id=Codehighlighter1_1679_2217_Open_Image onclick="this.style.display='none'; Codehighlighter1_1679_2217_Open_Text.style.display='none'; Codehighlighter1_1679_2217_Closed_Image.style.display='inline'; Codehighlighter1_1679_2217_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_1679_2217_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_1679_2217_Closed_Text.style.display='none'; Codehighlighter1_1679_2217_Open_Image.style.display='inline'; Codehighlighter1_1679_2217_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">if</SPAN><SPAN style="COLOR: #000000">(wrapclob&nbsp;</SPAN><SPAN style="COLOR: #0000ff">instanceof</SPAN><SPAN style="COLOR: #000000">&nbsp;CLOB)</SPAN><SPAN id=Codehighlighter1_1679_2217_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.blogjava.net/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_1679_2217_Open_Text><SPAN style="COLOR: #000000">{<BR></SPAN><SPAN style="COLOR: #008080">48</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CLOB&nbsp;clob&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;(CLOB)wrapclob;&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">49</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Writer&nbsp;cout&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;clob.getCharacterOutputStream();<BR></SPAN><SPAN style="COLOR: #008080">50</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;File&nbsp;file&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000">&nbsp;File(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">C:\\log_2005_8.txt</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">);</SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">修改你要存如的文本</SPAN><SPAN style="COLOR: #008000"><BR></SPAN><SPAN style="COLOR: #008080">51</SPAN><SPAN style="COLOR: #008000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top></SPAN><SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;FileInputStream&nbsp;fin&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000">&nbsp;FileInputStream(file);<BR></SPAN><SPAN style="COLOR: #008080">52</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000">&nbsp;read;<BR></SPAN><SPAN style="COLOR: #008080">53</SPAN><SPAN style="COLOR: #000000"><IMG id=Codehighlighter1_2048_2124_Open_Image onclick="this.style.display='none'; Codehighlighter1_2048_2124_Open_Text.style.display='none'; Codehighlighter1_2048_2124_Closed_Image.style.display='inline'; Codehighlighter1_2048_2124_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_2048_2124_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_2048_2124_Closed_Text.style.display='none'; Codehighlighter1_2048_2124_Open_Image.style.display='inline'; Codehighlighter1_2048_2124_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">while</SPAN><SPAN style="COLOR: #000000">((read&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;fin.read())</SPAN><SPAN style="COLOR: #000000">!=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #000000">1</SPAN><SPAN style="COLOR: #000000">)</SPAN><SPAN id=Codehighlighter1_2048_2124_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.blogjava.net/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_2048_2124_Open_Text><SPAN style="COLOR: #000000">{<BR></SPAN><SPAN style="COLOR: #008080">54</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cout.write(read);<BR></SPAN><SPAN style="COLOR: #008080">55</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">56</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fin.close();<BR></SPAN><SPAN style="COLOR: #008080">57</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cout.close();<BR></SPAN><SPAN style="COLOR: #008080">58</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">59</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">60</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tran.commit();<BR></SPAN><SPAN style="COLOR: #008080">61</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">return</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">true</SPAN><SPAN style="COLOR: #000000">;<BR></SPAN><SPAN style="COLOR: #008080">62</SPAN><SPAN style="COLOR: #000000"><IMG id=Codehighlighter1_2332_2475_Open_Image onclick="this.style.display='none'; Codehighlighter1_2332_2475_Open_Text.style.display='none'; Codehighlighter1_2332_2475_Closed_Image.style.display='inline'; Codehighlighter1_2332_2475_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_2332_2475_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_2332_2475_Closed_Text.style.display='none'; Codehighlighter1_2332_2475_Open_Image.style.display='inline'; Codehighlighter1_2332_2475_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN style="COLOR: #0000ff">catch</SPAN><SPAN style="COLOR: #000000">(Exception&nbsp;ex)</SPAN><SPAN id=Codehighlighter1_2332_2475_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.blogjava.net/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_2332_2475_Open_Text><SPAN style="COLOR: #000000">{<BR></SPAN><SPAN style="COLOR: #008080">63</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ex.printStackTrace();<BR></SPAN><SPAN style="COLOR: #008080">64</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tran.rollback();<BR></SPAN><SPAN style="COLOR: #008080">65</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">return</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">false</SPAN><SPAN style="COLOR: #000000">;<BR></SPAN><SPAN style="COLOR: #008080">66</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">67</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">68</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">69</SPAN><SPAN style="COLOR: #000000"><IMG id=Codehighlighter1_2543_2942_Open_Image onclick="this.style.display='none'; Codehighlighter1_2543_2942_Open_Text.style.display='none'; Codehighlighter1_2543_2942_Closed_Image.style.display='inline'; Codehighlighter1_2543_2942_Closed_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockStart.gif" align=top><IMG id=Codehighlighter1_2543_2942_Closed_Image style="DISPLAY: none" onclick="this.style.display='none'; Codehighlighter1_2543_2942_Closed_Text.style.display='none'; Codehighlighter1_2543_2942_Open_Image.style.display='inline'; Codehighlighter1_2543_2942_Open_Text.style.display='inline';" src="http://www.blogjava.net/images/OutliningIndicators/ContractedSubBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">public</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">static</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">void</SPAN><SPAN style="COLOR: #000000">&nbsp;main(String[]&nbsp;args)&nbsp;</SPAN><SPAN id=Codehighlighter1_2543_2942_Closed_Text style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG src="http://www.blogjava.net/images/dot.gif"></SPAN><SPAN id=Codehighlighter1_2543_2942_Open_Text><SPAN style="COLOR: #000000">{<BR></SPAN><SPAN style="COLOR: #008080">70</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">&nbsp;TODO&nbsp;Auto-generated&nbsp;method&nbsp;stub&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #008000"><BR></SPAN><SPAN style="COLOR: #008080">71</SPAN><SPAN style="COLOR: #008000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top></SPAN><SPAN style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;test1&nbsp;t&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000">&nbsp;test1();<BR></SPAN><SPAN style="COLOR: #008080">72</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;TStu&nbsp;stu&nbsp;</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000">&nbsp;TStu();<BR></SPAN><SPAN style="COLOR: #008080">73</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;stu.setAge(</SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000">&nbsp;Integer(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">23</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">));<BR></SPAN><SPAN style="COLOR: #008080">74</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;stu.setName(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">lilei</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">);<BR></SPAN><SPAN style="COLOR: #008080">75</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;stu.setImg(Hibernate.createBlob(</SPAN><SPAN style="COLOR: #0000ff">new</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">byte</SPAN><SPAN style="COLOR: #000000">[</SPAN><SPAN style="COLOR: #000000">1</SPAN><SPAN style="COLOR: #000000">]));<BR></SPAN><SPAN style="COLOR: #008080">76</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;stu.setResu(Hibernate.createClob(</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">"</SPAN><SPAN style="COLOR: #000000">));<BR></SPAN><SPAN style="COLOR: #008080">77</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/InBlock.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;t.inserted(stu);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR></SPAN><SPAN style="COLOR: #008080">78</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/ExpandedSubBlockEnd.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">79</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/ExpandedBlockEnd.gif" align=top>}</SPAN></SPAN><SPAN style="COLOR: #000000"><BR></SPAN><SPAN style="COLOR: #008080">80</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><BR></SPAN><SPAN style="COLOR: #008080">81</SPAN><SPAN style="COLOR: #000000"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top></SPAN></DIV><BR><BR><BR>org link: <A onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.matrix.org.cn/thread.shtml?topicId=27138&amp;forumId=23" target=_blank>http://www.matrix.org.cn<WBR>/thread.shtml?topicId=27138<WBR>&amp;forumId=23</A><BR></FONT></DIV></B></SPAN></DIV></DIV>
<SCRIPT><!--
D(["ce"]);
D(["ms","93"]
);

//--></SCRIPT><img src ="http://www.blogjava.net/darkbluefeeling/aggbug/20387.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/darkbluefeeling/" target="_blank">深蓝色心情</a> 2005-11-18 10:42 <a href="http://www.blogjava.net/darkbluefeeling/archive/2005/11/18/20387.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>