The other reason I am writing is because I wanted to pass along how I have been using AOP here at Kronos.

The most interesting and promising (in the sense that it might be adopted) prototype I have developed involved using Aspects to add JMX monitoring to an application. I prototyped a load time weaving version that injected monitoring of concurrent users, average session times, etc. into a released version of our product. And I also prototyped a version that used @Annotations to mark the classes and methods to be monitored, and compile time weaving to pick out the annotations with pointcuts. This would work well as an example for the lab, and I think a nice concrete example of the application of the technology.

Another project involved using Aspects to perform static code analysis - I used the Aspects to map package dependency in current application, and then made a Viso diagram of very complicated dependency relationships to emphasize the point. I have also had thoughts about using Aspects to enforce coding practices, such as enforcing the use of a well defined public interface to packages vs. a private interface. Many of the complicated dependency relationships discovered in the package analysis project I mentioned earlier were due to incorrect use of the packages of code by developers external to those packages (with 650+ engineers that is a hard thing to control). It would be nice to be able to enforce some basic development principles, and I think this can be accomplished nicely with the AspectJ declare error and warning mechanisms.

Paul Freeman, Senior Software Engineer, Kronos Labs, January 2008

Note by Paul: I have received the OK from my manager that it would be fine if you mention the work I described below to your students, using both my name and Kronos' name as long as you clarify that this is prototype work and that it doesn't exist in the released product.