1 25 26 package org.objectweb.easybeans.tests.enhancer.interceptors.business.bean; 27 28 import java.util.Map ; 29 30 import javax.interceptor.AroundInvoke; 31 import javax.interceptor.InvocationContext; 32 33 34 38 public class Interceptor { 39 40 45 @AroundInvoke 46 @SuppressWarnings ("unchecked") 47 public Object outsideIntercepted(final InvocationContext invocationContext) throws Exception { 48 Object o = invocationContext.getTarget(); 49 50 if (o instanceof StatelessBean) { 51 StatelessBean bean = (StatelessBean) o; 52 bean.incrementOtherInterceptorCounter(); 53 } 54 55 Map contextData = invocationContext.getContextData(); 57 contextData.put("KEY", "TEST"); 58 59 return invocationContext.proceed(); 60 } 61 } 62 | Popular Tags |