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).
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
_______________________________________________ servlet-dev mailing list servlet-dev@xxxxxxxxxxxTo unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/servlet-dev
|