Using Aspects to Work with Annotations
In this session, you will learn how to use Aspect-Oriented Programming (AOP) as a tool to avoid annotation hell by working effectively with Java 5 annotations (such as @Remote ). You will see simple and more advanced techniques to process custom annotations in a higher-level Java-like language, and how this compares to lower-level approaches like the Java Annotation Processing Tool. You will also see techniques for simplifying annotations, by providing application-specific default values and by deriving standard annotations used by frameworks like EJB 3, JAX-WS, and the Spring Framework from higher-level domain-specific annotations using AOP.
The session includes a short refresher on AspectJ, Spring AOP, and JBoss AOP and what AOP does more generally as an introduction to how it is useful when working with annotations, even with Java 1.4. It also concludes with an analysis of where and how you can use annotations with and without AOP.