cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Beryozkin (JIRA)" <>
Subject [jira] [Commented] (CXF-4199) Support class-scanning for discovering JAX-RS providers
Date Thu, 05 Dec 2013 12:25:36 GMT


Sergey Beryozkin commented on CXF-4199:

Hi Andriy, I've got your patch applied, thanks. I've played a bit with it, 

I decided to remove a test where a wildcard was checked, simply because I was concerned it
could slow down the tests in some builds; and it was not predictable when it was run from
Maven, after I narrowed down the exclusion to the default providers package and thus allowing
for the discovery of validation ones, in Studio I was getting the test passing with a wildcard
(and  a validation fault mapper discovered), but not with Maven. It is really not an issue,
I think the code is OK, it appears to be a low-level class scanning issue exposed with a wildcard
check, not an issue for us really as generally speaking the pure wildcard should be avoided.
I've updated beans.xml to auto-discover all JAX-RS providers which is quite cool.

We can expand it to the optional auto-discovery of all types of components implementing CXF
interfaces (the longer term), but in the short term, I'd really like to get a root resource
auto-discovery sorted first as part of the other issue, especially now that we have a top-level
'base-packages', at the moment we have:

<jaxrs:server address="/" base-packages="org.apache.cxf.jaxrs.validation">
            <ref bean="bookStore"/>
    <bean id="bookStore" class="org.apache.cxf.systest.jaxrs.discovery.BookStore" />

and I'd like to have

<jaxrs:server address="/" base-packages="org.apache.cxf.jaxrs.validation org.apache.cxf.systest.jaxrs.discovery"/>

In simple cases, where we have custom root resources & providers located in the same package
we'd have
<jaxrs:server address="/" base-packages="org.apache.cxf.systest.jaxrs.discovery"/>

Can you please do a minor patch against CXF-3725 ?

After that we can review what can actually be done, if anything, to get the auto-discovery
done for non-Spring applications.
Thanks, Sergey

> Support class-scanning for discovering JAX-RS providers 
> --------------------------------------------------------
>                 Key: CXF-4199
>                 URL:
>             Project: CXF
>          Issue Type: Improvement
>          Components: JAX-RS
>            Reporter: Sergey Beryozkin
>         Attachments: patch-base-packages-discovery-all-packages.txt, patch-base-packages-discovery.txt
> With the search extensions module containing a provider the time has come to support
the optional class-scanning. Will help in cases when the providers are simple and no extra
configuration is expected. Post 2.6 though

This message was sent by Atlassian JIRA

View raw message