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

Mark Struberg commented on CDI-18:
----------------------------------

This issue originates from the interceptor order problematic as discussed on 
the EG and weld-dev lists a year ago.

One possible solution would be to introduce 'ordinal' and 'enabled' attributes 
to the <interceptors>, <decorators> and <alternatives> sections like the 
following example shows:


<interceptors ordinal="32">
  <class>org.myclass.MyInterceptor3</class>
  <class>org.myclass.MyOtherInterceptor</class>
  <class enabled="false">org.myclass.MyFirstInterceptor</class>
</interceptors>

Where <interceptors> sections with higher ordinals get applied later and thus 
being more 'important'. So if the default interceptor order you get with a jar 
doesn't fit your needs, you can still provide a beans.xml containing a fixed 
one with a higher ordinal. 
It is also possible to disable interceptors which got switched on by default in 
a lower prioritized beans.xml section by adding enabled="false".


> cleanup Bean Archive behaviour (BDA) of interceptors, decorators and 
> alternatives
> ---------------------------------------------------------------------------------
>
>                 Key: CDI-18
>                 URL: https://jira.jboss.org/browse/CDI-18
>             Project: CDI Specification Issues
>          Issue Type: Feature Request
>          Components: Specification
>    Affects Versions: 1.0
>            Reporter: Mark Struberg
>             Fix For: 1.0
>
>
> Currently the spec defines that <interceptors>, <decorators> and 
> <alternatives> affect only the Bean Archives where they are configured in 
> (via beans.xml). 
> Thus if you e.g. enable an Alternative in a WEB-INF/beans.xml, it does NOT 
> count for the jars in it's WEB-INF/lib folder!
> This is pretty unhandy because you would need to repackage all your jars in 
> your WEB-INF/lib folder and add/expand the <alternatives> sections in their 
> beans.xml.
> Needless to say that this is not only hard to do in a company build but is 
> also impossibly to handle at deploy time in an OSGi environment!

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        
_______________________________________________
weld-issues mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/weld-issues

Reply via email to