import org.jboss.aop.joinpoint.Invocation; /* * JBoss, the OpenSource J2EE webOS * * Distributable under LGPL license. * See terms of license at gnu.org. */ /** * * @author Kabir Khan * @version $Revision: 1.1 $ */ public class TestAspect { public Object advice(Invocation invocation)throws Throwable { try { System.out.println("<<< Entering TestAspect.advice type:" + invocation); return invocation.invokeNext(); } finally { System.out.println("<<< Leaving TestAspect.advice type:" + invocation); } } public Object otherAdvice(Invocation invocation)throws Throwable { try { System.out.println("<<< Entering TestAspect.otherAdvice type:" + invocation); return invocation.invokeNext(); } finally { System.out.println("<<< Leaving TestAspect.otherAdvice type:" + invocation); } } }