[Vote] @Priority value order on ordered events

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

[Vote] @Priority value order on ordered events

Antoine Sabot-Durand
Administrator
Hi all,

As already explained in a previous mail [1],  some of us would like change the current order of events to make the highest @Priority value first and the lowest last.  This change would be an alinement on how @Alternative work (highest value being the first candidate).

If you agree to the change (highest to lowest) vote +1, if you disagree -1 and don't care 0. If you want to discuss thread is always open on [1] but time is running out.

Vote will end Monday at 12:00 pm CET.

Thanks for your participation.

Antoine


_______________________________________________
cdi-dev mailing list
[hidden email]
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.
Reply | Threaded
Open this post in threaded view
|

Re: [Vote] @Priority value order on ordered events

Tomas Remes

Well since it's not unified across alternatives, interceptors and obsevers there still will be some confusion IMO. So 0 from me.

T.

----- Original Message -----
From: "Antoine Sabot-Durand" <[hidden email]>
To: "CDI Java EE Specification" <[hidden email]>
Sent: Thursday, December 8, 2016 11:29:11 AM
Subject: [cdi-dev] [Vote] @Priority value order on ordered events

Hi all,

As already explained in a previous mail [1], some of us would like change the current order of events to make the highest @Priority value first and the lowest last. This change would be an alinement on how @Alternative work (highest value being the first candidate).

If you agree to the change (highest to lowest) vote +1, if you disagree -1 and don't care 0. If you want to discuss thread is always open on [1] but time is running out.

Vote will end Monday at 12:00 pm CET.

Thanks for your participation.

Antoine

[1] http://lists.jboss.org/pipermail/cdi-dev/2016-November/009330.html 

_______________________________________________
cdi-dev mailing list
[hidden email]
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.


_______________________________________________
cdi-dev mailing list
[hidden email]
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.
Reply | Threaded
Open this post in threaded view
|

Re: [Vote] @Priority value order on ordered events

Matej Novotny
In reply to this post by Antoine Sabot-Durand
+0

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.

Matej

----- Original Message -----

> From: "Antoine Sabot-Durand" <[hidden email]>
> To: "CDI Java EE Specification" <[hidden email]>
> Sent: Thursday, December 8, 2016 11:29:11 AM
> Subject: [cdi-dev] [Vote] @Priority value order on ordered events
>
> Hi all,
>
> As already explained in a previous mail [1], some of us would like change the
> current order of events to make the highest @Priority value first and the
> lowest last. This change would be an alinement on how @Alternative work
> (highest value being the first candidate).
>
> If you agree to the change (highest to lowest) vote +1, if you disagree -1
> and don't care 0. If you want to discuss thread is always open on [1] but
> time is running out.
>
> Vote will end Monday at 12:00 pm CET.
>
> Thanks for your participation.
>
> Antoine
>
> [1] http://lists.jboss.org/pipermail/cdi-dev/2016-November/009330.html
>
> _______________________________________________
> cdi-dev mailing list
> [hidden email]
> 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.
_______________________________________________
cdi-dev mailing list
[hidden email]
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.
Reply | Threaded
Open this post in threaded view
|

Re: [Vote] @Priority value order on ordered events

Romain Manni-Bucau
+0 since alternative/interceptors are not aligned. On a user perspective I find it easier is the sorting is the natural integer one but any dev knows the ordinal ordering too so not a big deal IMHO.


Romain Manni-Bucau
@rmannibucau |  Blog | Old BlogGithub | LinkedIn | JavaEE Factory

2016-12-08 11:45 GMT+01:00 Matej Novotny <[hidden email]>:
+0

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.

Matej

----- Original Message -----
> From: "Antoine Sabot-Durand" <[hidden email]>
> To: "CDI Java EE Specification" <[hidden email]>
> Sent: Thursday, December 8, 2016 11:29:11 AM
> Subject: [cdi-dev] [Vote] @Priority value order on ordered events
>
> Hi all,
>
> As already explained in a previous mail [1], some of us would like change the
> current order of events to make the highest @Priority value first and the
> lowest last. This change would be an alinement on how @Alternative work
> (highest value being the first candidate).
>
> If you agree to the change (highest to lowest) vote +1, if you disagree -1
> and don't care 0. If you want to discuss thread is always open on [1] but
> time is running out.
>
> Vote will end Monday at 12:00 pm CET.
>
> Thanks for your participation.
>
> Antoine
>
> [1] http://lists.jboss.org/pipermail/cdi-dev/2016-November/009330.html
>
> _______________________________________________
> cdi-dev mailing list
> [hidden email]
> 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.
_______________________________________________
cdi-dev mailing list
[hidden email]
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.


_______________________________________________
cdi-dev mailing list
[hidden email]
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.
Reply | Threaded
Open this post in threaded view
|

Re: [Vote] @Priority value order on ordered events

Emily Jiang
In reply to this post by Antoine Sabot-Durand
-1 on the change.

I will prefer not to change and remain as lowest one first. It is natural and easier to be understood by end users without needing to know the implementation details. Since @Alternatives with the highest value is the overall candidate and the others are ignored, I am less keen to aline it up with alternatives.

Many thanks,
Emily
===========================
Emily Jiang
WebSphere Application Server, CDI Development Lead

 
MP 211, DE3A20, Winchester, Hampshire, England, SO21 2JN
Phone:  +44 (0)1962 816278  Internal: 246278

Email: [hidden email]
Lotus Notes: Emily Jiang/UK/IBM@IBMGB




From:        Antoine Sabot-Durand <[hidden email]>
To:        CDI Java EE Specification <[hidden email]>
Date:        08/12/2016 10:31
Subject:        [cdi-dev] [Vote] @Priority value order on ordered events
Sent by:        [hidden email]




Hi all,

As already explained in a previous mail [1],  some of us would like change the current order of events to make the highest @Priority value first and the lowest last.  This change would be an alinement on how @Alternative work (highest value being the first candidate).

If you agree to the change (highest to lowest) vote +1, if you disagree -1 and don't care 0. If you want to discuss thread is always open on [1] but time is running out.

Vote will end Monday at 12:00 pm CET.

Thanks for your participation.

Antoine

[1] http://lists.jboss.org/pipermail/cdi-dev/2016-November/009330.html_______________________________________________
cdi-dev mailing list
[hidden email]
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.

Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU

_______________________________________________
cdi-dev mailing list
[hidden email]
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.
Reply | Threaded
Open this post in threaded view
|

Re: [Vote] @Priority value order on ordered events

Martin Kouba
In reply to this post by Matej Novotny
+1

The sentence "Observers with smaller priority values are called first."
sounds weird. If it were @Order annotation, the sentence would be fine
and natural. But right now, we say that observers with highest priority
are notified last.

By the way, interceptors are different beasts - an interceptor with the
highest priority is "closest" to the bean method invocation, i.e. it's
the last one which can react BEFORE the bean method is invoked and the
first one which can react AFTER the bean invocation returns (and process
the result).

Martin

Dne 8.12.2016 v 11:45 Matej Novotny napsal(a):

> +0
>
> 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.
>
> Matej
>
> ----- Original Message -----
>> From: "Antoine Sabot-Durand" <[hidden email]>
>> To: "CDI Java EE Specification" <[hidden email]>
>> Sent: Thursday, December 8, 2016 11:29:11 AM
>> Subject: [cdi-dev] [Vote] @Priority value order on ordered events
>>
>> Hi all,
>>
>> As already explained in a previous mail [1], some of us would like change the
>> current order of events to make the highest @Priority value first and the
>> lowest last. This change would be an alinement on how @Alternative work
>> (highest value being the first candidate).
>>
>> If you agree to the change (highest to lowest) vote +1, if you disagree -1
>> and don't care 0. If you want to discuss thread is always open on [1] but
>> time is running out.
>>
>> Vote will end Monday at 12:00 pm CET.
>>
>> Thanks for your participation.
>>
>> Antoine
>>
>> [1] http://lists.jboss.org/pipermail/cdi-dev/2016-November/009330.html
>>
>> _______________________________________________
>> cdi-dev mailing list
>> [hidden email]
>> 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.
> _______________________________________________
> cdi-dev mailing list
> [hidden email]
> 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
_______________________________________________
cdi-dev mailing list
[hidden email]
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.
Reply | Threaded
Open this post in threaded view
|

Re: [Vote] @Priority value order on ordered events

Mark Struberg
-0.2.  @Priority sorting order is already confusing.
Thus one has to read about how it's meant to be anyway.

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.

LieGrue,
strub


> Am 08.12.2016 um 12:51 schrieb Martin Kouba <[hidden email]>:
>
> +1
>
> The sentence "Observers with smaller priority values are called first."
> sounds weird. If it were @Order annotation, the sentence would be fine
> and natural. But right now, we say that observers with highest priority
> are notified last.
>
> By the way, interceptors are different beasts - an interceptor with the
> highest priority is "closest" to the bean method invocation, i.e. it's
> the last one which can react BEFORE the bean method is invoked and the
> first one which can react AFTER the bean invocation returns (and process
> the result).
>
> Martin
>
> Dne 8.12.2016 v 11:45 Matej Novotny napsal(a):
>> +0
>>
>> 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.
>>
>> Matej
>>
>> ----- Original Message -----
>>> From: "Antoine Sabot-Durand" <[hidden email]>
>>> To: "CDI Java EE Specification" <[hidden email]>
>>> Sent: Thursday, December 8, 2016 11:29:11 AM
>>> Subject: [cdi-dev] [Vote] @Priority value order on ordered events
>>>
>>> Hi all,
>>>
>>> As already explained in a previous mail [1], some of us would like change the
>>> current order of events to make the highest @Priority value first and the
>>> lowest last. This change would be an alinement on how @Alternative work
>>> (highest value being the first candidate).
>>>
>>> If you agree to the change (highest to lowest) vote +1, if you disagree -1
>>> and don't care 0. If you want to discuss thread is always open on [1] but
>>> time is running out.
>>>
>>> Vote will end Monday at 12:00 pm CET.
>>>
>>> Thanks for your participation.
>>>
>>> Antoine
>>>
>>> [1] http://lists.jboss.org/pipermail/cdi-dev/2016-November/009330.html
>>>
>>> _______________________________________________
>>> cdi-dev mailing list
>>> [hidden email]
>>> 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.
>> _______________________________________________
>> cdi-dev mailing list
>> [hidden email]
>> 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
> _______________________________________________
> cdi-dev mailing list
> [hidden email]
> 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.


_______________________________________________
cdi-dev mailing list
[hidden email]
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.
Reply | Threaded
Open this post in threaded view
|

Re: [Vote] @Priority value order on ordered events

Antoine Sabot-Durand
Administrator
Result of the vote results in a status quo: lowest value is first.

So to live with our conflicting way of using @Priority, we could (unofficially) state that:

- When multiple elements should be ordered to be all invoked (events, interceptor) in an ordered way we go from lowest to highest
- When one element should be chosen from a collection (Alternatives) highest wins...

Antoine

On Thu, Dec 8, 2016 at 2:15 PM Mark Struberg <[hidden email]> wrote:
-0.2.  @Priority sorting order is already confusing.
Thus one has to read about how it's meant to be anyway.

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.

LieGrue,
strub


> Am 08.12.2016 um 12:51 schrieb Martin Kouba <[hidden email]>:
>
> +1
>
> The sentence "Observers with smaller priority values are called first."
> sounds weird. If it were @Order annotation, the sentence would be fine
> and natural. But right now, we say that observers with highest priority
> are notified last.
>
> By the way, interceptors are different beasts - an interceptor with the
> highest priority is "closest" to the bean method invocation, i.e. it's
> the last one which can react BEFORE the bean method is invoked and the
> first one which can react AFTER the bean invocation returns (and process
> the result).
>
> Martin
>
> Dne 8.12.2016 v 11:45 Matej Novotny napsal(a):
>> +0
>>
>> 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.
>>
>> Matej
>>
>> ----- Original Message -----
>>> From: "Antoine Sabot-Durand" <[hidden email]>
>>> To: "CDI Java EE Specification" <[hidden email]>
>>> Sent: Thursday, December 8, 2016 11:29:11 AM
>>> Subject: [cdi-dev] [Vote] @Priority value order on ordered events
>>>
>>> Hi all,
>>>
>>> As already explained in a previous mail [1], some of us would like change the
>>> current order of events to make the highest @Priority value first and the
>>> lowest last. This change would be an alinement on how @Alternative work
>>> (highest value being the first candidate).
>>>
>>> If you agree to the change (highest to lowest) vote +1, if you disagree -1
>>> and don't care 0. If you want to discuss thread is always open on [1] but
>>> time is running out.
>>>
>>> Vote will end Monday at 12:00 pm CET.
>>>
>>> Thanks for your participation.
>>>
>>> Antoine
>>>
>>> [1] http://lists.jboss.org/pipermail/cdi-dev/2016-November/009330.html
>>>
>>> _______________________________________________
>>> cdi-dev mailing list
>>> [hidden email]
>>> 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.
>> _______________________________________________
>> cdi-dev mailing list
>> [hidden email]
>> 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
> _______________________________________________
> cdi-dev mailing list
> [hidden email]
> 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.


_______________________________________________
cdi-dev mailing list
[hidden email]
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.