Simple logging made with AspectJ. In this example I log sorting service.
Simple caching made with AspectJ and Annotation. In this example I cache sum of 2 numbers.
AspectJ is a Java extension for AOP. In this particular project it is made just by using 2 jar files. Moreabout on official web pages http://eclipse.org/aspectj/doc/released/faq.php#q:whatisaj for AspectJ.
Thanks to this tutorial http://www.andrewewhite.net/wordpress/2010/03/17/aspectj-annotation-tutorial/ there is just a few ways to get confused with.
Thanks to this tutorial http://urmincek.wordpress.com/2009/09/06/simple-caching-with-aspectj/ there was no problems with caching example.