On 10/13/2014 09:33 PM, Alessio Soldano wrote:
>>>>>> * Apache CXF interceptors setup through
properties
>>>>>>
----------------------------------------------------------------------
>>>>>>
>>>>>> Speaking of properties, currently specified in
>>>>>> jboss-webservices.xml and
>>>>>> possibly in jboss-webservices-client.xml, we could start
>>>>>> supporting two
>>>>>> additional props:
>>>>>> * org.apache.cxf.interceptor.InInterceptors, with the value
>>>>>> string to be
>>>>>> parsed for getting a list of in-interceptor classnames;
>>>>>> basically to
>>>>>> achieve the same we get with @InInterceptor
>>>>>> * org.apache.cxf.interceptor.OutInterceptors, with the value
>>>>>> string to
>>>>>> be parsed for getting a list of out-interceptor classnames;
>>>>>> basically to
>>>>>> achieve the same we get with @OutInterceptor
>>>>>> The interceptors would be attached either to the bus or to the
>>>>>> client/endpoint depending on where the property is declared.
>>>>> +1
>>>> ok
>>> Would org.apache.cxf.interceptor.In/OutInterceptors props override
>>> @In/OutInterceptor defined in class file ? Or it would be just
>>> addition to
>>> already defined ones ?
>> Good question... I'd say it would be an addition; we can decide to warn
>> the user if he's trying adding an interceptor that is already there.
>>
> Option for either *adding* or *replacing* interceptors would be great.
I've thought a bit about this while implementing and figured out it's
quite complex to allow replacing. We'll go with the addition only for
now, and try also supporting replacement if there's actual user
interest in this.
We should make it same behaviour like in cxf. There is no
replacement in
cxf. Interceptors configured with different places (from annotation like
@Interceptors, @Feature or cxf.xml) will be all added to cxf's
interceptor chain. If there is the same interceptor is added twice , the
later added will override the previous one.