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 Fri, 06 Dec 2013 14:02:35 GMT


Sergey Beryozkin commented on CXF-4199:

Hi Andriy

I've created to get all the main native CXF
providers marked too. I'm not sure yet how fast we should go there, perhaps we should wait
till gets resolved, perhaps the auto-discovery
of CXF native providers should work consistently for all the frontends.

I think what we should do in meantime is to encapsulate the auto-discovery code into a helper
class. For example, we have org.apache.common.util.ProxyHelper which tries Spring first and
then defaults to the basic level support.

So what about this plan:

1. org.apache.common.util.ClassPathScanner, it will try Spring, default to no-op, it will
help several helper methods, example, it will scan for .class by default by can accept other
extensions like .xsd. It will also optionally create class instances or return classes only.
It will optionally accept a list of required annotations and return a Map<Annotation, List<Object>>
with every annotation linked to a corresponding List of objects

2. Update JAXRS Server Spring factory to use ClassPathScanner

3. Update JAXRS Client Spring factory to use ClassPathScanner, except that it will create
providers only, and return  a service class

This will probably let us completely resolve this issue. 
When we have a ClassPathScanner then JAXWS Serrver Spring factory might also use it and then
we can also utilize it for discovering the rest of CXF providers.

And then 

4. We will review how to provide a light-weight discovery support for non Spring apps, encapsulated
withing that Scanner. 
For example, I've just found

which seems to be pretty light weight and it depends on ASM and CXF has an optional ASM dependency

Thoughts ?

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