Thanks Everybody,
I am very delighted to be here and discuss your AOP/AspectJ questions.
About Ant Burge's question:
Crosscutting concerns � requirement, design, or implementation that span multiple modules are abound in practice: logging, tracing, dynamic profiling, service-level agreement, policy enforcement, pooling, caching, concurrency control, security, transaction management, business rules, and so forth. Traditional implementation of these concerns requires you to fuse their implementation with the core concern of a module. For example, a simple Account class may incorporate some code to address all of the above concerns. With aspect-oriented programming, you can implement each of the concern in a separate module called aspect.
Consider logging concern as an example. Traditional implementation may look something like:
With AspectJ, you can keep you core classes oblivious of logging:
That�s it. You can put this aspect into any Java program, compile using AspectJ compiler, and start seeing log output generated (which will be the same as the output generated by traditional implementation).
Now imagine a typical project with 100s, if not 1000s of classes and imagine a typical project with many other crosscutting present in a system. AspectJ can make life vastly simple by separating each individual concerns away from core business logic. Please read sample chapters (
http://www.manning.com/laddad).
-Ramnivas