You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Sergey Beryozkin <sb...@gmail.com> on 2013/03/10 19:35:29 UTC
Registering JAX-RS providers on the bus
Hi
We've been discussing as part of CXF-4862 how to register JAX-RS
providers on the bus, so that individual jaxrs servers do not deal with
configuring them, and we agreed to move it to the users list as it might
be of interest to other users.
Please check the end of the following section:
http://cxf.apache.org/docs/jaxrs-services-configuration.html#JAXRSServicesConfiguration-Sharingprovidersbetweenmultipleendpoints
Now, if we have a case that a jar with preconfigured providers is
shipped then the developers will only have to import the application
context containing a bus bean with the providers and only define
jaxrs:server endpoints - hope that will work :-) as I have not tried
that myself yet
Thanks, Sergey
Re: Registering JAX-RS providers on the bus
Posted by Sergey Beryozkin <sb...@gmail.com>.
Hi
On 10/03/13 18:51, Craig McClanahan wrote:
> On Sun, Mar 10, 2013 at 11:35 AM, Sergey Beryozkin<sb...@gmail.com>wrote:
>
>> Hi
>> We've been discussing as part of CXF-4862 how to register JAX-RS providers
>> on the bus, so that individual jaxrs servers do not deal with configuring
>> them, and we agreed to move it to the users list as it might be of interest
>> to other users.
>>
>> I really like this approach to sharing configuration data. However, it's
> not clear whether I can share a basic set of providers and still add some
> special ones in a service bean?
Yes - that should work - I can add a test for it, but the providers
added to individual endpoints will also be recognized
>
> Separately, does the same concept work for sharing interceptors?
Yes - it is been there all the time, cxf:bus bean has dedicated
inInterceptors and outInterceptors list properties - and endpoint
specific CXF interceptors can also be added; JAX-RS providers are not
core CXF interceptors, so one needs to use cxf:bus/properties to
register them as bus level providers
Cheers, Sergey
>
> Craig
>
Re: Registering JAX-RS providers on the bus
Posted by Craig McClanahan <cr...@apache.org>.
On Sun, Mar 10, 2013 at 11:35 AM, Sergey Beryozkin <sb...@gmail.com>wrote:
> Hi
> We've been discussing as part of CXF-4862 how to register JAX-RS providers
> on the bus, so that individual jaxrs servers do not deal with configuring
> them, and we agreed to move it to the users list as it might be of interest
> to other users.
>
> I really like this approach to sharing configuration data. However, it's
not clear whether I can share a basic set of providers and still add some
special ones in a service bean?
Separately, does the same concept work for sharing interceptors?
Craig