cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sambit Dikshit (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CXF-5364) Multiple cxf buses in the same spring context
Date Fri, 15 Nov 2013 05:25:22 GMT

    [ https://issues.apache.org/jira/browse/CXF-5364?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13823299#comment-13823299
] 

Sambit Dikshit commented on CXF-5364:
-------------------------------------

[~sergey_beryozkin] Here is the use cases - 

1. We have a client framework which is built on top of cxf and it initializes the cxf bus
to inject few interceptors (mostly to capture SLA and enforce based on our policy enforcement
strategy, collect metrics for analysis, automatic endpoint discovery, local caching etc).
 These interceptors has to be executed for all calls going through client framework.  This
client is used for both http/local transport communication. For local transport - we have
customized to by pass serialization overhead and just does pure method call.  The entire client
framework is used as an annotation against the interface proxy for example 
@SOAClient
BookStoreInterface bookProxy;

2. On the server side, we do have a similar framework where we have a base config xml where
we initialize the cxf bus with similar server side interceptors to apply SLA, collect metrics.
Each service developer has to include this base config xml in their spring container. Now
they can write their own interceptors and attach to the jaxrs endpoint if they want to have
some additional features.  

3. The service component can call another service using client framework either over http
or local.  

In case of situation 3 above, the soa client and server side components share the same spring
context. As a result the bus level interceptors go for a toss.  

If we do add the bus level interceptors to jaxrs endpoint or cxf endpoint, issue is - custom
interceptors written by individual service team will go for a toss since their interceptors
phase may collide with already defined interceptors globally.  

So basically we want to have a global set of interceptors (these can not be run in same phase)
and then individual client or service specific interceptors should be executed.  

Any suggestion - how to achieve this.  If we want to keep the global interceptors to endpoint
or client, what is the best way to associate them.  

> Multiple cxf buses in the same spring context 
> ----------------------------------------------
>
>                 Key: CXF-5364
>                 URL: https://issues.apache.org/jira/browse/CXF-5364
>             Project: CXF
>          Issue Type: Improvement
>            Reporter: Raj Anand
>             Fix For: NeedMoreInfo
>
>
> We have a client side CXF bus with in/out interceptors and , a server side bus with in/out
interceptors. If the same service is being used for both client side and server side invocations
, the 2 buses end up in the same spring application context. As a result of this one CXF bus
is over-written and the interceptor chain for that CXF bus is lost.So how do we manage multiple
CXF buses in the same application context without the 2 buses interfering with each other.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message