cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Beilin, Vadim" <>
Subject Ordering of interceptors
Date Fri, 14 Dec 2012 16:51:00 GMT
The algorithm that PhaseInterceptorChain uses for ordering PhaseInterceptors does not guarantee
that an interceptor will end up after the interceptors that its getAfter() method returns,
depending on the order in which interceptors are added to the chain. It does not reject an
interceptor that requests an inconsistent ordering, either.
I don't think I saw it mentioned in the docs.
I wonder if this is considered a bug or oversight that has to be fixed, or correct behaviour
that has to be documented?
If this is intended behaviour, then perhaps adding a warning PhaseInterceptorChain#insertInterceptor
should be considered 

---	2012-12-14 16:27:08.325962000 +0000
+++	2012-12-14 16:36:28.590683000 +0000
@@ -567,6 +567,9 @@
                     if (cmp.getBefore().contains(id) 
                         || (cmpId != null && afterList.contains(cmpId))) {
+                        if (firstBefore != null)
+                            LOG.warning("Interceptor " + id + " wants to be before " + firstBefore.interceptor
+                                    " and after " + cmp + ", but " + cmp + " comes after
" +  firstBefore.interceptor);
                         lastAfter = ih2;
                     if (!force && cmpId.equals(id)) {



NOTICE: Morgan Stanley is not acting as a municipal advisor and the opinions or views contained
herein are not intended to be, and do not constitute, advice within the meaning of Section
975 of the Dodd-Frank Wall Street Reform and Consumer Protection Act. If you have received
this communication in error, please destroy all electronic and paper copies and notify the
sender immediately. Mistransmission is not intended to waive confidentiality or privilege.
Morgan Stanley reserves the right, to the extent permitted under applicable law, to monitor
electronic communications. This message is subject to terms available at the following link: If you cannot access these links, please notify
us by reply message and we will send the contents to you. By messaging with Morgan Stanley
you consent to the foregoing.
View raw message