i would prefer ordinal like it is in deltaspike - but i’ve used it and know how it works
if we choose priority i think we should go with the @Priority annotation and i like the idea to define a list with default prios lg reini > Am 28.12.2014 um 17:26 schrieb John D. Ament <[email protected]>: > > What about defining a static list of default priorities and recommend > people to use them. Similar to what was done in EE7: > https://java.net/projects/javaee-spec/lists/jsr342-experts/archive/2012-12/message/15 > > On Sun Dec 28 2014 at 11:15:19 AM Romain Manni-Bucau <[email protected]> > wrote: > >> we'll sort it on int order so -1 will do the trick as "usual". >> >> >> Romain Manni-Bucau >> @rmannibucau >> http://www.tomitribe.com >> http://rmannibucau.wordpress.com >> https://github.com/rmannibucau >> >> >> 2014-12-28 17:10 GMT+01:00 Mark Struberg <[email protected]>: >>> I do agree that with the term 'priority' 1 (or 0) is the 'most important >> one'. >>> >>> And that is one of the reasons I don't really like it. >>> >>> We really need an open scale. It must always be possible to add some >> 'even more important' configuration on top. Thus, the higher the number, >> the more important it is (and override less important ConfigSources). >>> >>> >>> >>> >>> LieGrue, >>> strub >>> >>> >>> >>> >>>> On Sunday, 28 December 2014, 17:03, Romain Manni-Bucau < >> [email protected]> wrote: >>>>> @Mark you proved it is 1-1 with your example. If we use number both >>>> ways have the same issue. It is common to use string as well and >>>> tolerate before("application"), after("other source") >>>> etc...but I >>>> guess having numbers to start is good enough. Then I prefer the most >>>> prioritized is 0 but since we have @Priority we should stick to it IMO >>>> >>>> >>>> Romain Manni-Bucau >>>> @rmannibucau >>>> http://www.tomitribe.com >>>> http://rmannibucau.wordpress.com >>>> https://github.com/rmannibucau >>>> >>>> >>>> >>>> 2014-12-28 16:32 GMT+01:00 Anatole Tresch <[email protected]>: >>>>> Also confusing sometimes is that with overrriding higher priority >> sources >>>>> are added later, since they override others... >>>>> >>>>> ... >>>>> >>>>> Mark Struberg <[email protected]> schrieb am Sun Dec 28 2014 at >>>> 16:23:20: >>>>> >>>>>> Anatole, you've never heard "what's your no 1 priority >>>> right now?" >>>>>> >>>>>> priority is the order in which things get done. >>>>>> prio 1 : do it now >>>>>> prio 2 : do it after 1 >>>>>> prio 3 : do it after 2 >>>>>> etc >>>>>> >>>>>> but how do you add something IN FRONT? Something which is even higher >>>> prio >>>>>> than 1? >>>>>> >>>>>> >>>>>> >>>>>> I don't care that much about how we call it. But if we keep magic >>>> numbers >>>>>> than I really do care that higher values mean 'more important'. >>>>>> >>>>>> If you like 'priority' better than 'ordinal' we could >>>> also go with the >>>>>> @Priority annotation. >>>>>> >>>>>> >>>>>> >>>>>> LieGrue, >>>>>> strub >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>>> On Sunday, 28 December 2014, 16:15, Anatole Tresch >>>> <[email protected]> >>>>>> wrote: >>>>>>>> For less numeric values means less priority as well... >>>>>>> >>>>>>> Mark Struberg <[email protected]> schrieb am Sun Dec 28 2014 >>>> at >>>>>> 15:40:09: >>>>>>> >>>>>>>> We should get a common understanding which of those 2 >>>> different >>>>>> approaches >>>>>>>> we should take. >>>>>>>> My main concern is that it should be clear as glass for the >>>> user what >>>>>> he >>>>>>>> gets. >>>>>>>> >>>>>>>> What has a higher priority? 1, 2, or 3 ? >>>>>>>> Imo the highes priority is always 1. But then it's really >>>> hard to add a >>>>>>>> more important priority. >>>>>>>> >>>>>>>> We've discussed this to some extent in OpenWebBeans where >>>> I first >>>>>>>> implemented this mechanism in 2009 (see PropertyLoader). And >>>> back then >>>>>> we >>>>>>>> decided to not use 'priority' but 'ordinal'. >>>> Because the >>>>>>> higher the ordinal >>>>>>>> (math) the more important something is. >>>>>>>> That way it is really easy to add a ConfigSource which is >>>> 'even more >>>>>>>> important' and thus tweak the effective configuration. >>>>>>>> >>>>>>>> What do others think about those 2 approaches? >>>>>>>> >>>>>>>> >>>>>>>> LieGrue, >>>>>>>> strub >>>>>>>> >>>>>>> >>>>>> >>>> >>
