[cdi-dev] [JBoss JIRA] (CDI-468) Extend javax.interceptor.InvocationContext

Antoine Sabot-Durand (JIRA) issues at jboss.org
Tue Aug 2 06:25:00 EDT 2016


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

Antoine Sabot-Durand commented on CDI-468:
------------------------------------------

Guys, could be nice to add this to interceptor specification, but remember that we have the {{Interceptor}} bean that can be injected in any interceptor.

As described in the [spec|http://docs.jboss.org/cdi/spec/1.2/cdi-spec.html#interceptor] this bean gives access to the interceptors binding thru the {{getInterceptorBindings()}} method.



> Extend javax.interceptor.InvocationContext
> ------------------------------------------
>
>                 Key: CDI-468
>                 URL: https://issues.jboss.org/browse/CDI-468
>             Project: CDI Specification Issues
>          Issue Type: Feature Request
>            Reporter: Arne Limburg
>             Fix For: 2.0 (discussion)
>
>
> Currently there is no easy way to obtain the interceptor binding annotation for an interceptor call. The interceptor binding annotation is needed to access @Nonbinding attributes and behave accordingly.
> I propose to extend the javax.interceptor.InvocationContext interface with a method
> public Annotation getInterceptorBinding() or
> public <A extends Annotation> A getInterceptorBinding(Class<A> type)
> The @AroundInvoke method of CDI Interceptors may use this extended interface as parameter instead of the original one to obtain the interceptor binding annotation.



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)


More information about the cdi-dev mailing list