Sunday, March 20, 2005

Annotations & JBoss AOP Example

The last couple of month I read a lot about Aspect Oriented Programming - AOP, about various frameworks and different approaches. Basically, I've always assessed AOP as good, but rather difficult to apply. When I read an article about applying AOP, by using the new Java 5 language feature Annotations, I was all for it!

JBoss AOP framework provides the opportunity to use Annotations for applying aspect oriented programming. But not only can you mark methods or fields with an Annotations, so that the aspect is being applied to it, but you can also configure aspects and pointcuts using Java's new language feature.

To familiarize myself with these techniques, I made a small example. I implemented a logging functionality and a dependency injection using JBoss AOP and Annotations. For further details, check the readme file that comes along with my example. It is available through bittorrent and my download site.

No comments: