cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sergey Beryozkin <sberyoz...@gmail.com>
Subject JAX-RS Spring Integration with Configuration and Bean annotation
Date Thu, 16 Jan 2014 17:07:22 GMT
Hi All,

I've added JAX-RS to the subject because I've dome some initial updates 
based on the feedback to do with configuring JAX-RS endpoints, but I 
think the conversation may also be generalized for all frontends be covered.

I've added an initial prototype a month or so ago, based on the code 
from Vladimir Kulev [1].

In meantime Paul Wilson who has been actively using Spring 
@Configuration approach with JAX-RS endpoints has worked with his 
colleague on the proposal on how to start generalizing the code I 
committed. Paul and his colleague David Clark sent me some code examples 
a couple of days ago and based on our initial conversation I created [2] 
and did another commit [3].

Let me briefly describe the changes in [3]:
- AbstractSpringConfigurationFactory drives the creation of a given 
JAX-RS endpoint
- AbstractSpringComponentScanServer extends it and auto-discovers all of 
the JAX-RS roots and providers, with the concrete 
SpringComponentScanServer offering a basic implementation: this covers 
the auto-discovery root,

- custom AbstractSpringConfigurationFactory implementations will further 
customize the process, for example, Paul is also interested in marking 
individual methods as interceptor providers with methods returning 
concrete Interceptor implementations, others can possibly rely on Inject 
as suggested in [4]

I think it is rather difficult to completely generalize this process but 
some support can definitely be provided.

As far as I'm concerned I'd like to have the case of methods returning 
the concrete interceptors or other providers supported for people 
preferring in-place customization of a given server to do it, Paul 
suggested a new Interceptor annotation accepting IN/OUT etc, example:

@Interceptor(IN)
public Interceptor getMyInInterceptor() {
}

and I've linked to [5] which is related.

Basically, IMHO this is a good start, I hope that some of it can be 
reused/shared eventually between the frontends if there will be some 
interest.

Comments are welcome, I guess we can discuss things here and/or at [2]

Thanks, Sergey

[1] https://issues.apache.org/jira/browse/CXF-3725
[2] https://issues.apache.org/jira/browse/CXF-5495
[3] http://svn.apache.org/r1558850
[4] https://issues.apache.org/jira/browse/CXF-5448
[5] https://issues.apache.org/jira/browse/CXF-5439

Mime
View raw message