Uploaded image for project: 'Seam 2'
  1. Seam 2
  2. JBSEAM-3936

Client-side Interceptor: around and within priority order does not work

    Details

      Description

      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.

      Possible solutions:
      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

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                norman.richards Norman Richards
                Reporter:
                jkronegg Julien Kronegg
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 2 hours
                  2h
                  Remaining:
                  Remaining Estimate - 2 hours
                  2h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified