@Intertceptors does not work for web bean for JSF page.
Posted
by Drevlyanin
on Stack Overflow
See other posts from Stack Overflow
or by Drevlyanin
Published on 2010-04-22T13:07:31Z
Indexed on
2010/04/22
13:43 UTC
Read the original article
Hit count: 188
@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;
}
}
}
For @Stateless beans interceptor works, but for the BeanWeb interceptor does not work. And we have never entered into "intercept" method.
- Why is this happening?
- How could intercept method calls in BeanWeb?
P.S.: All this spin under Glassfish 3.x.
© Stack Overflow or respective owner