When the Component class initialize the Interceptor list (initInterceptors() method), it does the following operations:
1. initialize default Interceptors
2. initialize other Interceptors (e.g. the ones defined by annotations)
3. sort the "interceptors" list with respect to the priorities defined by "around" and "within" properties
However, the Interceptors are separated between "interceptors" list (for server-side interceptors) and "clientSideInterceptors" list (for client-side interceptors).
Thus, the "clientSideInterceptors" list is never sorted in the initInterceptors() method. This means that around/within priority sorting does not work for client-side Interceptors. So if you define an Interceptor, it will be always added at the end of the list.
1. the "clientSideInterceptors" must be sorted by a "newSort(clientSideInterceptors);" in initInterceptors()
2. the documentation must state that around/within priority sorting does not work for client-side interceptors
I would prefer Solution 1