[cdi-dev] [JBoss JIRA] (CDI-404) adding bean-defining annotations for Interceptor while setting bean-discovery-mode="annotated"

Martin Kouba (JIRA) jira-events at lists.jboss.org
Tue Sep 24 09:49:45 EDT 2013


    [ https://issues.jboss.org/browse/CDI-404?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12806934#comment-12806934 ] 

Martin Kouba commented on CDI-404:
----------------------------------

Just a note: although it's not very clear from the spec, interceptors are beans with scope {{@Dependent}}. See CDI spec, 6.4.1 Dependent objects:
{quote}
Many instances of beans with scope @Dependent belong to some other bean or Java EE component class instance and are called dependent objects.
* Instances of decorators and interceptors are dependent objects of the bean instance they decorate.
* ...
{quote}
So an interceptor from implicit bean archive should explicitly declare {{@Dependent}} scope to be processed by the container.

Nevertheless making {{javax.interceptor.Interceptor}} a bean defining annotation might be a good idea...
                
> adding  bean-defining annotations for Interceptor while setting bean-discovery-mode="annotated"
> -----------------------------------------------------------------------------------------------
>
>                 Key: CDI-404
>                 URL: https://issues.jboss.org/browse/CDI-404
>             Project: CDI Specification Issues
>          Issue Type: Feature Request
>          Components: Beans
>    Affects Versions: 1.1.PFD
>            Reporter: Tang Yong
>
> [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.
> [1]:https://java.net/jira/browse/GLASSFISH-20667
> [2]:http://stackoverflow.com/questions/17258639/interceptor-issue-with-java-ee7
> About detailed discussion, please seeing the following,
> https://java.net/projects/javaee-spec/lists/users/archive/2013-09/message/7

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the cdi-dev mailing list