You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Charlie Read <ch...@beebell.com> on 2014/02/26 11:18:51 UTC
CXF interceptor chain, servlet filter chain, JAX-RS filters
I have noticed three separate mechanisms for intervening
in the request / response processing:
- CXF interceptors
- JAX-RS filters
- servlet filters
Can someone explain the processing priority of each of these chains
with respect to one another?
For example, is the priority servlet filters => CXF interceptor => JAX-RS
filter,
or something else?
Thanks!
Charlie
Re: CXF interceptor chain, servlet filter chain, JAX-RS filters
Posted by Sergey Beryozkin <sb...@gmail.com>.
Hi
On 26/02/14 10:18, Charlie Read wrote:
> I have noticed three separate mechanisms for intervening
> in the request / response processing:
>
> - CXF interceptors
> - JAX-RS filters
> - servlet filters
>
> Can someone explain the processing priority of each of these chains
> with respect to one another?
>
> For example, is the priority servlet filters => CXF interceptor => JAX-RS
> filter,
> or something else?
>
Servlet filters go first.
Next, if you prefer doing JAX-RS 2.0 only, we have
PreMatch Container Request Filter, then per-method specific Container
Request Filters,
If you'd like to use native CXF interceptors instead of filters, then we
have
Servlet filters -> CXF interceptors.
If you mix JAX-RS 2.0 filters & CXF interceptors, then
Servlet filters -> CXF interceptors before UNMARSHAL phase ->
PreMatch Container Request Filter -> CXF interceptors after UNMARSHAL
phase -> per-method specific Container Request Filters
Sergey
> Thanks!
> Charlie
>
--
Sergey Beryozkin
Talend Community Coders
http://coders.talend.com/
Blog: http://sberyozkin.blogspot.com