cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benson Margulies <ben...@basistech.com>
Subject Re: dOSGI JAX-RS questions
Date Sun, 17 Jul 2016 15:41:02 GMT
Well, in fact, I did. I'm still puzzled.

My services are DS components, created with annotations. One of my
providers I really have to instantiate in code to get the correct
Jackson object mapper into place. So putting a class name into a
property won't serve. Since SCR is doing my registering for me, I
don't know how to get a dynamically created value into a properties of
the DS service. I'm off to try to hunt that down.

On Sun, Jul 17, 2016 at 11:35 AM, Benson Margulies <benson@basistech.com> wrote:
> Oh, oops, I didn't scroll down far enough.
>
> On Sun, Jul 17, 2016 at 11:31 AM, Benson Margulies <benson@basistech.com> wrote:
>> 1. How would I map a set of providers to properties on the Component?
>>
>> sf.setProvider(new JacksonJaxbJsonProvider(JsonUtils.getObjectMapper(),
>>         JacksonJaxbJsonProvider.DEFAULT_ANNOTATIONS));
>> sf.setProvider(new JsonExceptionMapper());
>> sf.setProvider(new WebApplicationExceptionMapper());
>> sf.setProvider(new GenericExceptionMapper());
>>
>> 2. I have one service that is launched with
>>
>> sf.setServiceClass(ProfileServiceResource.class);
>>
>> (That is, a new object for each request.)
>>
>> Can this be done with some sort of DS factory, or would I want to
>> refactor to get rid of it?

Mime
View raw message