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

John Ament (JIRA) issues at jboss.org
Mon Oct 16 07:27:01 EDT 2017


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

John Ament commented on CDI-468:
--------------------------------

[~mkouba] I'm not sure TBH.  I think one way to solve it is to get access to the interceptor binding that caused the current interceptor to be invoked.  It shouldn't matter if:

- The interceptor binding was added directly to the class OR
- It was added programmatically via {{InterceptionFactory}} OR
- It was added programmatically via an {{Extension}} OR
- It was added via a {{Stereotype}}

I would hope it's a seamless experience.  I just want the current interceptor binding, and that's all I really need.

> 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.1 (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
(v7.5.0#75005)


More information about the cdi-dev mailing list