You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2015/10/20 16:59:49 UTC

camel git commit: [CAMEL-9240] Abstract CXF endpoint creation for WildFly integration

Repository: camel
Updated Branches:
  refs/heads/master d4e2e1d62 -> 4a3ef79db


[CAMEL-9240] Abstract CXF endpoint creation for WildFly integration


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/4a3ef79d
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/4a3ef79d
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/4a3ef79d

Branch: refs/heads/master
Commit: 4a3ef79db66dfe9f3aaf731d9444e23236bf3638
Parents: d4e2e1d
Author: Thomas Diesler <th...@jboss.com>
Authored: Thu Oct 15 11:13:13 2015 +0200
Committer: Thomas Diesler <th...@jboss.com>
Committed: Tue Oct 20 16:49:07 2015 +0200

----------------------------------------------------------------------
 .../org/apache/camel/component/cxf/CxfComponent.java  | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/4a3ef79d/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfComponent.java b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfComponent.java
index e5af409..85776b6 100644
--- a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfComponent.java
+++ b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfComponent.java
@@ -86,8 +86,8 @@ public class CxfComponent extends HeaderFilterStrategyComponent {
                 beanId = beanId.substring(2);
             }
 
-            result = CamelContextHelper.mandatoryLookup(getCamelContext(), beanId, CxfEndpoint.class);
-            // need to check the CamelContext value 
+            result = createCxfSpringEndpoint(beanId);
+            // need to check the CamelContext value
             if (getCamelContext().equals(result.getCamelContext())) {
                 result.setCamelContext(getCamelContext());
             }
@@ -95,7 +95,7 @@ public class CxfComponent extends HeaderFilterStrategyComponent {
 
         } else {
             // endpoint URI does not specify a bean
-            result = new CxfEndpoint(remaining, this);
+            result = createCxfEndpoint(remaining);
         }
         if (result.getCamelContext() == null) {
             result.setCamelContext(getCamelContext());
@@ -116,6 +116,14 @@ public class CxfComponent extends HeaderFilterStrategyComponent {
         return result;
     }
 
+    protected CxfEndpoint createCxfSpringEndpoint(String beanId) throws Exception {
+        return CamelContextHelper.mandatoryLookup(getCamelContext(), beanId, CxfEndpoint.class);
+    }
+
+    protected CxfEndpoint createCxfEndpoint(String remaining) {
+        return new CxfEndpoint(remaining, this);
+    }
+
     @Override
     protected void afterConfiguration(String uri, String remaining, Endpoint endpoint, Map<String, Object> parameters) throws Exception {
         CxfEndpoint cxfEndpoint = (CxfEndpoint) endpoint;