Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [servlet-dev] @Priority for ServletContainerInitializer

Early on I advocated that @Priority should not take an int, but a float or double.  Unix/Linux uses numbers with decimal points to identify start order.  If service A chose 2.2 and service D chose 2.3 and you want to have a service boot in between them you'd just pick 2.25 or something.  Decimals being as they are you can keep splitting far out.

With our int based approach if someone picks 100 and someone later comes and takes 101, there's no getting between them.

I would support @Priority for really all listener-type APIs we have across all specs, but I think we should push for a change from int likely to double (the only safe cast from int).


-- 
David Blevins
http://twitter.com/dblevins
http://www.tomitribe.com

On May 18, 2020, at 8:32 AM, Joakim Erdfelt <joakim.erdfelt@xxxxxxxxx> wrote:

How does this work when there are container provided ServletContainerInitializers and even 3rd party ServletContainerInitializers?
How do you ensure a @Priority annotated SCI gets executed before (or after) one of those other SCIs?

- Joakim

On Mon, May 18, 2020 at 10:20 AM arjan tijms <arjan.tijms@xxxxxxxxx> wrote:
Hi,

Just wondering, what about supporting the @Priority annotation on a ServletContainerInitializer class to help ordering the execution order of these?

Thoughts?

Kind regards,
Arjan Tijms
_______________________________________________
servlet-dev mailing list
servlet-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/servlet-dev
_______________________________________________
servlet-dev mailing list
servlet-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/servlet-dev


Back to the top