1 22 23 import org.jboss.aop.joinpoint.Invocation; 24 25 30 public class TestAspect 31 { 32 public Object advice(Invocation invocation)throws Throwable 33 { 34 try 35 { 36 System.out.println("<<< Entering TestAspect.advice type:" + invocation); 37 return invocation.invokeNext(); 38 } 39 finally 40 { 41 System.out.println("<<< Leaving TestAspect.advice type:" + invocation); 42 } 43 } 44 45 public Object otherAdvice(Invocation invocation)throws Throwable 46 { 47 try 48 { 49 System.out.println("<<< Entering TestAspect.otherAdvice type:" + invocation); 50 return invocation.invokeNext(); 51 } 52 finally 53 { 54 System.out.println("<<< Leaving TestAspect.otherAdvice type:" + invocation); 55 } 56 } 57 58 } 59 | Popular Tags |