aspectj and sprint AOP

"Scattering" is when similar code is distributed throughout many program modules. This differs from a component being used by many other components since it involves the risk of misuse at each point and of inconsistencies across all points. Changes to the implementation may require finding and editing all affected code.

"Tangling" is when two or more concerns are implemented in the same body of code or component, making it more difficult to understand. Changes to one implementation may cause unintended changes to other tangled concerns.

"Crosscutting" is how to characterize a concern than spans multiple units of OO modularity – classes and objects. Crosscutting concerns resist modularization using normal OO constructs, but aspect-oriented programs can modularize crosscutting concerns.

Using the AspectJ compiler and weaver enables use of the full AspectJ language

 

6.2.1. Enabling @AspectJ Support

 

Because we want to retry the operation, we will need to use around advice so that we can call proceed multiple times. Here’s how the basic aspect implementation looks:

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a comment