This is an automated email from the ASF dual-hosted git repository.

ffang pushed a commit to branch camel-2.x
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/camel-2.x by this push:
     new 828eb0d  [CAMEL-15174]need to set SpringBus to CxfRsSpringEndpoint
828eb0d is described below

commit 828eb0d484b0fbb695652a67d989596bf7d3fea4
Author: Freeman Fang <freeman.f...@gmail.com>
AuthorDate: Wed Jun 10 10:54:24 2020 -0400

    [CAMEL-15174]need to set SpringBus to CxfRsSpringEndpoint
---
 components/camel-cxf/src/main/docs/cxf-component.adoc                | 4 +++-
 components/camel-cxf/src/main/docs/cxfrs-component.adoc              | 4 +++-
 .../org/apache/camel/component/cxf/jaxrs/CxfRsSpringEndpoint.java    | 5 +++++
 3 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/components/camel-cxf/src/main/docs/cxf-component.adoc 
b/components/camel-cxf/src/main/docs/cxf-component.adoc
index e5e47e6..7a0faec 100644
--- a/components/camel-cxf/src/main/docs/cxf-component.adoc
+++ b/components/camel-cxf/src/main/docs/cxf-component.adoc
@@ -1,6 +1,8 @@
 [[cxf-component]]
 = CXF Component
 :docTitle: CXF
+*Available as of Camel version 1.0*
+
 :artifactId: camel-cxf
 :description: The cxf component is used for SOAP WebServices using Apache CXF.
 :since: 1.0
@@ -909,4 +911,4 @@ specific SOAPAction header. Therefore, when the target 
service requires
 a specific SOAPAction value, it is supplied in the Camel header using
 the key SOAPAction (case-insensitive).
 
- 
+ 
\ No newline at end of file
diff --git a/components/camel-cxf/src/main/docs/cxfrs-component.adoc 
b/components/camel-cxf/src/main/docs/cxfrs-component.adoc
index e392744..c6de96c 100644
--- a/components/camel-cxf/src/main/docs/cxfrs-component.adoc
+++ b/components/camel-cxf/src/main/docs/cxfrs-component.adoc
@@ -1,6 +1,8 @@
 [[cxfrs-component]]
 = CXF-RS Component
 :docTitle: CXF-RS
+*Available as of Camel version 2.0*
+
 :artifactId: camel-cxf
 :description: The cxfrs component is used for JAX-RS REST services using 
Apache CXF.
 :since: 2.0
@@ -511,4 +513,4 @@ Map<String, String> queryMap = new LinkedHashMap<>();
 queryMap.put("q1", "new");
 queryMap.put("q2", "world");
 inMessage.setHeader(CxfConstants.CAMEL_CXF_RS_QUERY_MAP, queryMap);
-----
+----
\ No newline at end of file
diff --git 
a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsSpringEndpoint.java
 
b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsSpringEndpoint.java
index 46b235a..0d12f0f 100644
--- 
a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsSpringEndpoint.java
+++ 
b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsSpringEndpoint.java
@@ -20,6 +20,7 @@ package org.apache.camel.component.cxf.jaxrs;
 import org.apache.camel.Component;
 import org.apache.camel.component.cxf.spring.SpringJAXRSClientFactoryBean;
 import org.apache.camel.spring.SpringCamelContext;
+import org.apache.cxf.bus.spring.BusWiringBeanFactoryPostProcessor;
 import org.apache.cxf.configuration.spring.ConfigurerImpl;
 import org.apache.cxf.jaxrs.AbstractJAXRSFactoryBean;
 import org.apache.cxf.jaxrs.JAXRSServerFactoryBean;
@@ -58,8 +59,12 @@ public class CxfRsSpringEndpoint extends CxfRsEndpoint 
implements BeanIdAware {
             setBeanId(((BeanIdAware)bean).getBeanId());
         }
 
+        
         ApplicationContext applicationContext = 
((SpringCamelContext)getCamelContext()).getApplicationContext();
         configurer = new ConfigurerImpl(applicationContext);
+        if (bus == null) {
+            bus = 
BusWiringBeanFactoryPostProcessor.addDefaultBus(applicationContext);
+        }
     }
 
     @Override

Reply via email to