The Artima Developer Community
Sponsored Link

Java Buzz Forum
Spring AOP using AspectJ 5

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
dion

Posts: 5028
Nickname: dion
Registered: Feb, 2003

Dion Almaer is the Editor-in-Chief for TheServerSide.com, and is an enterprise Java evangelist
Spring AOP using AspectJ 5 Posted: Jan 24, 2005 8:50 PM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by dion.
Original Post: Spring AOP using AspectJ 5
Feed Title: techno.blog(Dion)
Feed URL: http://feeds.feedburner.com/dion
Feed Description: blogging about life the universe and everything tech
Latest Java Buzz Posts
Latest Java Buzz Posts by dion
Latest Posts From techno.blog(Dion)

Advertisement
Now AspectJ 5 has been announced, it seems to me a bit of a no-brainer for Spring to have full on support for the more advanced point-cuts of AspectJ/AspectWerkz. There has been various integration in the past, and I am sure there will be more in the future. To start with, Alex (of AspectWerkz/AspectJ 5) has written a new AspectWerkzPointcutAdvisor. So, take a look at before: <bean id="theMethodExecutionGetTargetAndArgsAroundAdvisor1" class="org.springframework.aop.support.RegexpMethodPointcutAdvisor"> <property name="advice"> <ref local="theMethodExecutionGetTargetAndArgsAroundAdvice"/> </property> <property name="pattern"> <value>.*aroundStackedWithArgAndTarget.*</value> </property> </bean> and now see how you can use the expressive pointcuts: <bean id="theMethodExecutionAfterThrowingAdvisor" class="awbench.spring.AspectWerkzPointcutAdvisor"> <property name="advice"> <ref local="theMethodExecutionAfterThrowingAdvice"/> </property> <property name="expression"> <value>execution(* *..*.afterThrowingRTE(..))</value> </property> </bean> In fact, my guess is that, as time goes on and more people get into the power of AOP... the standard Spring AOP will be displaced by the more powerful Spring-AspectJ style. However, Spring AOP has its uses, and it is great that you can chop and change so easily with Spring!

Read: Spring AOP using AspectJ 5

Topic: Faster stack traces Previous Topic   Next Topic Topic: Trails v .5 released

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use