This post originated from an RSS feed registered with Java Buzz
by dion.
Original Post: Spring Aspect Container with AspectWerkz too
Feed Title: techno.blog(Dion)
Feed URL: http://feeds.feedburner.com/dion
Feed Description: blogging about life the universe and everything tech
The Spring Framework seems to play nice. They have their own MVC framework, yet you can plugin any that you may wish (WebWork, Tapestry, Struts [sorry], etc).
There is a similar story with AOP. Spring has its own AOP, and an intro article was just published: An Introduction to Aspect-Oriented Programming with the Spring Framework, Part 1.
However you aren't stuck with the one AOP alternative (Spring AOP). There has been a lot of thought put into integrating with other AOP implementations.
Here Rod talks about this and AspectJ integration:
"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."
Well, there is also support for AspectWerkz AOP with Spring via the Spring Aspect Container
The Spring Aspect Container in AWare will make it possible to manage your aspects using Spring, it let's you treat the aspects just as any other Spring bean.
The container will read in a Spring configuration file called aware-config.xml, this file has to be on your classpath. In this file you can define your aspects, add parameters and data structures to them, pass in references to other components that is being used etc. This is for example documented briefly in the Role-Based Security section.
We are spoiled for choice :)