Skip to content
Check Screen Reader Mode to make this survey compatible with screen readers.
Check Screen Reader Mode to make this survey compatible with screen readers.
Define what @Priority means in Jakarta
1.
Jakarta @Priority annotation is used in multiple Jakarta specifiications. See more details here (https://docs.google.com/document/d/15MM8tX1sS_i5OacrgZZPmkT8WVamQkkziLChVVopOPw/edit#) There are some inconstence. For picking one item among multiple items, CDI picks the one with the highest number while JAX-RS picks the one with the lowest number.Should we fix the inconsistence and how. Please cast you vote.
Solution A
Properly document Priority annotation to state that the highest number is the higher priority. In this way, CDI complies with the new statement while JAX-RS does not. We accept this. In the new specs, we reinforce this.
Solution A2
The behavior is properly specified that the highest number is the higher priority. Some specifications take the hit and make a breaking change.
That breaking change must be phased. A 2-phase approach is: in version Next, behavior is changed and a switch is provided to restore the original version; in version Next+1, the switch is removed.
Solution A3
The behavior is properly specified that the highest number is the higher priority. Some specifications take the hit and make a breaking change.
That breaking change must be phased. A 3-phase approach is: in version Next, a switch is introduced to enable new behavior, but default behavior remains unchanged; in version Next+1, default value of the switch is flipped, but can still be restored back; in version Next+2, the switch is removed.
Solution B
Properly document Priority annotation to state that the lowest number is the higher priority. In this way, JAX-RS complies with the new statement while CDI does not. We accept this. In the new specs, we reinforce this.
Solution B2
The behavior is properly specified that the lowest number is the higher priority. Some specifications take the hit and make a breaking change.
That breaking change must be phased. A 2-phase approach is: in version Next, behavior is changed and a switch is provided to restore the original version; in version Next+1, the switch is removed.
Solution B3
The behavior is properly specified that the lowest number is the higher priority. Some specifications take the hit and make a breaking change.
That breaking change must be phased. A 3-phase approach is: in version Next, a switch is introduced to enable new behavior, but default behavior remains unchanged; in version Next+1, default value of the switch is flipped, but can still be restored back; in version Next+2, the switch is removed.
Solution C
Deprecate @Priority annotation and then create a new annotation called Ranking ( higher number leads to higher priority) and deprecate Priority annotation. All future releases of JAX-RS and CDI can use this annotation if they wish to. When using both `@Priority` and `@Ranking`, the `@Priority` is ignored. All new specs need to use this new annotation.
Solution E - do nothing
We accept that this is not a big deal and we don’t do anything. Consistency is good, but backwards compatibility is better.
Current Progress,
0 of 1 answered