[
https://issues.apache.org/jira/browse/CXF-5364?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13824908#comment-13824908
]
Sambit Dikshit commented on CXF-5364:
-------------------------------------
[~sergey_beryozkin] here are the spring configurations
The spring configuration in client.xml - This xml is configured by people in
their client side code. We dont use jars:client etc..We have a java client
which created JaxrsClient by looking up this client.xml.
<cxf:bus>
<cxf:outInterceptors>
<ref bean="clientLoggingOutInterceptor" />
<ref bean="clientPolicyOutInterceptor" />
<ref bean="clientHeaderOutInterceptor" />
<ref bean="serviceAuthOutInterceptor" />
</cxf:outInterceptors>
<cxf:inInterceptors>
<ref bean="clientHeaderInInterceptor" />
<ref bean="clientPolicyInInterceptor" />
<ref bean="clientLoggingInInterceptor" />
</cxf:inInterceptors>
</cxf:bus>
On the server side the spring xml has -
<cxf:bus>
<cxf:inInterceptors>
<ref bean="serverLoggingInInterceptor" />
<ref bean="serverHeaderInInterceptor" />
<ref bean="serverPolicyInInterceptor" />
</cxf:inInterceptors>
<cxf:outInterceptors>
<ref bean="serverStatusCodeOutInterceptor" />
<ref bean="serverHeaderOutInterceptor" />
<ref bean="serverLoggingOutInterceptor" />
<ref bean="serverLocalCallOutInterceptor" />
<ref bean="serverPolicyOutInterceptor" />
</cxf:outInterceptors>
<cxf:outFaultInterceptors>
<ref bean="serverFaultOutInterceptor" />
</cxf:outFaultInterceptors>
</cxf:bus>
The problem is when both client and server cxfs are defined in same spring
context, the client side and server side bus interceptors overrides.
These xml snippets are abstracted in a base xml called client.xml and
server.xml which all developers will get through import in their spring xmls
where they can define their jaxrs:server details. Now we if we give a name to
these buses, we can not really go back and ask all people to change their
jaxrs:server to refer to the server bus. We are looking for a way to handle
this programatically.
> 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)