users@javaee-spec.java.net

[javaee-spec users] Re: About bean-discovery-mode="annotated" from CDI 1.1

From: Bill Shannon <bill.shannon_at_oracle.com>
Date: Mon, 23 Sep 2013 15:28:36 -0700

This is really a CDI question, probably better addressed to the CDI spec lead...

As I understand it, bean-discovery-mode="annotated" means you only want to
find bean classes that have been annotated with bean-defining annotations
(Just scopes, as far as I can tell). Interceptors are beans, so, if you want
your interceptor to be found in this case, you need to give it a scope, e.g.,
@Dependent.

Are you just asking that @Interceptor be considered a bean-defining annotation?

Tang Yong wrote on 09/22/13 20:20:
> Hello Bill
>
> Recently, [1] and [2] has reported an issue about
> bean-discovery-mode="annotated". Although there are some workarounds for
> the issue, I think that in the future, we should support interceptor
> implict scanning while an user uses bean-discovery-mode="annotated".
>
> Apparently, just as bean-discovery-mode="annotated", CDI Spec and
> Interceptor Spec are disconnected.
>
> Wish to listen to your comment.
>
> [1]:https://java.net/jira/browse/GLASSFISH-20667
> [2]:http://stackoverflow.com/questions/17258639/interceptor-issue-with-java-ee7
>
> Thanks
> Tang
>