ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.

advertisement

AddThis Social Bookmark Button
Article:
  Introduction to Aspect-Oriented Programming
Subject:   help needed
Date:   2004-12-06 06:41:49
From:   grahamoregan
Response to: help needed

In the example above, any code that occurs above joinPoint.proceed() in the execute method will be performed before the method is invoked and anything that occurs below will happen after. So you could use



logger.info("Entering");
joinPoint.proceed();
logger.info("Exiting");


You can also use the joinPoint to get the name of the calling class and method and change the logging statements to reflect the real location.


HTH


Graham


1 to 1 of 1
1 to 1 of 1