concept policy - enforcement aspect in category aspectj

This is an excerpt from Manning's book AspectJ in Action, Second Edition.
As you introduce AOP to your project, one of the problems you can face is resistance to committing to it. People will demand proof that AOP is worth the perceived effort and complexity. This can become a Catch 22 situation—you can’t show its usefulness to your project because you can’t use it, and you won’t be able to use it unless you show its usefulness. Well, policy enforcement offers you a way to overcome this issue. Even if your organization or team isn’t yet committed to AOP, you can still use AOP-based enforcement to improve your personal productivity. Then, you can show others what you’ve gained. If that convinces your colleagues about the benefits that AOP offers, good. Otherwise, continue using the aspects in your own development world, and exclude them in the final builds. The plug-and-play nature of policy-enforcement aspects provides you an opportunity to play with AOP without requiring a full commitment.
Start with the aspects presented in this chapter. The next time you encounter a novel programming wisdom or best practice, consider writing an enforcement aspect encapsulating the knowledge. Over time, you’ll have a repository of policy-enforcement aspects that will help you in all your projects. When you start using a new framework, you can create policy-enforcement aspects specifically targeted to the framework. If you’re in a mentoring role, you can provide your aspects to your team. You’ll then no longer have to sit down and repeat the policies with each team member.
AOP offers a simple and yet powerful way of implementing system-wide policy-enforcement concerns. The policy-enforcement aspects you develop are reusable, lowering your per-project development cost. These aspects use the AspectJ compiler to enforce as many policies as possible at compile time and use dynamic crosscutting to understand the runtime violations in more detail. You can even use Spring AOP to implement certain runtime policy enforcements. With such aspects in place, you’re assured of better-quality code, and you can spend your time on more exciting issues. Note, though, that the mechanisms presented here don’t substitute for code reviews. But with policy enforcement in place, the code reviews can focus on the subtler nuances of design and implementations.
A first step in implementing a policy-enforcement aspect is to identify the target classes. For EJB 3, that also presents a first challenge. EJB 3 has two options to implement EJBs: using annotations or using XML. In either approach, EJBs no longer need to implement any specific interfaces or extend specific classes. With annotation-based EJBs, identifying the classes implementing EJBs is easy. But the AspectJ compiler can’t check deployment descriptors to identify the EJB classes.