1 22 package org.jboss.test.aop.jdk15.annotated; 23 24 import org.jboss.aop.Aspect; 25 import org.jboss.aop.Bind; 26 import org.jboss.aop.joinpoint.Invocation; 27 32 @Aspect (scope=org.jboss.aop.advice.Scope.PER_VM) 33 public class PrecedenceAspect1 34 { 35 @Bind (pointcut="execution(* org.jboss.test.aop.jdk15.annotated.VariaPOJO->precedenceMethod())") 36 public Object advice1(Invocation invocation) throws Throwable 37 { 38 Interceptions.add("PrecedenceAspect1.advice1"); 39 System.out.println("PrecedenceAspect1.advice1"); 40 return invocation.invokeNext(); 41 } 42 43 @Bind (pointcut="execution(* org.jboss.test.aop.jdk15.annotated.VariaPOJO->precedenceMethod())") 44 public Object advice2(Invocation invocation) throws Throwable 45 { 46 Interceptions.add("PrecedenceAspect1.advice2"); 47 System.out.println("PrecedenceAspect1.advice2"); 48 return invocation.invokeNext(); 49 } 50 } | Popular Tags |