[cdi-dev] self interception for CDI beans
Stuart Douglas
stuart.w.douglas at gmail.com
Wed Jan 9 05:43:48 EST 2013
AFAIK this is actually defined in the interceptors spec, which the CDI
spec references, so this should also apply to CDI beans.
Stuart
Mark Struberg wrote:
> Hi!
>
> For EJBs there is a 'self-interception' defined. E.g.
>
> @Stateless
> public class MyEjb {
> public String someBusinessMehod() {
> returns "Schneewittchen";
> }
>
> @AroundInvoke
> public Object interceptMe(InvocationContext ic) throws Exception {
> System.out.println("got intercepted");
>
> return ic.proceed();
> }
>
> }
>
>
> But should the same trick also work for CDI beans when replacing @Stateless with @SessionScoped ?
>
>
> LieGrue,
> strub
>
>
> _______________________________________________
> cdi-dev mailing list
> cdi-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/cdi-dev
More information about the cdi-dev
mailing list