You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Sergey Beryozkin (JIRA)" <ji...@apache.org> on 2013/12/05 13:25:36 UTC
[jira] [Commented] (CXF-4199) Support class-scanning for
discovering JAX-RS providers
[ https://issues.apache.org/jira/browse/CXF-4199?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13840047#comment-13840047 ]
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:
{code:xml}
<jaxrs:server address="/" base-packages="org.apache.cxf.jaxrs.validation">
<jaxrs:serviceBeans>
<ref bean="bookStore"/>
</jaxrs:serviceBeans>
</jaxrs:server>
<bean id="bookStore" class="org.apache.cxf.systest.jaxrs.discovery.BookStore" />
{code}
and I'd like to have
{code:xml}
<jaxrs:server address="/" base-packages="org.apache.cxf.jaxrs.validation org.apache.cxf.systest.jaxrs.discovery"/>
{code}
In simple cases, where we have custom root resources & providers located in the same package we'd have
{code:xml}
<jaxrs:server address="/" base-packages="org.apache.cxf.systest.jaxrs.discovery"/>
{code}
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: https://issues.apache.org/jira/browse/CXF-4199
> 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
(v6.1#6144)