On Wed August 26 2009 3:25:31 pm Nepali, Sonam (GE Healthcare, consultant) 
wrote:
> I have added a list of custom interceptors into the cxf configuration.
> In what order are they called?  Is it based on the order of the list or
> can that be controlled through some mechanism?

The order kind of depends on a couple factors, mostly if the interceptor is an 
instance of PhaseInterceptor, which all of ours would be.   To be completely 
honest, I'm not sure if a straigh "Interceptor" that's not a PhaseInterceptor 
even works anymore.    If it is a PhaseInterceptor:

1) The "Phase" that the interceptor lives in.   An interceptor in an early 
phase would always run before an interceptor in a later phase.   

2) Within a phase, it's normally the order they are added to the chain.  
However, the interceptors also have getBefore() and getAfter() methods that 
allow the interceptor to adjust it's positioning.   For example, if you need 
to be in the POST_STREAM incoming phase, but need to make sure you run before 
the StaxInInterceptor, you can return the full classname of the 
StaxInInterceptor in your "getBefore" list.


Dan


>
> <cxf:bus>
> ...
>  <cxf:inInterceptors>
>    <ref bean="beanA"/>
>    <ref bean="beanB"/>
>    <ref bean="beanC"/>
>  </cxf:inInterceptors>
>
> ...
>
> thanks
>
>
> Sonam Nepali
>
> CXF User

-- 
Daniel Kulp
[email protected]
http://www.dankulp.com/blog

Reply via email to