You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Mandy Warren <ma...@gmail.com> on 2013/09/18 13:28:02 UTC

In what order are multiple Request Handlers run?

Hi

I need to use Request and Response Handlers rather than Interceptors and would like to know how I specify the order in which multiple Request Handlers are run(eg need to do validation first, then security etc).

Is it based on the order of declaration of beans in the jaxrs:providers section?

Thanks
Mandy

Sent from a mobile device

Re: In what order are multiple Request Handlers run?

Posted by Sergey Beryozkin <sb...@gmail.com>.
Sorry, in CXF 2.7.x it is

javax.ws.rs.BindingPriority

you'd need to change it to javax.annotation.Priority in CXF 3.0.0

Cheers, Sergey

On 18/09/13 20:05, Mandy Warren wrote:
> Thanks again Sergey.. It looks like @Priority isn't supported in the javax.ws.rs-api that ships with cxf 2.7.6, is this something which will be part of a later release or can I use the latest version of javax.ws.rs-api with 2.7.6?
>
> Thanks
> Mandy
>
> Sent from a mobile device
>
> On 18 Sep 2013, at 12:43, Sergey Beryozkin <sb...@gmail.com> wrote:
>
>> Hi
>> On 18/09/13 12:28, Mandy Warren wrote:
>>> Hi
>>>
>>> I need to use Request and Response Handlers rather than Interceptors and would like to know how I specify the order in which multiple Request Handlers are run(eg need to do validation first, then security etc).
>>>
>>> Is it based on the order of declaration of beans in the jaxrs:providers section?
>> Yes; but if you are on CXF 2.7.x then you can also use JAX-RS 2.0 ContainerRequestFilter and order them with a @Priority annotation
>>
>> Cheers, Sergey
>>> Thanks
>>> Mandy
>>>
>>> Sent from a mobile device
>>


-- 
Sergey Beryozkin

Talend Community Coders
http://coders.talend.com/

Blog: http://sberyozkin.blogspot.com

Re: In what order are multiple Request Handlers run?

Posted by Mandy Warren <ma...@gmail.com>.
Thanks again Sergey.. It looks like @Priority isn't supported in the javax.ws.rs-api that ships with cxf 2.7.6, is this something which will be part of a later release or can I use the latest version of javax.ws.rs-api with 2.7.6?

Thanks
Mandy

Sent from a mobile device

On 18 Sep 2013, at 12:43, Sergey Beryozkin <sb...@gmail.com> wrote:

> Hi
> On 18/09/13 12:28, Mandy Warren wrote:
>> Hi
>> 
>> I need to use Request and Response Handlers rather than Interceptors and would like to know how I specify the order in which multiple Request Handlers are run(eg need to do validation first, then security etc).
>> 
>> Is it based on the order of declaration of beans in the jaxrs:providers section?
> Yes; but if you are on CXF 2.7.x then you can also use JAX-RS 2.0 ContainerRequestFilter and order them with a @Priority annotation
> 
> Cheers, Sergey
>> Thanks
>> Mandy
>> 
>> Sent from a mobile device
> 

Re: In what order are multiple Request Handlers run?

Posted by Sergey Beryozkin <sb...@gmail.com>.
Hi
On 18/09/13 12:28, Mandy Warren wrote:
> Hi
>
> I need to use Request and Response Handlers rather than Interceptors and would like to know how I specify the order in which multiple Request Handlers are run(eg need to do validation first, then security etc).
>
> Is it based on the order of declaration of beans in the jaxrs:providers section?
>
Yes; but if you are on CXF 2.7.x then you can also use JAX-RS 2.0 
ContainerRequestFilter and order them with a @Priority annotation

Cheers, Sergey
> Thanks
> Mandy
>
> Sent from a mobile device
>