1 22 package org.jboss.test.aop.scope; 23 24 import org.jboss.aop.advice.Interceptor; 25 import org.jboss.aop.joinpoint.Invocation; 26 27 32 public class CopyInterceptor implements Interceptor 33 { 34 public String getName() 35 { 36 return "CopyInterceptor"; 37 } 38 39 public Object invoke(Invocation invocation) throws Throwable  40 { 41 System.out.println("CopyInterceptor invoking on original"); 42 invocation.invokeNext(); 43 System.out.println("CopyInterceptor invoking on copy"); 44 Invocation copy = invocation.copy(); 45 return copy.invokeNext(); 46 } 47 48 49 } 50 | Popular Tags |