??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲国产欧洲综合997久久,国产精品亚洲一区二区三区,亚洲人成日本在线观看http://www.tkk7.com/darkbluefeeling/category/4986.htmlq来聊聊~~~~zh-cnWed, 18 Jul 2012 02:11:49 GMTWed, 18 Jul 2012 02:11:49 GMT60万众期待的guzz新版l于发布啦!各种期待的功能噢~~http://www.tkk7.com/darkbluefeeling/archive/2012/07/18/guzz-1-3-1-released.htmlp色心?/dc:creator>p色心?/author>Wed, 18 Jul 2012 00:32:00 GMThttp://www.tkk7.com/darkbluefeeling/archive/2012/07/18/guzz-1-3-1-released.htmlhttp://www.tkk7.com/darkbluefeeling/comments/383361.htmlhttp://www.tkk7.com/darkbluefeeling/archive/2012/07/18/guzz-1-3-1-released.html#Feedback0http://www.tkk7.com/darkbluefeeling/comments/commentRss/383361.htmlhttp://www.tkk7.com/darkbluefeeling/services/trackbacks/383361.html亲爱的你萌是不是觉得哀家已l放弃了谷子,不不不,原因只是因ؓ哀家最q比较懒木有更新而已。哀家每qL那么十来个月是比较懒的~~【望?/span>

不过Q这ơ更新绝Ҏ货!?月中发,也用来纪忉|家的桔梗殿下吧?/span>

guzz 1.3.1 20120712更新介绍Q?/strong>

大版本更新噢Q?/strong>

1. 动态拼接SQLl于发布啦,{的花都谢了。现在,乃可以写一个有条g的sql语句Q然后在执行Ӟguzz娘会Ҏ传入的参数构造成真正需要的sql语句Q然后再l定参数执行。古娘默认是ZVelocity模板实现的,于是动态SQL拼接的语法、灵zL、易用性、学习成本是l对_的,velocity文也是l对的丰富和成熟。来仔细瞧瞧吧:http://code.google.com/p/guzz/wiki/TutorialTemplatedSQLService?wl=zh-Hans

2. 受够了一个一个的d域对象到guzz.xml中?是解放自q时候啦。面对着大半q来的各U诉求,1.3.1版这ơ终于良心发玎ͼ增加了package-scan功能【泪目】。咱们也可以扫描文gq批量添加business啦。介是这个脑D:http://code.google.com/p/guzz/wiki/TutorialHbmPackageScan?wl=zh-Hans

3. 在SQL中写旉串就报错Q?虽然是小功能Q但转义字符支持q次q是攑և来啦。不xSQL注入Q一门心思拼接SQL语句的孩U总Lq里Q?/span>http://code.google.com/p/guzz/wiki/TutorialGuzzXml?wl=zh-Hans#sql语句中特D字W{?/a> 。搞dq么玩吧Q勇士们自己被黑了求别黑我家谷子?/span>

4. JDNI数据源这ơ也支持啦。感谢L波提供的代码。借机也感谢L波提供的其他代码?/span>
http://code.google.com/p/guzz/wiki/TutorialDatasourceProvider?wl=zh-Hans#guzz内置q接池实?/a> 

5. 其他功能和bug修正Q本宫就不废话了。亲q你萌有兴就自己d比SVN代码吧?/span>


下面照例复制下宣传介l?/span>

什么是guzz?

guzz是一套用于多数据库编E的Java ORM框架Q用于替代hibernate和ibatisQ实现在一套系l中L使用多台数据库。guzz同时提供通用数据计算和配|管理等Q简化系l复杂度Qؓpȝ在数据层的设计提供一站式解决Ҏ?/span>

guzz主要功能与特点:
  • C大规模系l设计,技术上吸收了ibatis/hibernate的优?/li>
  • 支持应用E序使用大量的数据库和主从读写分?/li>
  • 支持数据库表在多l机器间水^分布QShardQ,q自动维护多l机器之间的分布式事?/li>
  • 支持1张表按照业务规则分切成多张小表(ShadowQ,q支持每张小表拥有自qD的属性字D(CustomQ?/li>
  • 支持1张大表分切后的小表,分布C同的数据库中QVirtualDBQ?/li>
  • 支持越范式的特D关联、非l构化数据等异构资源POJO模式的统一d
  • 支持lg化服务(SOAQ和服务怺依赖Q构Z?目实施基础q_
  • 提供面向对象的数据库d标签(JSP Taglib)Q加快页面展C层的快速变更、开发与部v
  • 对于大部分场景,支持像hibernate一L对象持久、映和方便的增删改查,提高开发效?/li>
  • 对于复杂场景Q支持像ibatis一P让DBA参与SQL设计的复杂数据库操作和优化,以及SQL在线调试
  • 更简z、更好用、更Ҏ控制的批操作接口
  • 支持在线加蝲与调试SQL。按照应用策略,从文?数据?Web Service{途径Q动态提取与使用SQL语句QDynamic SQLQ?/li>
  • 支持配置理服务器,可以使用一套Y件系l对所有应用程序的配置q行l一理
目地址Q?/strong>
http://code.google.com/p/guzz/
文Q?/strong>http://code.google.com/p/guzz/wiki/AboutGuzz?tm=6
下蝲Q?/strong>http://code.google.com/p/guzz/downloads/list 
新浪微博Q?/strong>http://weibo.com/guzzframework
扣扣: 36429094  218658794
Mail ListQ?/strong>https://lists.sourceforge.net/lists/listinfo/guzz-mail-users




]]>
chrome扩展E序“超U提醒”,源代码开放!http://www.tkk7.com/darkbluefeeling/archive/2011/12/01/365281.htmlp色心?/dc:creator>p色心?/author>Thu, 01 Dec 2011 05:16:00 GMThttp://www.tkk7.com/darkbluefeeling/archive/2011/12/01/365281.htmlhttp://www.tkk7.com/darkbluefeeling/comments/365281.htmlhttp://www.tkk7.com/darkbluefeeling/archive/2011/12/01/365281.html#Feedback1http://www.tkk7.com/darkbluefeeling/comments/commentRss/365281.htmlhttp://www.tkk7.com/darkbluefeeling/services/trackbacks/365281.html
chrome插gQ用于统一提醒来自gmail, yahooQhotmailQ新微博。。。等多家L|站的新邮g或新通知。喜Ƣ的朋友可以加入此项目,l箋加对更多|站的支持! 

http://code.google.com/p/notifyall/ 


]]>
guzz1.2.9多数据库框架更新发布http://www.tkk7.com/darkbluefeeling/archive/2011/08/30/357584.htmlp色心?/dc:creator>p色心?/author>Tue, 30 Aug 2011 09:11:00 GMThttp://www.tkk7.com/darkbluefeeling/archive/2011/08/30/357584.htmlhttp://www.tkk7.com/darkbluefeeling/comments/357584.htmlhttp://www.tkk7.com/darkbluefeeling/archive/2011/08/30/357584.html#Feedback1http://www.tkk7.com/darkbluefeeling/comments/commentRss/357584.htmlhttp://www.tkk7.com/darkbluefeeling/services/trackbacks/357584.html
如无意外Q本ơ更Cؓ1.2.9最后一ơ更斎ͼ随后进行下一个大版本的开发,设计新的功能Q欢q提供想法?/strong> 

guzz 1.2.9 20110830更新介绍Q?/strong> 

本次更新Q?/strong> 

1. fix issue 16. 为paramMapping 增加了type属性,用于直接指定参数cdQ用于在没有java属性直接可用的情况下,为参数设|强cd?nbsp;

2. fix issue 14, 15。允许基于对象的数字cdQ如Long, Integer讄和获取null倹{修正了nullValue属性设|后无效的bug?”null”作ؓnullValue的保留字Q用于将默认D|ؓjava null对象?nbsp;

3. 增加了hbm.xml中新格式的支持。新支持的格式ؓQ?nbsp;
<property name="xxx" type="java.lang.Long"> 
            <column name="col_xxxx" precision="18" scale="0" not-null="true"> 
                <comment>注释xxxx</comment> 
            </column> 
        </property> 

4. 增加了对Isql参数的检。如 select xxx where abc in() xxxQ当in 操作集合为空Ӟ直接q回查询l果为空Q避免sql错误。检仅限于Ztaglib和SeachExpression对象化的查询?nbsp;

5. 修订了配|管理中Q连接池cd参数无法重复d的bug?nbsp;

6. 工程Ҏ了maven理?nbsp;

什么是guzz? 

guzz是一套用于多数据库编E的ORM框架Q用于替代hibernate和ibatisQ实现在一套系l中L使用多台数据库。guzz同时提供通用数据计算和配|管理等Q简化系l复杂度Qؓpȝ在数据层的设计提供一站式解决Ҏ?br />
guzz主要功能与特点: 
  • C大规模系l设计,技术上吸收了ibatis/hibernate的优?/li>
  • 支持应用E序使用大量的数据库和主从读写分?/li>
  • 支持数据库表在多l机器间水^分布QShardQ,q自动维护多l机器之间的分布式事?/li>
  • 支持1张表按照业务规则分切成多张小表(ShadowQ,q支持每张小表拥有自qD的属性字D(CustomQ?/li>
  • 支持1张大表分切后的小表,分布C同的数据库中QVirtualDBQ?/li>
  • 支持越范式的特D关联、非l构化数据等异构资源POJO模式的统一d
  • 支持lg化服务(SOAQ和服务怺依赖Q构Z?目实施基础q_
  • 提供面向对象的数据库d标签(JSP Taglib)Q加快页面展C层的快速变更、开发与部v
  • 对于大部分场景,支持像hibernate一L对象持久、映和方便的增删改查,提高开发效?/li>
  • 对于复杂场景Q支持像ibatis一P让DBA参与SQL设计的复杂数据库操作和优化,以及SQL在线调试
  • 更简z、更好用、更Ҏ控制的批操作接口
  • 支持在线加蝲与调试SQL。按照应用策略,从文?数据?Web Service{途径Q动态提取与使用SQL语句QDynamic SQLQ?/li>
  • 支持配置理服务器,可以使用一套Y件系l对所有应用程序的配置q行l一理
目地址Q?/strong>http://code.google.com/p/guzz/ 
文档Q?/strong>http://code.google.com/p/guzz/wiki/WikiHomePage?tm=6 
下蝲Q?/strong>http://code.google.com/p/guzz/downloads/list 


]]>
通用操作日志pȝ设计。一ơ编写,所有项目共同用!http://www.tkk7.com/darkbluefeeling/archive/2011/08/01/355509.htmlp色心?/dc:creator>p色心?/author>Mon, 01 Aug 2011 10:35:00 GMThttp://www.tkk7.com/darkbluefeeling/archive/2011/08/01/355509.htmlhttp://www.tkk7.com/darkbluefeeling/comments/355509.htmlhttp://www.tkk7.com/darkbluefeeling/archive/2011/08/01/355509.html#Feedback2http://www.tkk7.com/darkbluefeeling/comments/commentRss/355509.htmlhttp://www.tkk7.com/darkbluefeeling/services/trackbacks/355509.htmlZ分表和自定义表结构的日志pȝ。真正够灵zȝQ实现成本较低的通用日志架构?nbsp;

新浪微盘下蝲PDF文Q?a target="_blank" style="color: #006699; text-decoration: underline; ">http://t.cn/aY8XIT 





]]>
guzz1.2.9更新发布Q支持选D服务http://www.tkk7.com/darkbluefeeling/archive/2011/07/29/355282.htmlp色心?/dc:creator>p色心?/author>Fri, 29 Jul 2011 01:14:00 GMThttp://www.tkk7.com/darkbluefeeling/archive/2011/07/29/355282.htmlhttp://www.tkk7.com/darkbluefeeling/comments/355282.htmlhttp://www.tkk7.com/darkbluefeeling/archive/2011/07/29/355282.html#Feedback6http://www.tkk7.com/darkbluefeeling/comments/commentRss/355282.htmlhttp://www.tkk7.com/darkbluefeeling/services/trackbacks/355282.html
guzz 1.2.9更新介绍Q?/strong> 

本次更新Q?/strong> 

1. 优化了批操作接口。增加了默认的自动提交和清除选项Q得调用者可以连l插入百万记录而不用自p敎ͼ手工分batchSize提交。默认batchSize的大根据数据库cd和版本,自动选择性h比最合适的Q当然调用者也可以在程序中修改?nbsp;

2. 新提供Leader服务接口。Leader接口用于在集环境下认自己是不是主机,一个集下一般只允许1C机。新提供的LeaderService仅ؓ接口Q开发者需要根据自w情况选择适合自己的实现。halo-cloud工程实现了基于zookeeper的Leader服务Q代码:[http://code.google.com/p/halo-cloud/source/browse/trunk/misc/com/guzzservices/version/impl/ZKLeaderElectionServiceImpl.java] 

什么是guzz? 

guzz是一套用于多数据库编E的ORM框架Q用于替代hibernate和ibatisQ实现在一套系l中L使用多台数据库。guzz同时提供通用数据计算和配|管理等Q简化系l复杂度Qؓpȝ在数据层的设计提供一站式解决Ҏ?br />
guzz主要功能与特点: 
  • C大规模系l设计,技术上吸收了ibatis/hibernate的优?/li>
  • 支持应用E序使用大量的数据库和主从读写分?/li>
  • 支持数据库表在多l机器间水^分布QShardQ,q自动维护多l机器之间的分布式事?/li>
  • 支持1张表按照业务规则分切成多张小表(ShadowQ,q支持每张小表拥有自qD的属性字D(CustomQ?/li>
  • 支持1张大表分切后的小表,分布C同的数据库中QVirtualDBQ?/li>
  • 支持越范式的特D关联、非l构化数据等异构资源POJO模式的统一d
  • 支持lg化服务(SOAQ和服务怺依赖Q构Z?目实施基础q_
  • 提供面向对象的数据库d标签(JSP Taglib)Q加快页面展C层的快速变更、开发与部v
  • 对于大部分场景,支持像hibernate一L对象持久、映和方便的增删改查,提高开发效?/li>
  • 对于复杂场景Q支持像ibatis一P让DBA参与SQL设计的复杂数据库操作和优化,以及SQL在线调试
  • 更简z、更好用、更Ҏ控制的批操作接口
  • 支持在线加蝲与调试SQL。按照应用策略,从文?数据?Web Service{途径Q动态提取与使用SQL语句QDynamic SQLQ?/li>
  • 支持配置理服务器,可以使用一套Y件系l对所有应用程序的配置q行l一理
目地址Q?/strong>http://code.google.com/p/guzz/ 
文档Q?/strong>http://code.google.com/p/guzz/wiki/WikiHomePage?tm=6 
下蝲Q?/strong>http://code.google.com/p/guzz/downloads/list 



]]>
halo-cloud开源私有云q_ 新增调度d和邮件发送服?/title><link>http://www.tkk7.com/darkbluefeeling/archive/2011/07/07/353842.html</link><dc:creator>p色心?/dc:creator><author>p色心?/author><pubDate>Thu, 07 Jul 2011 00:43:00 GMT</pubDate><guid>http://www.tkk7.com/darkbluefeeling/archive/2011/07/07/353842.html</guid><wfw:comment>http://www.tkk7.com/darkbluefeeling/comments/353842.html</wfw:comment><comments>http://www.tkk7.com/darkbluefeeling/archive/2011/07/07/353842.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/darkbluefeeling/comments/commentRss/353842.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/darkbluefeeling/services/trackbacks/353842.html</trackback:ping><description><![CDATA[<span id="1111166" 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> <br /><br /><strong style="font-weight: bold; ">halo-cloud是什么?</strong> <br /><br />可由1?00台机器组成,q用普通编E方式扩展的型U有云计^台?nbsp;<br /><br /><strong style="font-weight: bold; ">halo-cloud有何价|</strong> <br /><br />不是每个公司都像google、像淘宝、像新浪微博一样庞大,需要复杂的成千上万台机器组成的大型云计^収ͼ那样技术太复杂Q成本太高?nbsp;<br /><br />更没有多中国公怼使用GAE、Amaze EC之类公共云^収ͼ那样|络吃不消?nbsp;<br /><br />对于普通的公司Q?00C内机器组成的U有云是最好的选择。规模适中、容易开发、易于维护?nbsp;<br /><br />我们对云不炒作,不报qLQ只是希望有了他Q我在一个项目中写过一遍的功能代码Q在以后的项目中可以直接用,不用重复开发。我也不需要什么这规范那规范,因ؓ我从不打开放成公共云,够我的主要项目用Q速度快就好?nbsp;<br /><br />ȝ来说Q我希望我的云是个云Q没有单炚w题;我希望我的云可以节省我的开发和l护成本Q基功能l统只用写一遍就可以复用Q我希望我的云速度快,不要有SOAP Web Service之类的问题,当我真的需要性能的时候;我希望我的云能让现有的团队来l护和l开发,不要学一大堆东西Q甚至牵扯到个h悟性上?nbsp;<br /><br />q就是halo-cloud诞生的理由。私有的、小型的、简单的云计基服务q_。你可以直接使用上面的服务,也可以低成本的在上面开发自q新服务?nbsp;<br /><br />PSQ如果你觉得云这个名字不爽,叫他分布式基础服务吧?nbsp;<br /><br /><span style="font-size: large; "><strong style="font-weight: bold; ">主要更新Q?/strong></span> <br /><br />1. 新增d调度功能?strong style="font-weight: bold; ">目价|</strong>使用quartzl一实现调度Q对于java目开发基本不在需要配|调度;对于php{不具备d功能的语aQ自动获取某个页面定时执行的新功能?nbsp;<br /><br />2. 新增邮g发送功能?strong style="font-weight: bold; ">目价|</strong>对于目开发,基本不用在配|重复的配置邮g服务器,~写邮g发送代码。只需要调用一个API卛_?nbsp;<br /><br />3. 服务器端增加客户端感知功能。编写服务器端程序时Q服务提供者)Q新接口允许提供者获知当前调用者的IP地址和端口,用于q行权限校验{?nbsp;<br /><br /><strong style="font-weight: bold; ">详细说明Q?/strong><a target="_blank" style="color: #006699; text-decoration: underline; ">http://code.google.com/p/halo-cloud/wiki/AboutFAQ</a> <br /><br /><strong style="font-weight: bold; ">目地址Q?/strong><a target="_blank" style="color: #006699; text-decoration: underline; ">http://code.google.com/p/halo-cloud/</a> <br /><br /><br /><br /><br /><br /></span><img src ="http://www.tkk7.com/darkbluefeeling/aggbug/353842.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/darkbluefeeling/" target="_blank">p色心?/a> 2011-07-07 08:43 <a href="http://www.tkk7.com/darkbluefeeling/archive/2011/07/07/353842.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>大型pȝ设计W??-可扩展的数据库层架构设计 PDF分nhttp://www.tkk7.com/darkbluefeeling/archive/2011/03/29/347225.htmlp色心?/dc:creator>p色心?/author>Tue, 29 Mar 2011 09:23:00 GMThttp://www.tkk7.com/darkbluefeeling/archive/2011/03/29/347225.htmlhttp://www.tkk7.com/darkbluefeeling/comments/347225.htmlhttp://www.tkk7.com/darkbluefeeling/archive/2011/03/29/347225.html#Feedback0http://www.tkk7.com/darkbluefeeling/comments/commentRss/347225.htmlhttp://www.tkk7.com/darkbluefeeling/services/trackbacks/347225.html
前言Q?

对于大规模系l而言Q最复杂Q往往也是最大的性能瓉Q主要都产生在数据层。对于大型系l数据层的设计,主要包括~存pȝ和数据库的可扩展性两斚w。缓存系l比较简单,|上讨论的也比较多,Ҏ也相Ҏ熟,一般来说只要部|一大堆memcached之类的缓存服务器可以解决了Q扩展性也好;但对于可扩展的数据库层架构设计,通用Ҏ较少Q网上资料更是寥寥无几?

q也有情可原Q现在的L通用数据库框Ӟ如hibernate和ibatis基本上都只支?个系l运行在1台数据库上。对应的Q基于这些框架的pȝQ也基本上只能运行在单台数据库上了,框架Ҏ据库扩展性的支持几乎没有Q开发者也只能被迫接受?

q篇文Q主要补充“重要”却被主遗q“数据库层可扩展”架构设计,让你的系l在“需要”时Q可以随旉过增加机器p最单的解决数据库的性能瓉?  阅读全文

]]>
数据库分布式设计很简?-guzz分布式切表功能正式发?/title><link>http://www.tkk7.com/darkbluefeeling/archive/2011/02/10/344018.html</link><dc:creator>p色心?/dc:creator><author>p色心?/author><pubDate>Thu, 10 Feb 2011 07:31:00 GMT</pubDate><guid>http://www.tkk7.com/darkbluefeeling/archive/2011/02/10/344018.html</guid><wfw:comment>http://www.tkk7.com/darkbluefeeling/comments/344018.html</wfw:comment><comments>http://www.tkk7.com/darkbluefeeling/archive/2011/02/10/344018.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/darkbluefeeling/comments/commentRss/344018.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/darkbluefeeling/services/trackbacks/344018.html</trackback:ping><description><![CDATA[<span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; ">今天Q经q一个多月的U上q行Q我们很荣幸的发布guzz 1.2.9分布式切表功能。分布式切表是指一张大表分切成N张小表,q将q些表储存C同的数据库(机器Q中Q从而实现数据的分散存储和分散查询?/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; "><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; ">对于大型pȝ和数据规模较大的pȝQ分布式切表提供了非常好的解x案,有效的解决了大数据分散存储、查询、归档和l护{诸多的问题。但市面上流行的数据层框Ӟ对于此特性几乎无人涉及。guzz首次这U技术做成了通用框架U别Q更全面的提?#8220;一站式数据层解x?#8221;?/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; "><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 更新介绍Q?/strong></span></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; "><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; "> </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; "> </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的基上,通过配置完成Q应用不需要修改现有代码即可完成小表的分布式存储。具体请参看Q?/span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><a 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; "> </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; ">xQguzz已经通过6个层面完成了全面的数据分切支持:</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; "><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; ">数据表比较多QM较大Q将表分C同的数据库组中。第3章dbgroupQ?a 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章ShadowTableQ?a 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; ">业务比较ҎQ每张小表可能包含自qҎ字Dc第16章CustomTableQ?a 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; ">分成表后,表太多Q或在单库中总量太大Q将表分散C同的数据库中。第17章VirtualDBQ?a 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; ">表中的某些字D太大,或者有Ҏ操作要求Q将q些字段存到别的地方。第11章自定义加蝲属性:<a 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; ">讉K量的太高,使用guzz原生支持的读写分,部v更多L据库?/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执行旉Q?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参数的同Ӟ通过 调试服务QDebugServiceQ?两个新的参数允许打印出sql执行所p的时_q且允许控制只打印执行时间超q一定时长的sql语句。时间单位ؓU秒?/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; "><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 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; "> </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; "> </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的类名时Q指定package。用于支持某些hibernate工具自动生成的配|文件?/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; "><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; ">其他Q?/strong></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; "><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为InsertQueueServiceQ?/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; "><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; "> </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; "> </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、多数据源管理、以及通用数据计算的数据层框架Qؓpȝ在数据层的设计提供一站式解决Ҏ。guzz可以看作?ibatis/hibernate的一大补充和延Qƈ可以取代q?个东ѝ?/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; "><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; "> </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; ">C大规模系l设计,技术上吸收了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一L对象持久、映和方便的增删改查,提高开发效?/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; ">对于复杂场景Q支持像ibatis一P让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; ">更简z、更好用、更Ҏ控制的批操作接口</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{途径Q动态提取与使用SQL语句QDynamic SQLQ?/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; ">支持应用E序使用大量的数据库和主从读写分?/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; ">支持数据库表在多l机器间水^分布QShardQ,q自动维护多l机器之间的分布式事?/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张表按照业务规则分切成多张小表(ShadowQ,q支持每张小表拥有自qD的属性字D(CustomQ?/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张大表分切后的小表,分布C同的数据库中QVirtualDBQ?/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; ">支持越范式的特D关联、非l构化数据等异构资源POJO模式的统一d</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; ">支持lg化服务(SOAQ和服务怺依赖Q构Z?目实施基础q_</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; ">提供面向对象的数据库d标签(JSP Taglib)Q加快页面展C层的快速变更、开发与部v</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; ">支持配置理服务器,可以使用一套Y件系l对所有应用程序的配置q行l一理</li> </ul> <span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><strong style="font-weight: bold; ">目地址Q?/strong></span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><a 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; "> </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; ">文档Q?/strong></span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><a 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; "> </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; ">下蝲Q?/strong></span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><a 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; "> </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更新计划Q?/strong></span></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; "><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; ">做什么哪Q开源一个云服务目Q?/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; ">辅助诊断cd能?</li> </ul> <span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><br /> </span> <img src ="http://www.tkk7.com/darkbluefeeling/aggbug/344018.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/darkbluefeeling/" target="_blank">p色心?/a> 2011-02-10 15:31 <a href="http://www.tkk7.com/darkbluefeeling/archive/2011/02/10/344018.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>服务发布QGuzzServices支持PHP客户?/title><link>http://www.tkk7.com/darkbluefeeling/archive/2010/12/26/341580.html</link><dc:creator>p色心?/dc:creator><author>p色心?/author><pubDate>Sun, 26 Dec 2010 13:09:00 GMT</pubDate><guid>http://www.tkk7.com/darkbluefeeling/archive/2010/12/26/341580.html</guid><wfw:comment>http://www.tkk7.com/darkbluefeeling/comments/341580.html</wfw:comment><comments>http://www.tkk7.com/darkbluefeeling/archive/2010/12/26/341580.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/darkbluefeeling/comments/commentRss/341580.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/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反查Q敏感词审查Q以及从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服务器支持jsonQ配|方式:<a 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 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.tkk7.com/darkbluefeeling/aggbug/341580.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/darkbluefeeling/" target="_blank">p色心?/a> 2010-12-26 21:09 <a href="http://www.tkk7.com/darkbluefeeling/archive/2010/12/26/341580.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>guzz1.2.9 build20101021发布Q新增两原创功?/title><link>http://www.tkk7.com/darkbluefeeling/archive/2010/10/25/336049.html</link><dc:creator>p色心?/dc:creator><author>p色心?/author><pubDate>Mon, 25 Oct 2010 00:17:00 GMT</pubDate><guid>http://www.tkk7.com/darkbluefeeling/archive/2010/10/25/336049.html</guid><wfw:comment>http://www.tkk7.com/darkbluefeeling/comments/336049.html</wfw:comment><comments>http://www.tkk7.com/darkbluefeeling/archive/2010/10/25/336049.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/darkbluefeeling/comments/commentRss/336049.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/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、多数据源管理、以及通用数据计算的数据层框架Qؓpȝ在数据层的设计提供一站式解决Ҏ。guzz可以看作?ibatis/hibernate的一大的延Qƈ可以取代q?个东ѝ?/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; "><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; "> </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; ">C大规模系l设计,技术上吸收了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一L对象化持久、映和方便的增删改?/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一P让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{途径Q动态提取与使用SQL语句QDynamic SQLQ?/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; ">支持应用E序使用大量的数据库和主从读写分?/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; ">支持越范式的特D关联、非l构化数据等异构资源的统一理</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; ">支持数据表在多组机器间水q_布(ShardQ,q自动维护多l机器之间的分布式事?/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张表按照业务规则分切成多张小表(ShadowQ,q支持每张小表拥有自qD的属性字D(CustomQ?/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; ">支持lg化服务(ServiceQ,以及服务间依赖,帮助构徏企业/目实施基础q_</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; ">提供面向对象的数据库d标签(JSP Taglib)Q加快页面展C层的快速变更、开发与部v</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; ">支持配置理服务器,可以使用一套Y件系l对所有应用程序的配置q行l一理</li> </ul> <span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><strong style="font-weight: bold; ">目地址Q?/strong></span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><a 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; "> </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; ">文Q?/strong></span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><a 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; "> </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; ">下蝲Q?/strong></span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><a 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; "> </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 更新介绍Q?/strong></span></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; "><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; ">增强服务Q支持服务间怺依赖</strong></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; "><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; ">服务在配|时Q通过dependsOn属性设|依赖的服务Qguzzq行IOC注入。例如您一套通信协议设计成一个通信服务Q当其他服务需要进行通信Ӟ直接依赖通信服务完成q程调用或数据传送?/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; "><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; ">Z说明服务的hg使用方式Qguzz设计了一些常用的基础服务Q供试或者直接用。用时Q一般只需要几行代码,可以完成本来的一个大模块。限于篇q,请参看:</span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 14px; line-height: 25px; "><a 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; "> </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中目前提供的服务包括Q可以主动推送修改后配置的pȝ配置理Q敏感词理与文字过滤服务,以及通过IP查询地理位置服务。后l还增加一些。试一下,p发现guzz服务带来的开发与l护优势?/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; "><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; ">服务以及注入文Q?/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#配置服务Q? target="_blank" style="color: #006699; text-decoration: underline; ">http://code.google.com/p/guzz/wiki/TutorialService?wl=zh-Hans#配置服务Q?/a></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; "><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主键生成器(原创Q: </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产生的主键在较短旉内比较类|虽然不会重复Q但Ҏ被猜出来的问题。对于某些应用场景,如对外API的keyQ需要确保无法被猜出Q这时就需要random主键{略?/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; "><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主键生成一D随机字W串Q由数字和小写字母组成。随Z长度默认?2Q可以通过length属性进行调整?/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; "><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; ">其他Q?/strong></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; "><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. 修复了一些bugQ?/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; "><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; "> </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更新计划Q?/strong></span></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; "><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.tkk7.com/darkbluefeeling/aggbug/336049.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/darkbluefeeling/" target="_blank">p色心?/a> 2010-10-25 08:17 <a href="http://www.tkk7.com/darkbluefeeling/archive/2010/10/25/336049.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>重要变动Q?行代码实现IP到地理位|反查服务,地址和API变更通知http://www.tkk7.com/darkbluefeeling/archive/2010/10/21/335815.htmlp色心?/dc:creator>p色心?/author>Thu, 21 Oct 2010 12:08:00 GMThttp://www.tkk7.com/darkbluefeeling/archive/2010/10/21/335815.htmlhttp://www.tkk7.com/darkbluefeeling/comments/335815.htmlhttp://www.tkk7.com/darkbluefeeling/archive/2010/10/21/335815.html#Feedback2http://www.tkk7.com/darkbluefeeling/comments/commentRss/335815.htmlhttp://www.tkk7.com/darkbluefeeling/services/trackbacks/335815.html服务已经切换至guzzservices.comQƈ更改了API。请使用新的接口Q具体参看:http://www.guzzservices.com/2010/man_ip_service/

使用Ӟ需要将guzz升?.2.9以及以上版本?/p>

如果您已l在使用Q请快切换。新的地址应该不会在变化。非常抱歉进行了服务变化?/p>




]]>
数据库分切设计何必纠l于hibernate shard模式Q应该简单化?/title><link>http://www.tkk7.com/darkbluefeeling/archive/2010/10/18/335488.html</link><dc:creator>p色心?/dc:creator><author>p色心?/author><pubDate>Mon, 18 Oct 2010 13:02:00 GMT</pubDate><guid>http://www.tkk7.com/darkbluefeeling/archive/2010/10/18/335488.html</guid><wfw:comment>http://www.tkk7.com/darkbluefeeling/comments/335488.html</wfw:comment><comments>http://www.tkk7.com/darkbluefeeling/archive/2010/10/18/335488.html#Feedback</comments><slash:comments>5</slash:comments><wfw:commentRss>http://www.tkk7.com/darkbluefeeling/comments/commentRss/335488.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/darkbluefeeling/services/trackbacks/335488.html</trackback:ping><description><![CDATA[<span style="font-family: Tahoma; font-size: 12px; line-height: 18px; ">最q讨论db shard的帖子比较多Q感觉很多都是在参考hibernate shard的思\Q但hibernate分表真的那么好吗Q我觉得它最有2个问题:</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; "> </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; "> </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; "> </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做的增增补补Q凑合用q行Q根本不具备设计上的参考h倹{?/span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; "> </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; ">Ҏ据库分切斚wQ到目前为止Q我觉得q是guzz的设计最清晰Q如果我说的不对Q欢q理性讨论。不您是否使用guzzQ但是guzz在数据库分切斚w的设计,对于清晰的设计模式,比hibernate shard更具有借鉴意义?/span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; "> </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; "> </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默认配置U支持,不需要写M代码Q可以在M时候,在需要时Q将每张表存储到自己单独的一l服务器上,应该说是垂直分切的极限了。而且设计上,无论什么时候怎么分切Q都不需要你改动代码。开发时你可以让所有表在一个库上;部vӞ分到多个库上Q以后业务增加了Q再更加分散的放?/span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; "> </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; "> </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. 声明你要用多台数据库,数据库之间什么关pR?/span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; "> </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 id="1611611" 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 id="1616116" class="bar"> <div id="1611111" 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代码 <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 id="1616161" class="tag" style="color: #006699; font-weight: bold; "><</span><span id="6661161" class="tag-name" style="color: #006699; font-weight: bold; ">dialect</span><span style="color: black; "> </span><span id="1611111" class="attribute" style="color: red; ">class</span><span style="color: black; ">=</span><span id="6161616" class="attribute-value" style="color: blue; ">"org.guzz.dialect.H2Dialect"</span><span id="6616111" class="tag" style="color: #006699; font-weight: bold; ">></span><span id="1116111" class="tag" style="color: #006699; font-weight: bold; "></</span><span id="1161111" class="tag-name" style="color: #006699; font-weight: bold; ">dialect</span><span id="6616161" class="tag" style="color: #006699; font-weight: bold; ">></span><span style="color: black; ">  </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 id="1111111" class="tag" style="color: #006699; font-weight: bold; "><</span><span id="1616611" class="tag-name" style="color: #006699; font-weight: bold; ">dialect</span><span style="color: black; "> </span><span id="1161661" class="attribute" style="color: red; ">name</span><span style="color: black; ">=</span><span id="1666161" class="attribute-value" style="color: blue; ">"mysql5dialect"</span><span style="color: black; "> </span><span id="1661116" class="attribute" style="color: red; ">class</span><span style="color: black; ">=</span><span id="1161661" class="attribute-value" style="color: blue; ">"org.guzz.dialect.Mysql5Dialect"</span><span style="color: black; "> </span><span id="1116661" class="tag" style="color: #006699; font-weight: bold; ">/></span><span style="color: black; ">  </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 id="6161111" class="tag" style="color: #006699; font-weight: bold; "><</span><span id="1166116" class="tag-name" style="color: #006699; font-weight: bold; ">dialect</span><span style="color: black; "> </span><span id="6661116" class="attribute" style="color: red; ">name</span><span style="color: black; ">=</span><span id="6161166" class="attribute-value" style="color: blue; ">"oracle10gdialect"</span><span style="color: black; "> </span><span id="6161116" class="attribute" style="color: red; ">class</span><span style="color: black; ">=</span><span id="1116116" class="attribute-value" style="color: blue; ">"org.guzz.dialect.Oracle10gDialect"</span><span style="color: black; "> </span><span id="1161616" class="tag" style="color: #006699; font-weight: bold; ">/></span><span style="color: black; ">  </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></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 id="6161161" class="tag" style="color: #006699; font-weight: bold; "><</span><span id="1161616" class="tag-name" style="color: #006699; font-weight: bold; ">tran</span><span id="1111166" class="tag" style="color: #006699; font-weight: bold; ">></span><span style="color: black; ">  </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 id="1161111" class="tag" style="color: #006699; font-weight: bold; "><</span><span id="1166166" class="tag-name" style="color: #006699; font-weight: bold; ">dbgroup</span><span style="color: black; "> </span><span id="1616111" class="attribute" style="color: red; ">name</span><span style="color: black; ">=</span><span id="1611666" class="attribute-value" style="color: blue; ">"default"</span><span style="color: black; "> </span><span id="6166166" class="attribute" style="color: red; ">masterDBConfigName</span><span style="color: black; ">=</span><span id="1616111" class="attribute-value" style="color: blue; ">"masterDB"</span><span style="color: black; "> </span><span id="1616661" class="tag" style="color: #006699; font-weight: bold; ">/></span><span style="color: black; ">  </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 id="6161611" class="tag" style="color: #006699; font-weight: bold; "><</span><span id="1116661" class="tag-name" style="color: #006699; font-weight: bold; ">dbgroup</span><span style="color: black; "> </span><span id="1111661" class="attribute" style="color: red; ">name</span><span style="color: black; ">=</span><span id="6116616" class="attribute-value" style="color: blue; ">"mysql"</span><span style="color: black; "> </span><span id="6116111" class="attribute" style="color: red; ">masterDBConfigName</span><span style="color: black; ">=</span><span id="1161116" class="attribute-value" style="color: blue; ">"masterDB"</span><span style="color: black; "> </span><span id="1616661" class="attribute" style="color: red; ">slaveDBConfigName</span><span style="color: black; ">=</span><span id="1616161" class="attribute-value" style="color: blue; ">"mysqlSlaveDB"</span><span style="color: black; "> </span><span id="6111661" class="attribute" style="color: red; ">dialectName</span><span style="color: black; ">=</span><span id="6616111" class="attribute-value" style="color: blue; ">"mysql5dialect"</span><span style="color: black; "> </span><span id="1611166" class="tag" style="color: #006699; font-weight: bold; ">/></span><span style="color: black; ">  </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 id="1166666" class="tag" style="color: #006699; font-weight: bold; "><</span><span id="6611161" class="tag-name" style="color: #006699; font-weight: bold; ">dbgroup</span><span style="color: black; "> </span><span id="1111166" class="attribute" style="color: red; ">name</span><span style="color: black; ">=</span><span id="1161611" class="attribute-value" style="color: blue; ">"oracle"</span><span style="color: black; "> </span><span id="6616666" class="attribute" style="color: red; ">masterDBConfigName</span><span style="color: black; ">=</span><span id="1611111" class="attribute-value" style="color: blue; ">"oracleDB"</span><span style="color: black; "> </span><span id="6166166" class="attribute" style="color: red; ">dialectName</span><span style="color: black; ">=</span><span id="6116166" class="attribute-value" style="color: blue; ">"oracle10gdialect"</span><span style="color: black; "> </span><span id="1166166" class="tag" style="color: #006699; font-weight: bold; ">/></span><span style="color: black; ">  </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 id="6161661" class="tag" style="color: #006699; font-weight: bold; "></</span><span id="1661166" class="tag-name" style="color: #006699; font-weight: bold; ">tran</span><span id="6116661" class="tag" style="color: #006699; font-weight: bold; ">></span><span style="color: black; ">   </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; ">q里我们声明?l数据库Q而且数据库类型还不一栗?/span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; "> </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. Ҏ张表Q配|应该存储到那个库里</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; "> </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 id="1116116" 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 id="6666661" class="bar"> <div id="6166111" 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代码 <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 id="6116116" class="tag" style="color: #006699; font-weight: bold; "><</span><span id="1111161" class="tag-name" style="color: #006699; font-weight: bold; ">a-business</span><span style="color: black; "> </span><span id="6611666" class="attribute" style="color: red; ">dbgroup</span><span style="color: black; ">=</span><span id="1111666" class="attribute-value" style="color: blue; ">"default"</span><span style="color: black; "> </span><span id="1166166" class="attribute" style="color: red; ">name</span><span style="color: black; ">=</span><span id="6616616" class="attribute-value" style="color: blue; ">"filterWord"</span><span style="color: black; "> </span><span id="1161111" class="attribute" style="color: red; ">class</span><span style="color: black; ">=</span><span id="1166616" class="attribute-value" style="color: blue; ">"com.guzzservices.business.FilterWord"</span><span style="color: black; "> </span><span id="1161166" class="tag" style="color: #006699; font-weight: bold; ">/></span><span style="color: black; ">  </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 id="6666661" class="tag" style="color: #006699; font-weight: bold; "><</span><span id="6111161" class="tag-name" style="color: #006699; font-weight: bold; ">a-business</span><span style="color: black; "> </span><span id="6161661" class="attribute" style="color: red; ">dbgroup</span><span style="color: black; ">=</span><span id="6161616" class="attribute-value" style="color: blue; ">"mysql"</span><span style="color: black; "> </span><span id="6111116" class="attribute" style="color: red; ">name</span><span style="color: black; ">=</span><span id="6616111" class="attribute-value" style="color: blue; ">"filterWordGroup"</span><span style="color: black; "> </span><span id="6116166" class="attribute" style="color: red; ">class</span><span style="color: black; ">=</span><span id="6611661" class="attribute-value" style="color: blue; ">"com.guzzservices.business.FilterWordGroup"</span><span style="color: black; "> </span><span id="6116611" class="tag" style="color: #006699; font-weight: bold; ">/></span><span style="color: black; ">  </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 id="6111616" class="tag" style="color: #006699; font-weight: bold; "><</span><span id="6161161" class="tag-name" style="color: #006699; font-weight: bold; ">a-business</span><span style="color: black; "> </span><span id="1116611" class="attribute" style="color: red; ">dbgroup</span><span style="color: black; ">=</span><span id="1666161" class="attribute-value" style="color: blue; ">"oracle"</span><span style="color: black; "> </span><span id="6166166" class="attribute" style="color: red; ">name</span><span style="color: black; ">=</span><span id="1661661" class="attribute-value" style="color: blue; ">"configuration"</span><span style="color: black; "> </span><span id="1666111" class="attribute" style="color: red; ">class</span><span style="color: black; ">=</span><span id="1611611" class="attribute-value" style="color: blue; ">"com.guzzservices.business.Configuration"</span><span style="color: black; "> </span><span id="1666161" class="tag" style="color: #006699; font-weight: bold; ">/></span><span style="color: black; ">  </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; ">单的配置Q将三个对象分别存储?C同的数据库中Q完成垂直分切?/span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; "> </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; "> </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的设计是当需要水q_表时Q原先代码不变,为每个需要分切的表编写一个分表策略类Q配|到pȝ中。然后在调用前,声明分表{略卛_?/span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; "> </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; "> </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; ">  整个q程只需要新写一个类Q在调用出增加一行代码即可,对原始系l入侵非常小Q风险可控?/span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; "> </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; ">  程Lhibernate shard要清晰很多,具体可以?/span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><a 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; "> </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; "> </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也是配置性的原生支持d分离。如果需要增加从数据库,可以随时加上Q不需要改M代码。不需要改动代码,而且配置也不复杂Q应该算是设计上的极限了吧?</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; "> </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”Q然后在一个properties文g中加上所有你需要的从数据库q接池配|即可,从数据库可以有许多台?/span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; "> </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; ">q个hibernate shardҎ没有涉及到。而且guzz允许E序控制d库选取Q和proxy模式的中间g路由各有优势Q毕竟更加容易控制。如果你做过内容提前审核再允许发布的pȝQ就会明白proxy中间件解决不了全部问题,有些L作不允许延迟Q只能读dQ而是也是M务,proxy中间件会很尴?/span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; "> </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; "> </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; ">q个hibernate以及ibatis之类的更没有了。而且也是对应用透明的,你可以随旉择增加一U数据库Q然后把某些表放C面,如增加一个H2做应用端~存数据库,自己完成cMTimesten + oracle的架构?/span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; "> </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; "> </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; "> </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; ">随着表垂直和水^切分的进行,数据库会来多Q数据源配置也会来多。guzz的设计是配置分组理Q类似Mysql的配|文件。每个数据源配置都在一个组内,无论增加多少都清CӞ不会名字怺冲突?/span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; "> </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; ">CZQ?/span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; "> </span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; "><br /> </span> <div id="1111661" 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 id="1116611" class="bar"> <div id="6111616" 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代码 <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]  </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  </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  </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 id="1111166" class="number" style="color: #c00000; ">120</span><span style="color: black; ">  </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  </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 id="1161611" class="number" style="color: #c00000; ">3306</span><span style="color: black; ">/blog?useUnicode=true&amp;characterEncoding=UTF-</span><span id="1611661" class="number" style="color: #c00000; ">8</span><span style="color: black; ">&amp;useServerPrepStmts=true  </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  </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  </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 id="1661616" class="number" style="color: #c00000; ">10</span><span style="color: black; ">  </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 id="1611111" class="number" style="color: #c00000; ">60</span><span style="color: black; ">  </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></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]  </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  </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  </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 id="6161166" class="number" style="color: #c00000; ">20</span><span style="color: black; ">  </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  </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 id="6611116" class="number" style="color: #c00000; ">3306</span><span style="color: black; ">/guzzSlowUpdate?useUnicode=true&amp;characterEncoding=UTF-</span><span id="6111616" class="number" style="color: #c00000; ">8</span><span style="color: black; ">  </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  </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  </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 id="6616666" class="number" style="color: #c00000; ">10</span><span style="color: black; ">  </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 id="1166616" class="number" style="color: #c00000; ">60</span><span style="color: black; ">  </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></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]  </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></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; ">如果一些数据库Ҏ些连接池支持更好Qguzz设计上还允许Z同的数据源指定不同的q接池实现?/span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; "> </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; ">如果您需要分表,q是攑ּhibernate shard或ibatis的设计模式吧Q哪些只是时拼凑出来的东西Q设计上Ҏ׃怎么P</span><span style="font-family: Tahoma; font-size: 12px; line-height: 18px; "> </span> <img src ="http://www.tkk7.com/darkbluefeeling/aggbug/335488.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/darkbluefeeling/" target="_blank">p色心?/a> 2010-10-18 21:02 <a href="http://www.tkk7.com/darkbluefeeling/archive/2010/10/18/335488.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>3行代码,实现IP到地理位|的反查功能http://www.tkk7.com/darkbluefeeling/archive/2010/06/22/324143.htmlp色心?/dc:creator>p色心?/author>Tue, 22 Jun 2010 03:59:00 GMThttp://www.tkk7.com/darkbluefeeling/archive/2010/06/22/324143.htmlhttp://www.tkk7.com/darkbluefeeling/comments/324143.htmlhttp://www.tkk7.com/darkbluefeeling/archive/2010/06/22/324143.html#Feedback9http://www.tkk7.com/darkbluefeeling/comments/commentRss/324143.htmlhttp://www.tkk7.com/darkbluefeeling/services/trackbacks/324143.html阅读全文

]]>
改进架构Q实现动态数据源Q降低javal护http://www.tkk7.com/darkbluefeeling/archive/2010/05/27/322032.htmlp色心?/dc:creator>p色心?/author>Thu, 27 May 2010 06:52:00 GMThttp://www.tkk7.com/darkbluefeeling/archive/2010/05/27/322032.htmlhttp://www.tkk7.com/darkbluefeeling/comments/322032.htmlhttp://www.tkk7.com/darkbluefeeling/archive/2010/05/27/322032.html#Feedback5http://www.tkk7.com/darkbluefeeling/comments/commentRss/322032.htmlhttp://www.tkk7.com/darkbluefeeling/services/trackbacks/322032.html如何不用写java代码来完成开发? 

对于大部分的产品和项目来_面变化是非常头痛的事情。每ơ小功能上线Q新客户到来Q都需要进行定制改造,不断的开发维护。每ơ开发一斚w要改动页面,一斚w要改动服务器代码Q然后部|Ӏ而借助动态数据源Q可以不用开发后端应用,直接完成功能开发?/span> 

新功能开发时Q只需要定义需要的数据格式和获取方法,如通过xml上传1个sql语句Q系l根据sql语句自动提取数据q{成通用的格式。开发过E中Q后台java开发部分只是写好sqlq且上传Q这样前台通过某一个servlet可以动态的d执行sqlQƈ结果按照jsonq给前端Q以后所有的开发只需要前端做ajax实现面卛_?/span> 

完整业务程如下Q?/strong> 

1. 用户在前端操作,如需要读取经类图书?/span> 

2. 前端js判断是什么操作,然后发送ajaxh刎ͼhttp://services.guzz.org/commonServlet?id=f2354239sfASASFASfasf6&catId=47&keyword=jingji..... 

3. 服务器端有一个类似dispatcher-servlet的东西(我们q儿的commonServletQ,拦截hQ根据id知道加蝲数据需要执行名UCؓf2354239sfASASFASfasf6的sql文gQ执行时需要参敎ͼcatId=47和keyword=jingji 

4. commonServlet从文件系l中df2354239sfASASFASfasf6.xml文gQ这个文件在一个隐藏的目录下,从浏览器是不能直接获取到的;集群环境会存攑֜集中存储上)Q解析sql以及对象映射ORM?/span> 

5. commonServlet打开数据库连接,Ҏsql构造查询语句,第一步传入的参数全部作ؓ命名参数传给查询语句Q执行查询?/span> 

6. commonServlet把查询的ResultSetҎORM转成javac,再{成jsonQ返回前台?/span> 

7. 前台Ҏjson构造出面q展C。结束流E?/span> 

在整个过E中Q有2个关键步骤,一是动态加载SQLq进行ORM映射Q一是自动进行sql所需要参数的cd转换和匹配,q行命名查询。如果系l规模较大,q需要解x询时分库分表的问题。对于这Usql使用方式Q由于在pȝ上线Ӟq不知道以后会用哪些sql语句Q我们称作动态SQL?/span> 

实现方式Q?/strong> 

步骤1. 实现servlet。定义一个普通的servletQ或者jspQ或者webwork/spring actionQ接收参敎ͼ获取到sql的idQ以及所有传入的参数Q然后{入处理类处理。处理完成后Q将q回l果转成jsonq回前端?/span> 

步骤2. 实现动态SQL加蝲与查询。处理类Ҏid加蝲sqlq执行,q回数据库查询结果。guzz 1.2.8 beta2提供了动态SQL服务Q根据此服务可以直接实现此功能。详l说明:http://code.google.com/p/guzz/wiki/TutorialDynamicSQLService 

好处Q?/strong> 

实现以后Q基本上后台开发就会很E_很稳定了Q大部分的工作只是前端做面。可以大q度的降低开发成本,提高开发进度?/span> 

上面的实现是以上传文件来定义和管理sqlQ也可以通过数据库来理。这L理v来更加简单?/span> 

如果使用guzz作ؓ动态SQL提供者,可以自动获得命名查询Q类型自动匹配(转成枚Dcd都可以)Q分库,自动分切表,自定义属性表{附加支持?/span>

啧啧~~ 



]]>
guzz1.2.8 beta2发布--支持动态加载在U调试SQLhttp://www.tkk7.com/darkbluefeeling/archive/2010/05/26/321888.htmlp色心?/dc:creator>p色心?/author>Wed, 26 May 2010 02:13:00 GMThttp://www.tkk7.com/darkbluefeeling/archive/2010/05/26/321888.htmlhttp://www.tkk7.com/darkbluefeeling/comments/321888.htmlhttp://www.tkk7.com/darkbluefeeling/archive/2010/05/26/321888.html#Feedback2http://www.tkk7.com/darkbluefeeling/comments/commentRss/321888.htmlhttp://www.tkk7.com/darkbluefeeling/services/trackbacks/321888.html guzz是一套用来解决ORM、多数据源管理、以及通用数据计算的数据层框架Qؓpȝ在数据层的设计提供一站式解决Ҏ。guzz可以看作?ibatis/hibernate的一大的延Qƈ可以取代q?个东ѝ?/span> 

guzz主要功能与特点: 
  • C大规模系l设计,技术上吸收了ibatis/hibernate的优?/li>
  • 支持像hibernate一L对象化持久、映和方便的增删改?/li>
  • 支持像ibatis一P让dba参与sql设计的复杂数据库操作和优?/li>
  • 支持在线加蝲与调试SQL。按照应用策略,从文?数据?Web Service{途径Q动态提取与使用SQL语句QDynamic SQLQ?/li>
  • 支持应用E序使用大量的数据库和主从读写分?/li>
  • 支持越范式的特D关联、非l构化数据等异构资源的统一理
  • 支持数据表在多组机器间水q_布(ShardQ,q自动维护多l机器之间的分布式事?/li>
  • 支持1张表按照业务规则分切成多张小表(ShadowQ,q支持每张小表拥有自qD的属性字D(CustomQ?/li>
  • 支持lg化服务(SOAQ,构徏企业/目实施基础q_
  • 提供面向对象的数据库d标签(JSP Taglib)Q加快页面展C层的快速变更、开发与部v
  • 支持配置理服务器,可以使用一套Y件系l对所有应用程序的配置q行l一理
目地址Q?/strong>http://code.google.com/p/guzz/ 
文档Q?/strong>http://code.google.com/p/guzz/wiki/WikiHomePage?tm=6 

1.2.8 beta2更新介绍Q?/strong> 

支持动态管理SQLQ?nbsp;

动态SQLQDynamic SQLQ不是指应用E序动态的拼接SQL语句Q动态SQL是指应用E序可以动态的获取配置好的SQL语句。在获取的过E中QSQL语句如何理Q由应用pȝ自n军_?/span> 

换句话说Q在ibatis中,SQL语句配置到ibatis.xml文g中,在guzz中,配置到guzz.xml中。但当配|完成后Q在pȝq行期间q些SQL都是不能变动的,如果需要添?个或者修改优?个SQL语句Q必重启应用才能生效。而动态SQL允许应用pȝ动态的理Q添?修改/优化/删除Qsql语句以及查询l果到对象的映射关系QORMQ,对于SQL的变更不再需要重启应用系l,以简化维护与应对需求变化?/span> 

动态SQL主要有两U应用场景:SQL优化和动态数据源。具体介l请参看Q?/span>http://code.google.com/p/guzz/wiki/TutorialDynamicSQLService 

改进q程服务设计Q?/strong> 

增加对hessian, burlap协议的支持。目前guzz内置支持phprpc, hessian, burlap三种协议q行RPCq程调用。用时Q三U协议可以透明替换Q类似spring对RMIcd议的装。具体介l请参看Q?/span>http://code.google.com/p/guzz/wiki/TutorialFutureService 

增加枚Dcd与类型参数化支持Q?/strong> 

按照TopLink的模式,支持JDK5 enum。Enum在用时和普通类型一P不需要实现特D的接口Qhibernate要求实现接口Q。Enum支持通过JPA的Enumeration注释声明Q也支持在hbm.xml中通过xml定义。通过xml的定义方式参看:http://code.google.com/p/guzz/wiki/TutorialHbmXml 

cd参数化ؓguzz的特D功能,用于处理动态SQL参数和Jsp Taglib条g参数ӞStringcd自动转换成需要的数据cd。参数化cd主要为日期和枚D。详l介l:http://code.google.com/p/guzz/wiki/TutorialHbmXml 

增加Ҏ据库保留字的支持Q?/strong> 

在定义数据库列名Ӟ可以用`QESC下面的键Q将列名引v来,避免字段名称与数据库保留字冲H。此功能与hibernate提供的处理保留字Ҏ相同Q但guzz只支持字D,不支持`表名`?/span> 

增加对Microsoft SQL Server的支?未测?Q?/strong> 

参考hibernate实现了一个SQL Server 2000 & 2005的dialectQ不支持分页。没有测试过。Dialect实现c:org.guzz.dialect.MSSQLDialect 

Guzz已经能够支持的数据库和数据类型请参看Q?/span> 
http://code.google.com/p/guzz/wiki/TutorialGuzzXml 

应用CZ说明Q?/strong> 

http://code.google.com/p/guzz/wiki/TutorialDynamicSQLService 

下一版本计划Q?/strong> 

  • 修复发现的bug?/li>
  • 设计一些常见的服务Q推qguzz基础服务理念?/li>


]]>
guzz1.2.8 beta1发布--支持annotationhttp://www.tkk7.com/darkbluefeeling/archive/2010/05/05/320099.htmlp色心?/dc:creator>p色心?/author>Wed, 05 May 2010 02:36:00 GMThttp://www.tkk7.com/darkbluefeeling/archive/2010/05/05/320099.htmlhttp://www.tkk7.com/darkbluefeeling/comments/320099.htmlhttp://www.tkk7.com/darkbluefeeling/archive/2010/05/05/320099.html#Feedback0http://www.tkk7.com/darkbluefeeling/comments/commentRss/320099.htmlhttp://www.tkk7.com/darkbluefeeling/services/trackbacks/320099.html阅读全文

]]>
guzz1.2.7正式版发布,支持表分切和动态表字段http://www.tkk7.com/darkbluefeeling/archive/2010/04/09/317850.htmlp色心?/dc:creator>p色心?/author>Fri, 09 Apr 2010 06:55:00 GMThttp://www.tkk7.com/darkbluefeeling/archive/2010/04/09/317850.htmlhttp://www.tkk7.com/darkbluefeeling/comments/317850.htmlhttp://www.tkk7.com/darkbluefeeling/archive/2010/04/09/317850.html#Feedback1http://www.tkk7.com/darkbluefeeling/comments/commentRss/317850.htmlhttp://www.tkk7.com/darkbluefeeling/services/trackbacks/317850.htmlguzz是一套用来解决ORM、多数据源管理、以及通用数据计算的数据层框架Qؓpȝ在数据层的设计提供一站式解决Ҏ。guzz可以看作?ibatis/hibernate的一大的延Qƈ可以取代q?个东ѝ?nbsp;

guzz主要功能与特点: 
  • C大规模系l设计,技术上吸收了ibatis/hibernate的优?/li>
  • 支持像hibernate一L对象化持久、映和方便的增删改?/li>
  • 支持像ibatis一P让dba参与sql设计的复杂数据库操作和优?/li>
  • 支持应用E序使用大量的数据库和主从读写分?/li>
  • 支持越范式的特D关联、非l构化数据等异构资源的统一理
  • 支持数据表在多组机器间水q_布(ShardQ,q自动维护多l机器之间的分布式事?/li>
  • 支持1张表按照业务规则分切成多张小表(ShadowQ,q支持每张小表拥有自qD的属性字D(CustomQ?/li>
  • 支持lg化服务(SOAQ,构徏企业/目实施基础q_
  • 提供面向对象的数据库d标签(JSP Taglib)Q加快页面展C层的快速变更、开发与部v
  • 支持配置理服务器,可以使用一套Y件系l对所有应用程序的配置q行l一理
目地址Q?/strong>http://code.google.com/p/guzz/ 
文Q?/strong>http://www.guzz.org/wiki/GuzzGuide 

1.2.7正式?更新介绍Q?/strong> 

  • 支持表分?/strong>。允许同一对象按照业务规则Q分别存储在不同的表中。如新闻评论Q新闻频道的评论存放?tb_c1Q娱乐:tb_c2Q体育tb_c3Q其他:tb_c4Q满_cdU数据的数据表^行扩展需要。表分切命名为:Shadow Table?/li>
  • 支持自定义属性表。允许分切后的每张小表拥有自q动态对象属性和字段。如购物|站中:商品对象拥有l一的名U、h根{编受评分等Q但不同的商品可能有自己Ҏ的属性,如图书拥有ISBN和出版社作者,服装拥有码、颜艌Ӏ款式等{。自定义属性允许程序只定义1个商品域对象Q然后通过自定义属性和切表Q将?U特定的商品分切?张自qD的表中Q这张表同时拥有商品通用的字D以及这U商品自q字段Q查询时可以按照Ҏ字段直接在数据库中进行关pL询。在guzz中,自定义属性的定义允许存储到数据库中,像普通对象一样动态生成和理Q不用配|复杂的xml。自定义属性命名ؓQCustom Table?/li>
  • 增加q行d支持。用于多个远E服务同步的调用Q降低等待时间?/li>
  • 增加hilo和seqhilod生成{略。至此,hibernate支持的常见主健生成策略,guzz都支持了?/li>
  • 增加外挂环境接口。如果在spring中启动,允许在guzz中获取spring定义的bean?/li>
应用CZ说明Q?/strong> 

本次更新有很多新概念需要介l,因此幅较长。详l的CZ和说明请参看Q?nbsp;

表分切:http://www.guzz.org/wiki/GuzzShadow 

自定义属性表Q基于表分切Q:[url]http://www.guzz.org/wiki/GuzzCustomTable [/url] 

q行d执行Q基于服务)Q?a target="_blank" style="color: #006699; text-decoration: underline; ">http://www.guzz.org/wiki/GuzzFutureService 

d生成{略Q?a target="_blank" style="color: #006699; text-decoration: underline; ">http://www.guzz.org/wiki/GuzzHbm 

下一版本计划Q?/strong> 

  • 数据库自动分库支?/strong>。允许同一张表Q分散在多台数据库中?/li>
  • 提供更多Ҏ务的支持?/li>
  • 探烦SASSQY件就是服务)的数据层模型?/li>
  • 其他?/li>


]]>
guzz使用效果和经验技巧分?/title><link>http://www.tkk7.com/darkbluefeeling/archive/2010/04/09/317849.html</link><dc:creator>p色心?/dc:creator><author>p色心?/author><pubDate>Fri, 09 Apr 2010 06:52:00 GMT</pubDate><guid>http://www.tkk7.com/darkbluefeeling/archive/2010/04/09/317849.html</guid><wfw:comment>http://www.tkk7.com/darkbluefeeling/comments/317849.html</wfw:comment><comments>http://www.tkk7.com/darkbluefeeling/archive/2010/04/09/317849.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/darkbluefeeling/comments/commentRss/317849.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/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应用Qweb规模也不能确定,有可能一天几千万甚至上亿的PVQ也有可能根本没人用。最初设计guzz的目的就是让大型|站和小型网站一栯计编写,因ؓ谁也不知道这个应用上M后有多少人用Q同时解决系l被要求面天天Ҏ该去的问题?/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; "><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; "> </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慢,我看q他们的一些代码,程挺复杂的。guzz很简单,整个持久化过E需要{手的c至要比这两个很多?/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; "><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较多Q一般数据库设计是一个库Q读写全部做。现在在设计时大家脑子里面直接就是分?个数据库Q可能部|在1台mysql上)--业务dQ时信息库Q日志库Q然后把表分C同的库中。然后数据库安装时直接主从安装,M使用。虽然看h库复杂了Q但E序上没有Q何成本代P基本上已lŞ成一U设计流E。这U模式感觉可以作为最佛_c?/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; "><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. ~程上,一开始开发h员还是徏个spring actionc?+ 在dao和manager中增加需要的Ҏ + 修改dispatcher-servlet.xml配置映射 + jsp实现view。但现在很多功能都是直接jspQ用taglib直接dQ基本上后台的读数据库操作页面已l看不到action的媄子了。java代码比先前的工程Q同L功能了大概60%-70%?/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; "><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. 我们的系l一般后台功能比较复杂,以往~辑要改点东西大安很郁闗不q现在抵制少了很多,基本上就是改改jsp或者在复制1个新的jspҎQ然后传到服务器上,一大堆集群机器的重启工作都免了Q无论是开发还是部|都很省事。和php差不多?/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; "><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分表和自定义表的应用实例Q?/strong></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; "><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; ">我们?套调查系l,使用了这Ҏ术,也是W一个线上测试。每个调查都不太一P需要网友填一些东西,需要填什么,填的个数cd都不定。一个调查进行过E中Q或者结束后要求Ҏ据进行统计报表。统计的内容可能也包括那些自定义的填I题?/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; "><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.7之前Q我们解x案是Q将所有自定义的调查项Q按照key-value生成一个xml字符Ԍ存储到数据库大字D中(Mysql text字段)。需要统计时Q根据mysql5.1对xml支持的新Ҏ用ExtraValue函数解析q个xml生成一个新表(create table xxxx select ExtraValue(xx) as a, .....from 主调查记录表Q,然后在根据新的xxxx表统计。每ơ都要手工来弄,非常J琐?/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; "><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.7Q用切表和自定义属性后Q现在的解决ҎQ每ơ创建投ƈ建立好自定义调查(自定义调查项存储在数据库中)Q根据这些自动生成一个mysql create table的语句,创徏好需要的表。在配置CustomTableView动态的映射用户提交的数据存储到对应的表中。完全自动,后箋处理化了很多?/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; "><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; ">而且׃整个q程是实时的Q以前的q程是手工的Q所以很多线上的报表功能也可以开发了。开发也非常单,我们用guzz jsp tablib直接dQ像操作普通java属性一h作自定义属性,一个类型的表报1个jsp。特D调查的Ҏ报表也就是往服务器上?个特D处理的jspQ应用都不用重启Q非常方ѝ?/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; "><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; "> </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; ">q是一个计划,q没有做Q不q我们准备很快就开始做?/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; "><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; ">我们的所有系l对日志都有要求Q日志必记录!但日志的开发很烦hQ全是没有技术含量的重复工作。我们准备开发一个日志服务,所有系l以后就不用开发日志了Q直接用这个服务。日志服务分为服务器端和客户端?/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; "><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; ">服务器端Q?/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; "><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 webpȝQ有日志数据库,用来存储所有系l的日志信息Qƈ提供查询和统计等界面。如果有人需要查日志Q就到这个系l来查?/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; "><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; ">服务器端?个应用数据库Q用来创建和理授权的应用系l?个新的应用上U的时候,在这里创Z个应用和他的授权码,然后录入他的个性日志字D和数据cdQ类g面提到调查的个性选项Q,服务器自动在数据库中l他创徏1个日志表Q用来存储这个应用的日志数据。我们准备按季度分表Q让每个日志?个季度分?张子表?/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; "><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; "> </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 serviceQ提供日志插入接?/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; "><br /> </span> <div id="1161611" 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 id="1161116" class="bar"> <div id="1116666" 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代码 <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 id="6161111" class="keyword" style="color: #7f0055; font-weight: bold; ">public</span><span style="color: black; "> </span><span id="1116611" class="keyword" style="color: #7f0055; font-weight: bold; ">void</span><span style="color: black; "> log(UserLog log) ;  </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; ">每个pȝ开发时Q将日志服务的jar包放到工E中Qƈ在guzz.xml中声明此服务Q代码直接调用就OK了?/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; "><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; ">q样以后׃用ؓ每个pȝ开发日志管理模块了。ƈ且还能获取到l计某一个用户在所有系l中zd记录的额外增强(例如我们可以在服务器端将日志记录两䆾Q一份按应用pȝQ一份按操做者记录)~~</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; "><br /> </span><span style="font-family: Arial, sans-serif, Helvetica, Tahoma; font-size: 12px; line-height: 18px; "><br /> </span> <img src ="http://www.tkk7.com/darkbluefeeling/aggbug/317849.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/darkbluefeeling/" target="_blank">p色心?/a> 2010-04-09 14:52 <a href="http://www.tkk7.com/darkbluefeeling/archive/2010/04/09/317849.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Hibernate入门 - 基础配置http://www.tkk7.com/darkbluefeeling/archive/2005/12/02/22218.htmlp色心?/dc:creator>p色心?/author>Fri, 02 Dec 2005 03:48:00 GMThttp://www.tkk7.com/darkbluefeeling/archive/2005/12/02/22218.htmlhttp://www.tkk7.com/darkbluefeeling/comments/22218.htmlhttp://www.tkk7.com/darkbluefeeling/archive/2005/12/02/22218.html#Feedback0http://www.tkk7.com/darkbluefeeling/comments/commentRss/22218.htmlhttp://www.tkk7.com/darkbluefeeling/services/trackbacks/22218.html
Hibernate配置文g可以有两U格式,一U是 hibernate.properties Q另一U是 hibernate.cfg.xml 

后者稍微方便一些,当增加hbm映射文g的时候,可以直接?nbsp;hibernate.cfg.xml 里面增加Q不必像 hibernate.properties 必须在初始化代码中加入?

但不怎么_两种的配|项都是一LQ下面详l介l:

在Hibernate的src目录下有一?nbsp;hibernate.properties 模板Q我们不必自׃头写Q修Ҏ板就可以?)

hibernate.query.substitutions true 1, false 0, yes 'Y', no 'N' 


q个配置意思是当你在Hibernate里面输入true的时候,Hibernate会{化ؓ1插入数据库,当你在Hibernate里面输入false的时候,Hibernate会{化ؓ0插入数据库,后面的YQN同理?

对于某些数据库,例如Oracle来说Q没有boolean数据cdQ就是采?代表trueQ?代表falseQ因此用这个配|在Hibernate里面直接用true/false会非常直观?

1hibernate.dialect net.sf.hibernate.dialect.MySQLDialect 
2hibernate.connection.driver_class com.mysql.jdbc.Driver 
3hibernate.connection.url jdbc:mysql:///test 
4hibernate.connection.username root 
5hibernate.connection.password  
6


q是一个连接MySQL数据库的例子Q很直观Q不必解释,不同的数据库的连接参数模板中全部l出了?


hibernate.connection.pool_size 1
hibernate.statement_cache.size 25

q是Hibernate自带的连接池的配|参敎ͼ在默认情况下采用。意义很直观Q不多解释?

只是提醒一点,Hibernateq个q接池是非常原始非常单的q接池,如果你在目中用Hibernate的话Q徏议你首选App Server的连接池Q次选Hibernate带的DBCPq接池。自带的q接池应该做为末选?

如果你采用DBCPq接池,除了要配|DBCPq接池以外,q需要取消掉下行的注释:

hibernate.connection.provider_class net.sf.hibernate.connection.DBCPConnectionProvider

其它的连接池同理?

如果采用App Server的连接池Q假设App Serverq接池的DataSource的JNDI名称?mypool"的话Q配|应该如下:

hibernate.dialect net.sf.hibernate.dialect.MySQLDialect
hibernate.connection.datasource mypool
hibernate.connection.provider_class net.sf.hibernate.connection.DatasourceConnectionProvider

其它参数׃必写了,因ؓ已经在App Server配置q接池的时候指定好了?

如果你不是在App Server环境中用HibernateQ例如远E客LE序Q但是你又想用App Server的数据库q接池,那么你还需要配|JNDI的参敎ͼ例如Hibernateq接q程Weblogic上的数据库连接池Q?

hibernate.dialect net.sf.hibernate.dialect.MySQLDialect
hibernate.connection.datasource mypool
hibernate.connection.provider_class net.sf.hibernate.connection.DatasourceConnectionProvider
hibernate.jndi.class weblogic.jndi.WLInitialContextFactory
hibernate.jndi.url t3://servername:7001/


最后,如果你需要在EJB或者JTA中用HibernateQ需要取消下行的注释Q?

hibernate.transaction.factory_class net.sf.hibernate.transaction.JTATransactionFactory

杂项配置Q?


hibernate.show_sql false

是否Hibernate发送给数据库的sql昄出来Q这是一个非帔R常有用处的功能。当你在调试Hibernate的时候,让Hibernate打印sql语句Q可以帮助你q速解决问题?


#hibernate.connection.isolation 4

指定数据库的隔离U别Q往往不同的数据库有自己定义的隔离U别Q未必是Hibernate的设|所能更改的Q所以也不必ȝ它了?

hibernate.jdbc.fetch_size 50 
hibernate.jdbc.batch_size 25 


q两个选项非常非常非常重要Q!Q将严重影响Hibernate的CRUD性能!

C = create, R = read, U = update, D = delete

Fetch Size 是设定JDBC的Statementd数据的时候每ơ从数据库中取出的记录条数?

例如一ơ查?万条记录Q对于Oracle的JDBC驱动来说Q是不会1ơ性把1万条取出来的Q而只会取出Fetch Size条数Q当U录集遍历完了这些记录以后,再去数据库取Fetch Size条数据?

因此大大节省了无谓的内存消耗。当然Fetch Size讄大Q读数据库的ơ数少Q速度快QFetch Size小Q读数据库的ơ数多Q速度慢?

q有点像qx我们写程序写盘文g一P讄一个BufferQ每ơ写入BufferQ等Buffer满了以后Q一ơ写入硬盘,道理相同?

Oracle数据库的JDBC驱动默认的Fetch Size=10Q是一个非怿守的讑֮Q根据我的测试,当Fetch Size=50的时候,性能会提?倍之多,当Fetch Size=100Q性能q能l箋提升20%QFetch Sizel箋增大Q性能提升的就不显著了?

因此我徏议用Oracle的一定要Fetch Size讑ֈ50?

不过q不是所有的数据库都支持Fetch SizeҎ,例如MySQL׃支持?

MySQL像我上面说的那U最坏的情况Q他L一下就?万条记录完全取出来,内存消耗会非常非常惊hQ这个情况就没有什么好办法?nbsp;:(

Batch Size是设定对数据库进行批量删除,扚w更新和批量插入的时候的Ҏ大小Q有点相当于讄Buffer~冲区大的意思?

Batch Size大Q批量操作的向数据库发送sql的次数越,速度p快。我做的一个测试结果是当Batch Size=0的时候,使用Hibernate对Oracle数据库删?万条记录需?5U,Batch Size = 50的时候,删除仅仅需?U!Q!

可见有多么大的性能提升Q很多h做Hibernate和JDBC的插入性能试会奇怪的发现Hibernate速度臛_是JDBC的两倍,是因ؓHibernate使用了Batch InsertQ而他们写的JDBC没有使用Batch的缘故?

以我的经验来看,Oracle数据?nbsp;Batch Size = 30 的时候比较合适,50也不错,性能会l提升,50以上Q性能提升的非常微弱,反而消耗内存更加多Q就没有必要了?


#hibernate.jdbc.use_scrollable_resultset true

讑֮是否可以使用JDBC2.0规范的可滚动l果集,q对Hibernate的分|C有一定的作用Q默认就好了?

#hibernate.cglib.use_reflection_optimizer false 


默认打开Q启用cglib反射优化。cglib是用来在Hibernate中动态生成PO字节码的Q打开优化可以加快字节码构造的速度?

不过Q当你在调试E序q程中,特别是和proxyQlazy loading相关的应用中Q代码出错,但是出错提示信息有语焉不详,那么你可以把cglib优化xQ这样Hibernate会输出比较详l的调试信息Q帮助你debug?


]]>
spring+hibernate+oracle9i用clobhttp://www.tkk7.com/darkbluefeeling/archive/2005/11/18/20387.htmlp色心?/dc:creator>p色心?/author>Fri, 18 Nov 2005 02:42:00 GMThttp://www.tkk7.com/darkbluefeeling/archive/2005/11/18/20387.htmlhttp://www.tkk7.com/darkbluefeeling/comments/20387.htmlhttp://www.tkk7.com/darkbluefeeling/archive/2005/11/18/20387.html#Feedback2http://www.tkk7.com/darkbluefeeling/comments/commentRss/20387.htmlhttp://www.tkk7.com/darkbluefeeling/services/trackbacks/20387.html 
数据库驱动更Cؓclasses12-9i.jar
修改hibernate的配|如?BR>
代码
<bean id="nativeJdbcExtractor" class="org.springframework.jdbc.support.nativejdbc.SimpleNativeJdbcExtractor"/>

<bean id="oracleLobHandle" class="org.springframework.jdbc.support.lob.OracleLobHandler" Lazy-init="true">
 
<property name="nativeJdbcExtractor">
   
<ref local="nativejdbcExtractor"/>
 
</property>
</bean>


在有clobcdsessionFactory(org.springframework.com.hibernate.LocalSessionFractoryBean)中加?BR><property name="lobHandler"><ref bean="oracleLobHandle"/></property>

在需要clob的JavaBean对应的hbm.xml中,改对应的clobcd的字D?BR>
代码
<property
 
name=""
 type
="org.springframework.orm.hibernate.support.ClobStringType"
 clumn
=""
 length
="XXXXXX" <!--定义clob字段大小(以字节ؓ单位Q最?GB)-->
>

JavaBean的对应的属性类型ؓString

------------------------------------------------------------------------------
----hibernate3 使用blob ?clob 演例代码-----

hibernate3 使用blob ?clob 演例代码Q?BR>
 1import java.io.File;
 2import java.io.FileInputStream;
 3import java.io.OutputStream;
 4import java.io.Writer;
 5import java.sql.Clob;
 6import oracle.sql.CLOB;
 7import org.hibernate.LockMode;
 8import org.hibernate.Transaction;
 9import org.hibernate.Session;
10import org.hibernate.Hibernate;
11import org.hibernate.lob.SerializableBlob;
12import org.hibernate.lob.SerializableClob;
13
14
15public class test1 {
16
17        /**
18         * @param args
19         */

20        static Session session = HibernateSessionFactory.currentSession();
21        
22        public boolean inserted(TStu obj){
23                
24                Transaction tran = session.beginTransaction();
25                session.save(obj);
26                session.flush();
27                session.refresh(obj,LockMode.UPGRADE);
28                try
29                {
30                SerializableBlob sb = (SerializableBlob)obj.getImg();
31                java.sql.Blob wrapblob = sb.getWrappedBlob();
32                if(wrapblob instanceof oracle.sql.BLOB){
33                         oracle.sql.BLOB blob = (oracle.sql.BLOB) wrapblob;
34                OutputStream bout = blob.getBinaryOutputStream();
35                FileInputStream fin = new FileInputStream("d:\\a.jpg");//修改你要存入的图?/SPAN>
36                byte [] buf = new byte[10240];//做ؓ10K的缓存写?/SPAN>
37                int len;
38                while((len = fin.read(buf))>0){
39                        bout.write(buf,0,len);
40                }

41                bout.close();
42                fin.close();
43                }

44                
45                SerializableClob  sc = (SerializableClob)obj.getResu();
46                Clob wrapclob = sc.getWrappedClob();
47                if(wrapclob instanceof CLOB){
48                        CLOB clob = (CLOB)wrapclob; 
49                        Writer cout = clob.getCharacterOutputStream();
50                        File file = new File("C:\\log_2005_8.txt");//修改你要存如的文?/SPAN>
51                        FileInputStream fin = new FileInputStream(file);
52                        int read;
53                        while((read = fin.read())!= -1){
54                                cout.write(read);
55                        }

56                        fin.close();
57                        cout.close();
58                }

59                
60                tran.commit();
61                return true;
62                }
catch(Exception ex){
63                        ex.printStackTrace();
64                        tran.rollback();
65                        return false;
66                }

67        }

68        
69        public static void main(String[] args) {
70                // TODO Auto-generated method stub         
71                test1 t = new test1();
72                 TStu stu = new TStu();
73                 stu.setAge(new Integer("23"));
74                 stu.setName("lilei");
75                 stu.setImg(Hibernate.createBlob(new byte[1]));
76                 stu.setResu(Hibernate.createClob(" "));
77                 t.inserted(stu);        
78        }

79}

80
81



org link: http://www.matrix.org.cn/thread.shtml?topicId=27138&forumId=23


]]>
վ֩ģ壺 һѹۿ| ѹƵ| ˾Ʒ| 77777ҹþö| Ļ| ɫ޵һ| ۺѾƷþþ| Ƶ69| av| ޾ƷۺϾþĻ| Ʒרһ| ձһ| ַѹۿ | պשר2020| ۺպþóAV| ѹۿƵ| һ˿ѸƵձ| Ƭ91Ʒѹۿ| ޹һƵվ| ձ߹ۿַ| һ3Ƶ| ˳Ƶվ| Ů߲| һ| һƵǿŮ | þAV뾫Ʒɫҹ鶹| С˵ɫͼ| ƷһVR| 77777ҹþö| avרԭ| þù߳׽ѹۿ | ޾Ʒҹר| avר߹ۿ| Ļ| ˳һ| ɫ޵һ| ˬִ̼APP| AVƬɫ߹ۿ| һػaƬ| պѸƵ| ŷ޹Ʒ㽶|