0
@Named
@ConversationScoped
@Interceptors(MyInterceptor.class)
public class BeanWeb implements Serializable {
public String methodThrowException throws Exception() {
throws new Exception();
}
}
public class MyInterceptor {
@AroundInvoke
public Object intercept(InvocationContext ic) throws Exception {
try {
return ic.proceed();
} catch (Exception e) {
return null;
}
}
}
JSF页面对于@Stateless豆拦截工作,但对于BeanWeb拦截不起作用。而我们从未进入过“拦截”的方式。@Intertceptors不适用于网络豆连续工作
- 这是怎么发生的?
- 如何拦截BeanWeb中的方法调用?
P.S .:所有这些都在Glassfish 3.x下旋转。