[cdi-dev] [JBoss JIRA] (CDI-339) Interceptor ordering ambiguous

Martin Kouba (JIRA) jira-events at lists.jboss.org
Wed Mar 6 02:34:56 EST 2013


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

Martin Kouba commented on CDI-339:
----------------------------------

I think this is covered in the Java Interceptors 1.2 spec, 5.1 "Defining Interceptor Order":
{quote}
Interceptors declared using interceptor bindings are called after interceptors declared using the {{Interceptors}} annotation (or using the corresponding element of a deployment descriptor) and before any around-invoke, around-timeout, or lifecycle event callback methods declared on the target class or any superclass of the target class.
{quote}
But yes, it could make more sense to only specify interceptors enabled using {{@Priority}} are called before interceptors enabled using beans.xml.

                
> Interceptor ordering ambiguous
> ------------------------------
>
>                 Key: CDI-339
>                 URL: https://issues.jboss.org/browse/CDI-339
>             Project: CDI Specification Issues
>          Issue Type: Clarification
>          Components: Interceptors
>    Affects Versions: 1.1.PFD
>            Reporter: Jozef Hartinger
>            Assignee: Pete Muir
>             Fix For: 1.1.FD
>
>
> {quote}
> Interceptors declared using @Interceptors, declared in ejb-jar.xml or enabled using @Priority are called before
> interceptors enabled using beans.xml.
> {quote}
> The statement does not provide an absolute ordering of the various types of interceptor enablement but only a partial one that states that interceptors enabled using beans.xml are called last.
> To make this section clear the specification should either:
> a) only state the order of @Priority interceptors relatively to beans.xml interceptors (the rest can be implied from the interceptors spec), or
> b) provide absolute ordering between @Interceptors, ejb-jar.xml, @Priority and beans.xml types of interceptor enablement

--
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