Chapter 11. Policy enforcement: keeping your design intact

This chapter covers

  • Understanding AOP policy enforcement patterns

  • Enforcing EJB programming restrictions using AspectJ

  • Enforcing Swing policies using AspectJ

Imagine that you're convinced public access to a data member of a class isn't a good idea. Or, imagine that you've realized layered architecture is the way to go. Or, suppose you've just finished reading the Enterprise JavaBeans (EJB) specification and realize that the specification prohibits working directly with files from an EJB. Clearly, you'd like to ensure that the projects you work on don't violate these principles and restrictions. What are your choices? You could send emails to your team asking them to check for these violations, ...

Get AspectJ in Action, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.