code: public static String[] prioritizeInterceptors( String [] interceptors )
      {
          if ( interceptors == null )
              return null;
  
          // Read external configuration to obtain desired prioritization.
          if ( _interceptorPriorities == null )
          {
              // Only attempt to read the external configuration once; bounce the VM if you
              // want to try again.
              _interceptorPriorities = new ArrayList<String>();
              BufferedReader in = null;
              try
              {
                  InputStream configFileStream =
                      ControlBeanContext.class.getClassLoader().getResourceAsStream( INTERCEPTOR_CONFIG_FILE );
  
                  if ( configFileStream != null )
                  {
                      in = new BufferedReader(new InputStreamReader(configFileStream));
                      String str;
                      while ((str = in.readLine()) != null)
                          _interceptorPriorities.add(str);
                  }
              }
              catch (IOException e)
              {
                  // ignore
              }
              finally
              {
                  try {
                      if (in != null)
                          in.close();
                  }
                  catch ( IOException ie ) { /* ignore */ }
              }
          }
  
          // Put input list of interceptors into a Set for easy lookup
          Set<String> input = new HashSet<String>();
          for ( String ii : interceptors )
              input.add( ii );
  
          // Scan through priorities list, building a prioritized list
          ArrayList<String> prioritized = new ArrayList<String>(interceptors.length);
          for ( String p : _interceptorPriorities )
          {
              if ( input.contains(p) )
              {
                  input.remove(p);
                  prioritized.add(p);
              }
          }
  
          // Anything still left in the input set did not have a priority associated with it,
          // so they just go at the end in arbitrary order.
          for ( String p : input )
              prioritized.add(p);
  
          return prioritized.toArray(new String[prioritized.size()]);
      }
docs: Applies externally defined (via {@link #INTERCEPTOR_CONFIG_FILE}) ordering priority for
  controls interceptor services.
  
  @param interceptors
  @return String[]