[cdi-dev] Defining the order of event thru priority

Martin Kouba mkouba at redhat.com
Mon Nov 28 07:07:46 EST 2016


Dne 28.11.2016 v 11:43 Antoine Sabot-Durand napsal(a):
> Hi all,
>
> In a recent discussion with Martin, I realized that the use of @Priotiy
> is not consistent in CDI 1.2:
>
> - For Interceptor and decorator the lowest value in @Priority is first
> (def in interceptor spec and 8.2.1)
> - For Alternatives the Highest value in @Priroty is first (def in 5.2.2)
>
> Since we have these different interpretation of @Priority value in the
> spec , we may find more consistent to change the definition of event
> ordering with the @Priority annotation.
> Right now we have:
>
> "Observers with smaller priority values are called first"
>
> We may find more intuitive to change it to:
>
> "Observers with higher priority values are called first"

I believe this one makes much more sense...
+1

>
> It will remove the oxymoron effect of the sentence and align this
> ordering on @Alternative way of using @Priorty.
>
> Wdyt?
>
> Antoine
>
>
> _______________________________________________
> cdi-dev mailing list
> cdi-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/cdi-dev
>
> Note that for all code provided on this list, the provider licenses the code under the Apache License, Version 2 (http://www.apache.org/licenses/LICENSE-2.0.html). For all other ideas provided on this list, the provider waives all patent and other intellectual property rights inherent in such information.
>

-- 
Martin Kouba
Software Engineer
Red Hat, Czech Republic


More information about the cdi-dev mailing list