Hi Mark,
I would agree with Andy here, the CXF interceptors / features have existed
way before the JAX-RS spec. Alhough it is possible to support additional
provider contracts in DynamicFeature, it is difficult to match it exactly
to the JAX-RS lifecycle. As an option, you may consider converting the
LoggingInterceptor into full-feldged JAX-RS provider (if it makes sense
for sure).
Best Regards,
Andriy Redko
AM> Hi Mark,
AM> For #1 - I'll take a look - I've been meaning to ever since I saw the JIRA,
AM> but I've been swamped lately. My bad.
AM> For #2 - I'd like others to weigh in, but I do think that this is the
AM> intended behavior. IIUC, org.apache.cxf.feature.Feature existed before the
AM> JAX-RS spec and is used in a variety of non-JAX-RS scenarios (JAX-WS,
AM> etc.). The LoggingInterceptor is not actually a JAX-RS provider - rather
AM> it is an interceptor used on the CXF chain. JAX-RS Providers are typically
AM> invoked from the JAXRSInInterceptor and JAXRSOutInterceptor on the chain.
AM> It may be possible to add a LoggingInterceptor to the chain at that point,
AM> but it doesn't seem advisable - I haven't done much with chain
AM> manipulation, so would definitely recommend a second opinion here.
AM> Thanks for the patch,
AM> Andy
AM> On Wed, Apr 25, 2018 at 3:26 PM, Mark Struberg <[email protected]>
AM> wrote:
>> hi folks!
>> I have two questions:
>> 1.) Could anybody plz take a quick look at CXF-7713 and review the patch?
>> 2.) I've created a DynamicFeature @Provider and tried to register a CXF
>> LoggingInterceptor.
>> And this doesn't work since it seems to only pick up
>> javax.ws.rs.core.Feature instances, but not
>> org.apache.cxf.feature.Feature
>> Is this observation correct?
>> Is this behaviour intended?
>> I know I can register it via Bus#setFeatures, but that is not as modular
>> in comparison to the @Provider.
>> txs and LieGrue,
>> strub