Hi!

I tried to create a CDI Interceptor where the @Interceptor class defines
@AroundInvoke and @AroundTimeout methods and then I tried to annotate:

1. The onMessage method of an MDB AND
2. The timeout (@Schedule annotated method) method of an EJB timer

The CDI Interceptor is not invoked.

If I instead use an EJB Inteceptor it is invoked in both cases above.

Questions:

1. I have only tried this in WebSphere so far. Is this out of spec or
something that should be bugreported (does it work in TomEE)?
2. My reason for using CDI Interceptors is that I can separate the
@InterceptorBinding annotation from the @Interceptor implementation class.
This way there is only a compile time dependency to the @InterceptorBinding
annotation. Is there a way to accomplish the same using EJB?

Regards
Lars-Fredrik



-- 
Med vänlig hälsning / Best regards

Lars-Fredrik Smedberg

STATEMENT OF CONFIDENTIALITY:
The information contained in this electronic message and any
attachments to this message are intended for the exclusive use of the
address(es) and may contain confidential or privileged information. If
you are not the intended recipient, please notify Lars-Fredrik Smedberg
immediately at [email protected], and destroy all copies of this
message and any attachments.

Reply via email to