[cdi-dev] [JBoss JIRA] (CDI-491) Clarify what happens when an interceptor doesn't have any @AroundInvoke or lifecycle annotation

Martin Kouba (JIRA) issues at jboss.org
Wed Nov 5 04:48:35 EST 2014


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

Martin Kouba commented on CDI-491:
----------------------------------

I believe this should be clarified in the Interceptors spec.

> Clarify what happens when an interceptor doesn't have any @AroundInvoke or lifecycle annotation
> -----------------------------------------------------------------------------------------------
>
>                 Key: CDI-491
>                 URL: https://issues.jboss.org/browse/CDI-491
>             Project: CDI Specification Issues
>          Issue Type: Clarification
>          Components: Interceptors
>    Affects Versions: 1.2.Final
>            Reporter: Antonio Goncalves
>
> At the moment, if you enable an interceptor in {{beans.xml}} and the class is not annotated with {{@Inteceptor}}, WELD throws an exception. But if the interceptor has no {{@AroundInvoke}}, {{@AroundConstrcut}}, {{@PostConstruct}} or {{@PreDestroy}}, then WELD stays silent and the interceptor doesn't work.
> The spec should clarify that, at least, one of these four annotation has to be used otherwise it's not considered a valid interceptor.



--
This message was sent by Atlassian JIRA
(v6.3.1#6329)


More information about the cdi-dev mailing list