<div dir="ltr">Result of the vote results in a status quo: lowest value is first.<div><br></div><div>So to live with our conflicting way of using @Priority, we could (unofficially) state that:<br><br>- When multiple elements should be ordered to be all invoked (events, interceptor) in an ordered way we go from lowest to highest</div><div>- When one element should be chosen from a collection (Alternatives) highest wins...</div><div><br></div><div>Antoine<br><br><div class="gmail_quote"><div dir="ltr">On Thu, Dec 8, 2016 at 2:15 PM Mark Struberg <<a href="mailto:struberg@yahoo.de">struberg@yahoo.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">-0.2. @Priority sorting order is already confusing.<br class="gmail_msg">
Thus one has to read about how it's meant to be anyway.<br class="gmail_msg">
<br class="gmail_msg">
But I agree with the argument that I'd expect observers to get invoked in the order of the priority numbers. Means 1 before 2. Feels much more natural to me.<br class="gmail_msg">
<br class="gmail_msg">
LieGrue,<br class="gmail_msg">
strub<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
> Am 08.12.2016 um 12:51 schrieb Martin Kouba <<a href="mailto:mkouba@redhat.com" class="gmail_msg" target="_blank">mkouba@redhat.com</a>>:<br class="gmail_msg">
><br class="gmail_msg">
> +1<br class="gmail_msg">
><br class="gmail_msg">
> The sentence "Observers with smaller priority values are called first."<br class="gmail_msg">
> sounds weird. If it were @Order annotation, the sentence would be fine<br class="gmail_msg">
> and natural. But right now, we say that observers with highest priority<br class="gmail_msg">
> are notified last.<br class="gmail_msg">
><br class="gmail_msg">
> By the way, interceptors are different beasts - an interceptor with the<br class="gmail_msg">
> highest priority is "closest" to the bean method invocation, i.e. it's<br class="gmail_msg">
> the last one which can react BEFORE the bean method is invoked and the<br class="gmail_msg">
> first one which can react AFTER the bean invocation returns (and process<br class="gmail_msg">
> the result).<br class="gmail_msg">
><br class="gmail_msg">
> Martin<br class="gmail_msg">
><br class="gmail_msg">
> Dne 8.12.2016 v 11:45 Matej Novotny napsal(a):<br class="gmail_msg">
>> +0<br class="gmail_msg">
>><br class="gmail_msg">
>> Don't really care. Since it's not unified across CDI, having it one way or the other doesn't really make difference to me.<br class="gmail_msg">
>><br class="gmail_msg">
>> Matej<br class="gmail_msg">
>><br class="gmail_msg">
>> ----- Original Message -----<br class="gmail_msg">
>>> From: "Antoine Sabot-Durand" <<a href="mailto:antoine@sabot-durand.net" class="gmail_msg" target="_blank">antoine@sabot-durand.net</a>><br class="gmail_msg">
>>> To: "CDI Java EE Specification" <<a href="mailto:cdi-dev@lists.jboss.org" class="gmail_msg" target="_blank">cdi-dev@lists.jboss.org</a>><br class="gmail_msg">
>>> Sent: Thursday, December 8, 2016 11:29:11 AM<br class="gmail_msg">
>>> Subject: [cdi-dev] [Vote] @Priority value order on ordered events<br class="gmail_msg">
>>><br class="gmail_msg">
>>> Hi all,<br class="gmail_msg">
>>><br class="gmail_msg">
>>> As already explained in a previous mail [1], some of us would like change the<br class="gmail_msg">
>>> current order of events to make the highest @Priority value first and the<br class="gmail_msg">
>>> lowest last. This change would be an alinement on how @Alternative work<br class="gmail_msg">
>>> (highest value being the first candidate).<br class="gmail_msg">
>>><br class="gmail_msg">
>>> If you agree to the change (highest to lowest) vote +1, if you disagree -1<br class="gmail_msg">
>>> and don't care 0. If you want to discuss thread is always open on [1] but<br class="gmail_msg">
>>> time is running out.<br class="gmail_msg">
>>><br class="gmail_msg">
>>> Vote will end Monday at 12:00 pm CET.<br class="gmail_msg">
>>><br class="gmail_msg">
>>> Thanks for your participation.<br class="gmail_msg">
>>><br class="gmail_msg">
>>> Antoine<br class="gmail_msg">
>>><br class="gmail_msg">
>>> [1] <a href="http://lists.jboss.org/pipermail/cdi-dev/2016-November/009330.html" rel="noreferrer" class="gmail_msg" target="_blank">http://lists.jboss.org/pipermail/cdi-dev/2016-November/009330.html</a><br class="gmail_msg">
>>><br class="gmail_msg">
>>> _______________________________________________<br class="gmail_msg">
>>> cdi-dev mailing list<br class="gmail_msg">
>>> <a href="mailto:cdi-dev@lists.jboss.org" class="gmail_msg" target="_blank">cdi-dev@lists.jboss.org</a><br class="gmail_msg">
>>> <a href="https://lists.jboss.org/mailman/listinfo/cdi-dev" rel="noreferrer" class="gmail_msg" target="_blank">https://lists.jboss.org/mailman/listinfo/cdi-dev</a><br class="gmail_msg">
>>><br class="gmail_msg">
>>> Note that for all code provided on this list, the provider licenses the code<br class="gmail_msg">
>>> under the Apache License, Version 2<br class="gmail_msg">
>>> (<a href="http://www.apache.org/licenses/LICENSE-2.0.html" rel="noreferrer" class="gmail_msg" target="_blank">http://www.apache.org/licenses/LICENSE-2.0.html</a>). For all other ideas<br class="gmail_msg">
>>> provided on this list, the provider waives all patent and other intellectual<br class="gmail_msg">
>>> property rights inherent in such information.<br class="gmail_msg">
>> _______________________________________________<br class="gmail_msg">
>> cdi-dev mailing list<br class="gmail_msg">
>> <a href="mailto:cdi-dev@lists.jboss.org" class="gmail_msg" target="_blank">cdi-dev@lists.jboss.org</a><br class="gmail_msg">
>> <a href="https://lists.jboss.org/mailman/listinfo/cdi-dev" rel="noreferrer" class="gmail_msg" target="_blank">https://lists.jboss.org/mailman/listinfo/cdi-dev</a><br class="gmail_msg">
>><br class="gmail_msg">
>> Note that for all code provided on this list, the provider licenses the code under the Apache License, Version 2 (<a href="http://www.apache.org/licenses/LICENSE-2.0.html" rel="noreferrer" class="gmail_msg" target="_blank">http://www.apache.org/licenses/LICENSE-2.0.html</a>). For all other ideas provided on this list, the provider waives all patent and other intellectual property rights inherent in such information.<br class="gmail_msg">
>><br class="gmail_msg">
><br class="gmail_msg">
> --<br class="gmail_msg">
> Martin Kouba<br class="gmail_msg">
> Software Engineer<br class="gmail_msg">
> Red Hat, Czech Republic<br class="gmail_msg">
> _______________________________________________<br class="gmail_msg">
> cdi-dev mailing list<br class="gmail_msg">
> <a href="mailto:cdi-dev@lists.jboss.org" class="gmail_msg" target="_blank">cdi-dev@lists.jboss.org</a><br class="gmail_msg">
> <a href="https://lists.jboss.org/mailman/listinfo/cdi-dev" rel="noreferrer" class="gmail_msg" target="_blank">https://lists.jboss.org/mailman/listinfo/cdi-dev</a><br class="gmail_msg">
><br class="gmail_msg">
> Note that for all code provided on this list, the provider licenses the code under the Apache License, Version 2 (<a href="http://www.apache.org/licenses/LICENSE-2.0.html" rel="noreferrer" class="gmail_msg" target="_blank">http://www.apache.org/licenses/LICENSE-2.0.html</a>). For all other ideas provided on this list, the provider waives all patent and other intellectual property rights inherent in such information.<br class="gmail_msg">
<br class="gmail_msg">
</blockquote></div></div></div>