﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>BlogJava-2001年10月2日-文章分类-Hibernate专题</title><link>http://www.blogjava.net/thomaschen75/category/1109.html</link><description>在这天，我选择了生命中的另一半。:::执子之手，与子偕老:::</description><language>zh-cn</language><lastBuildDate>Thu, 01 Mar 2007 18:26:18 GMT</lastBuildDate><pubDate>Thu, 01 Mar 2007 18:26:18 GMT</pubDate><ttl>60</ttl><item><title>Spring的Transacion机制</title><link>http://www.blogjava.net/thomaschen75/articles/3608.html</link><dc:creator>我是一只小小鸟，片刻的小憩，是为了更好的飞翔......</dc:creator><author>我是一只小小鸟，片刻的小憩，是为了更好的飞翔......</author><pubDate>Fri, 22 Apr 2005 04:55:00 GMT</pubDate><guid>http://www.blogjava.net/thomaschen75/articles/3608.html</guid><wfw:comment>http://www.blogjava.net/thomaschen75/comments/3608.html</wfw:comment><comments>http://www.blogjava.net/thomaschen75/articles/3608.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/thomaschen75/comments/commentRss/3608.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/thomaschen75/services/trackbacks/3608.html</trackback:ping><description><![CDATA[<H4 align=center><FONT face="Courier New">Spring的transaction机制</FONT></H4>
<P><STRONG>1. Spring transaction机制的特点</STRONG><BR>第一：Spring支持2种transaction管理机制，一种是声明性的管理机制；另一种是编程管理方式；Spring是目前除了EJB Container之外，我所知道的唯一的能做到这点的Framework。在编程管理方式中，Spring利用Template设计模式，极大的简化了代码中transation管理相关的代码；Spring利用AOP方式实现了声明性的Transaction管理。<BR><BR>第二：Spring的transaction模型采取的是委托模型，Spring将实际的transaction的管理委托给底层的Persistence的组件来完成的。<BR><BR>2. Spring transaction的委托模型<BR>Spring拥有其他Persistence组件的强大的整合能力，在transaction这一块儿的处理上，Spring采用的是委托模型的形式，即将transaction相关的管理委托给底层的Persistence组件。例如：hibernate的transaction机制就是委托给hibernate本身来处理的。参见下图<BR></P>
<P align=center><IMG title="Platform-Specific Transaction Implements" height=461 alt="Platform-Specific Transaction Implements" src="http://www.blogjava.net/images/blogjava_net/thomaschen75/1116/r_spring%20transaction.gif" width=640 border=0></P>
<P><BR></P><img src ="http://www.blogjava.net/thomaschen75/aggbug/3608.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/thomaschen75/" target="_blank">我是一只小小鸟，片刻的小憩，是为了更好的飞翔......</a> 2005-04-22 12:55 <a href="http://www.blogjava.net/thomaschen75/articles/3608.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>