1 22 package org.jboss.ejb3.test.stateful; 23 24 import javax.interceptor.AroundInvoke; 25 import javax.interceptor.InvocationContext; 26 27 33 public class MyInterceptor 34 { 35 Object field; 36 37 @AroundInvoke 38 public Object invoke(InvocationContext ctx) throws Exception  39 { 40 if (ctx.getMethod().getName().startsWith("set")) 41 { 42 field = ctx.getParameters()[0]; 43 return null; 44 } 45 return field; 46 } 47 } 48 | Popular Tags |