cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andriy Redko (JIRA)" <>
Subject [jira] [Commented] (CXF-4199) Support class-scanning for discovering JAX-RS providers
Date Mon, 25 Nov 2013 01:14:35 GMT


Andriy Redko commented on CXF-4199:

Hi Sergey,

I guess I understood now the issue better. Let me just repeat that please:
 - add to JAXRSServerFactoryBean method setAutoDiscoveryPackages( <packages to scan>
 - if application is Spring - based, add respective providers as bean to application context
and to providers list (JAXRSServerFactoryBean)
 - if application is non-Spring, add instances of discovered providers into providers list
 - for CXFNonSpringJaxrsServlet, we could have additional context property, f.e. jaxrs.autodiscover.packages
and follow the same way as non-Spring application

By spending some time looking through the code, my understanding is (at least with respect
to JAXRSServerFactoryBean based instantiation), that bus instance is the only one who knows
the context application is running (Spring/Blueprint/....). If it's true, than from implementation
standpoint, auto-discovery bus extension may be a solution to consider (it should work for
CXFNonSpringJaxrsServlet as well easily).

Also, multiple <jaxrs:server /> instances is a very good point. I assume they share
the same bus instance and as such, in case of Spring application, the same context. But they
may declare different packages to discover providers (which sounds very logical). It brings
some (solvable) complexity in order not to create duplicate bean definitions. 

Does it have sense to you?


> Support class-scanning for discovering JAX-RS providers 
> --------------------------------------------------------
>                 Key: CXF-4199
>                 URL:
>             Project: CXF
>          Issue Type: Improvement
>          Components: JAX-RS
>            Reporter: Sergey Beryozkin
> 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