[cdi-dev] [JBoss JIRA] (CDI-491) Clarify what happens when an interceptor doesn't have any @AroundInvoke or lifecycle annotation
Antoine Sabot-Durand (JIRA)
issues at jboss.org
Wed Jan 7 08:16:29 EST 2015
[ https://issues.jboss.org/browse/CDI-491?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13030524#comment-13030524 ]
Antoine Sabot-Durand commented on CDI-491:
------------------------------------------
I agree with [~mkouba]. Currently interceptor spec states in 2.1
{quote}
An around-invoke interceptor method, an around-timeout interceptor method, and lifecycle callback interceptor methods for different lifecycle events may be defined on the same interceptor class. An interceptor class may have superclasses.
{quote}
The interceptor spec doesn't forbid to have an interceptor class without lifecycle callback or {{@AroundInvoke}}. Clarification should be made in it.
> 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.11#6341)
More information about the cdi-dev
mailing list