|
From: Rod J. <rod...@in...> - 2003-07-23 19:19:26
|
All, You'll recall that AOP Alliance and AOPI merged a month or so ago. The result has been some changes to the old AOP Alliance interfaces, which Spring 0.9 implements. These changes don't really affect how things work, just package and method naming. I've just checked in the necessary changes (and current AOP Alliance jar). This will break any interceptors you have. However, it's easy to make the changes. In nearly all cases, it will involve 2 easy steps: 1. imports org.aopalliance.* -> org.aopalliance.intercept.* 2. MethodInvocation.invokeNext() -> proceed(). This is more in line with AOP terminology, and still intelligible to us J2EE folk. I was able to migrate my code in projects using Spring AOP in minutes, including my interceptors. (The changes shouldn't affect you if you haven't written your own interceptors). **** NB: Clean before rebuilding your local copy of Spring. I really like the new AOP Alliance APIs. I think they're very powerful and quite elegant. As an added bonus, I've checked in a regular expression pointcut: com.interface21.aop.framework.RegexpMethodPointcut Set a Perl5 reg exp (such as ".*set.*") as the "pattern" property and an interceptor ref as the "interceptor" property and drop the regexp pointcut name in your interceptor names for your ProxyFactoryBean and you're all set. This depends on Jakarta ORO. I chose this because Struts uses it and it seems to work well. If anyone objects strongly to this choice of reg exp (obviously we can't go to 1.4 yet) please let me know. I've also recently introduced a distinction between static and dynamic pointcuts. Static pointcuts depend on the method invoked and perhaps attributes; dynamic pointcuts also get to see the arguments. The WildcardAttributeRegistry is a move towards a better attributes solution, although I'm still keen to pursue source-level attributes. I would love a volunteer to help drive the attributes side of things as my time is limited. Regards, Rod |