[cdi-dev] [JBoss JIRA] (CDI-352) Clarify whether an interceptor/decorator enabled for a bean archive must be packaged in a bean archive

Mark Struberg (JIRA) jira-events at lists.jboss.org
Wed Mar 13 14:14:42 EDT 2013

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

Mark Struberg commented on CDI-352:

Interceptors, Decorators, ProducerMethods, ProducerFields etc all only can get built up _after_ the bean discovery is done. The reason is that enabled/disabled beans can heavily influence the resolution. Doing this _during_ PAT would create stochastic behaviour which depends on the order in which the classes get scanned. Thus you cannot make the classes which need to get scanned depending on any of those mechanisms.

For Interceptors it's specially bad as there is CDI-style (@InterceptorBinding) and EJB-style (@Interceptors). All compatibility bets are off once you leave a jar with a beans.xml in it...
> Clarify whether an interceptor/decorator enabled for a bean archive must be packaged in a bean archive
> ------------------------------------------------------------------------------------------------------
>                 Key: CDI-352
>                 URL: https://issues.jboss.org/browse/CDI-352
>             Project: CDI Specification Issues
>          Issue Type: Clarification
>          Components: Decorators, Interceptors
>    Affects Versions: 1.1.PFD
>            Reporter: Jozef Hartinger
>            Assignee: Pete Muir
>            Priority: Blocker
>             Fix For: 1.1.FD
> There is a TCK test in which an archive with the beans.xml file enables an interceptor (by listing the interceptor class name in beans.xml). The interceptor class is packaged in another library archive which is not a bean archive. It is not clear from the specification if an interceptor bound using interceptor bindings may only be packaged in a bean archive or whether a CDI implementation should pull the interceptor definition based on the declaration in the beans.xml file even if the interceptor is outside of a bean archive.

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