<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 &lt;<a href="mailto:struberg@yahoo.de">struberg@yahoo.de</a>&gt; 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&#39;s meant to be anyway.<br class="gmail_msg">
<br class="gmail_msg">
But I agree with the argument that I&#39;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">
&gt; Am 08.12.2016 um 12:51 schrieb Martin Kouba &lt;<a href="mailto:mkouba@redhat.com" class="gmail_msg" target="_blank">mkouba@redhat.com</a>&gt;:<br class="gmail_msg">
&gt;<br class="gmail_msg">
&gt; +1<br class="gmail_msg">
&gt;<br class="gmail_msg">
&gt; The sentence &quot;Observers with smaller priority values are called first.&quot;<br class="gmail_msg">
&gt; sounds weird. If it were @Order annotation, the sentence would be fine<br class="gmail_msg">
&gt; and natural. But right now, we say that observers with highest priority<br class="gmail_msg">
&gt; are notified last.<br class="gmail_msg">
&gt;<br class="gmail_msg">
&gt; By the way, interceptors are different beasts - an interceptor with the<br class="gmail_msg">
&gt; highest priority is &quot;closest&quot; to the bean method invocation, i.e. it&#39;s<br class="gmail_msg">
&gt; the last one which can react BEFORE the bean method is invoked and the<br class="gmail_msg">
&gt; first one which can react AFTER the bean invocation returns (and process<br class="gmail_msg">
&gt; the result).<br class="gmail_msg">
&gt;<br class="gmail_msg">
&gt; Martin<br class="gmail_msg">
&gt;<br class="gmail_msg">
&gt; Dne 8.12.2016 v 11:45 Matej Novotny napsal(a):<br class="gmail_msg">
&gt;&gt; +0<br class="gmail_msg">
&gt;&gt;<br class="gmail_msg">
&gt;&gt; Don&#39;t really care. Since it&#39;s not unified across CDI, having it one way or the other doesn&#39;t really make difference to me.<br class="gmail_msg">
&gt;&gt;<br class="gmail_msg">
&gt;&gt; Matej<br class="gmail_msg">
&gt;&gt;<br class="gmail_msg">
&gt;&gt; ----- Original Message -----<br class="gmail_msg">
&gt;&gt;&gt; From: &quot;Antoine Sabot-Durand&quot; &lt;<a href="mailto:antoine@sabot-durand.net" class="gmail_msg" target="_blank">antoine@sabot-durand.net</a>&gt;<br class="gmail_msg">
&gt;&gt;&gt; To: &quot;CDI Java EE Specification&quot; &lt;<a href="mailto:cdi-dev@lists.jboss.org" class="gmail_msg" target="_blank">cdi-dev@lists.jboss.org</a>&gt;<br class="gmail_msg">
&gt;&gt;&gt; Sent: Thursday, December 8, 2016 11:29:11 AM<br class="gmail_msg">
&gt;&gt;&gt; Subject: [cdi-dev] [Vote] @Priority value order on ordered events<br class="gmail_msg">
&gt;&gt;&gt;<br class="gmail_msg">
&gt;&gt;&gt; Hi all,<br class="gmail_msg">
&gt;&gt;&gt;<br class="gmail_msg">
&gt;&gt;&gt; As already explained in a previous mail [1], some of us would like change the<br class="gmail_msg">
&gt;&gt;&gt; current order of events to make the highest @Priority value first and the<br class="gmail_msg">
&gt;&gt;&gt; lowest last. This change would be an alinement on how @Alternative work<br class="gmail_msg">
&gt;&gt;&gt; (highest value being the first candidate).<br class="gmail_msg">
&gt;&gt;&gt;<br class="gmail_msg">
&gt;&gt;&gt; If you agree to the change (highest to lowest) vote +1, if you disagree -1<br class="gmail_msg">
&gt;&gt;&gt; and don&#39;t care 0. If you want to discuss thread is always open on [1] but<br class="gmail_msg">
&gt;&gt;&gt; time is running out.<br class="gmail_msg">
&gt;&gt;&gt;<br class="gmail_msg">
&gt;&gt;&gt; Vote will end Monday at 12:00 pm CET.<br class="gmail_msg">
&gt;&gt;&gt;<br class="gmail_msg">
&gt;&gt;&gt; Thanks for your participation.<br class="gmail_msg">
&gt;&gt;&gt;<br class="gmail_msg">
&gt;&gt;&gt; Antoine<br class="gmail_msg">
&gt;&gt;&gt;<br class="gmail_msg">
&gt;&gt;&gt; [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">
&gt;&gt;&gt;<br class="gmail_msg">
&gt;&gt;&gt; _______________________________________________<br class="gmail_msg">
&gt;&gt;&gt; cdi-dev mailing list<br class="gmail_msg">
&gt;&gt;&gt; <a href="mailto:cdi-dev@lists.jboss.org" class="gmail_msg" target="_blank">cdi-dev@lists.jboss.org</a><br class="gmail_msg">
&gt;&gt;&gt; <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">
&gt;&gt;&gt;<br class="gmail_msg">
&gt;&gt;&gt; Note that for all code provided on this list, the provider licenses the code<br class="gmail_msg">
&gt;&gt;&gt; under the Apache License, Version 2<br class="gmail_msg">
&gt;&gt;&gt; (<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">
&gt;&gt;&gt; provided on this list, the provider waives all patent and other intellectual<br class="gmail_msg">
&gt;&gt;&gt; property rights inherent in such information.<br class="gmail_msg">
&gt;&gt; _______________________________________________<br class="gmail_msg">
&gt;&gt; cdi-dev mailing list<br class="gmail_msg">
&gt;&gt; <a href="mailto:cdi-dev@lists.jboss.org" class="gmail_msg" target="_blank">cdi-dev@lists.jboss.org</a><br class="gmail_msg">
&gt;&gt; <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">
&gt;&gt;<br class="gmail_msg">
&gt;&gt; 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">
&gt;&gt;<br class="gmail_msg">
&gt;<br class="gmail_msg">
&gt; --<br class="gmail_msg">
&gt; Martin Kouba<br class="gmail_msg">
&gt; Software Engineer<br class="gmail_msg">
&gt; Red Hat, Czech Republic<br class="gmail_msg">
&gt; _______________________________________________<br class="gmail_msg">
&gt; cdi-dev mailing list<br class="gmail_msg">
&gt; <a href="mailto:cdi-dev@lists.jboss.org" class="gmail_msg" target="_blank">cdi-dev@lists.jboss.org</a><br class="gmail_msg">
&gt; <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">
&gt;<br class="gmail_msg">
&gt; 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>