[转载] Rod Johnson关于AOP Transaction的一段文字

原创 2004年07月10日 15:41:00
[原作者] Rod Johnson
[链接]     http://www.theserverside.com/news/thread.tss?thread_id=27208#129224
[点评]    SpringFramework的奠基者、领导者和主要开发者之一的Rod Johnson,说出来的话自然有些分量,虽然这段话只是在回答别人问题的时候说的,但其中包含了很多信息,如下:
  •  Spring的AOP对于Transaction managment来说,由于目前所见到的AspectJ的Transaction实现;
  •  Spring 1.1中将整合对AspectJ的支持,非常棒!
  •  Spring 1.1 RC1将很快发布,很有可能在下周的周末,值得期待。
[原文]

Jacob
I recently read AspectJ in Action from Manning Press. It discusses transactions too, but through AspectJ and the resulting efforts are not container dependent. I think that Spring as an IoC container is great, but if people want Aspect Oriented features, just do yourself a favor and learn AspectJ in Eclipse with the AJDT plugin. None of this runtime Proxy of Proxy of InvocationHandler stuff to slow down your application.
Rod 的回答:
AspectJ is a great language: no argument there. I also like Laddad's book. But AspectJ is not the perfect solution to all AOP problems, and often simpler, lower-tech, solutions are compelling.

Transaction management is a case in point. For a lot of middleware aspects, which typically require only method interception, AspectJ's full power doesn't come into play, and it has no great advantage over Spring AOP, DynAOP or another proxy based framework. For example, Laddad's book is excellent, but the transaction examples are just that--examples of how you might start work on transaction management in AspectJ. Spring's transaction interception is way more powerful than anything I've seen implemented using AspectJ. Of course you can implement whatever sophisticated of transaction interception you like with AspectJ--it's just that what really matters is how you abstract the underlying transaction infrastructure, not what AOP framework you use. The performance overhead of a proxy-based approach is insigificant in such cases.

So there is a valid case for the subset of AOP that proxy-based solutions provide. (Also they can do one or two things that are hard to do with "full-blown AOP," such as maintain different advice for different objects of the same class.)

Having said that, I believe that AspectJ is going to become increasingly important as we come to understand the full implications of AOP. So one of the major features in Spring 1.1 is AspectJ integration. This will allow AspectJ aspects to be configured by the Spring IoC container using Dependency Injection, which brings similar benefits to applying DI for classes. Both Adrian Colyer and I are very excited about this, and both Spring and AspectJ teams are working together. Support for the core AspectJ integration is already in Spring CVS and will be released with Spring 1.1 RC1 (probably end of next week). I'm also working on some samples, which will probably be released separately slightly later. The Spring/AspectJ integration opens up some interesting possibilities.

Beyond that, we're looking at using AspectJ pointcuts to target Spring AOP advice. This relies on AspectJ changes--they are going to expose an API for Spring and other tools to use at runtime.

Another interesting area is implementing Spring services as "native" AspectJ aspects. Thus we'll provide a transaction aspect, probably in the Spring 1.2 timeframe, although I might release it with the samples.

Rgds
Rod

Rod Johnson从VMware离职,Spring Framework将何去何从?

本文来源于我在InfoQ中文站翻译的文章,原文地址是:http://www.infoq.com/cn/news/2012/07/johnson-leaves-vmware近日,Spring Frame...
  • ricohzhanglong
  • ricohzhanglong
  • 2012年07月14日 13:23
  • 2803

Rod Johnson简介

From:http://www.springframework.com/people/rod.html       Rod 是Spring的缔造者,Spring开源项目开启于2003年2月,并基于此出...
  • rjohnson
  • rjohnson
  • 2006年09月20日 14:33
  • 16473

Spring中的Rod Johnson 与“轮子理论”

  Rod Johnson 是Spring Framework的创建者,也是Java和J2EE领域中的知名专家。Rod是 Interface21公司的CEO,该公司是一家致力于提供专业级J2EE和Sp...
  • easyjf
  • easyjf
  • 2006年06月15日 19:07
  • 3810

Spring简介(Rod Johnson)

Spring简介 关于Spring Framework,今年夏天你可能已经听见很多的议论。在本文中,我将试图解释Spring能完成什么,和我怎么会认为它能帮助你开发J2EE应用程序。 另一framew...
  • acoolboy1984
  • acoolboy1984
  • 2005年10月21日 09:27
  • 2894

Spring的创始人Rod Johnson访谈

英文原文出处:http://www.infoworld.com/article/06/03/29/76918_HNrodjohnson_1.html  第一次尝试翻译,多多指教!在上周的TheServ...
  • killme2008
  • killme2008
  • 2006年04月12日 21:51
  • 1581

Rod Johnson 05年对EJB的评价,又是一个7年过去了,EJB还好吗?

EJB的七年之痒                                  作者/Rod Johnson             曾几何时,EJB被人们当做J2EE的核心而顶礼膜拜...
  • wqi1917
  • wqi1917
  • 2012年09月11日 11:38
  • 1356

Spring之父Rod Johnson

Rod在悉尼大学不仅获得了计算机学位,同时还获得了音乐学位。更令人吃惊的是在回到软件开发领域之前,他还获得了音乐学的博士学位。有着相当丰富的C/C++技术背景的Rod早在1996年就开始了对Java服...
  • huaweitman
  • huaweitman
  • 2017年10月25日 19:11
  • 276

Rod Johnson简介

From:http://www.springframework.com/people/rod.html       Rod 是Spring的缔造者,Spring开源项目开启于2003年2月,并基于...
  • itkbase
  • itkbase
  • 2008年03月11日 15:49
  • 213

Spring简介(Rod Johnson)

Spring简介 关于Spring Framework,今年夏天你可能已经听见很多的议论。在本文中,我将试图解释Spring能完成什么,和我怎么会认为它能帮助你开发J2EE应用程序。 另一framew...
  • fgs2008
  • fgs2008
  • 2005年10月22日 11:51
  • 571

人物谱--Rod Johnson

第一次看到Rod Johnson是在Wrox的Professional JSP第二版的封面上,以前怎么也没能封面右上角的那个秃顶的小人头和今天整个J2EE轻量容器革命和java open source...
  • acoolboy1984
  • acoolboy1984
  • 2005年10月21日 09:25
  • 2033
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:[转载] Rod Johnson关于AOP Transaction的一段文字
举报原因:
原因补充:

(最多只允许输入30个字)