camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject git commit: CAMEL-6609 removed the referece of client
Date Tue, 06 Aug 2013 03:31:41 GMT
Updated Branches:
  refs/heads/master dbdd0c596 -> d467197a9


CAMEL-6609 removed the referece of client


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

Branch: refs/heads/master
Commit: d467197a9103f733029d881354f338e559dd5828
Parents: dbdd0c5
Author: Willem Jiang <ningjiang@apache.org>
Authored: Tue Aug 6 11:31:01 2013 +0800
Committer: Willem Jiang <ningjiang@apache.org>
Committed: Tue Aug 6 11:31:01 2013 +0800

----------------------------------------------------------------------
 .../camel/component/cxf/CxfClientCallback.java   | 19 +++++--------------
 .../apache/camel/component/cxf/CxfProducer.java  |  2 +-
 2 files changed, 6 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/d467197a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfClientCallback.java
----------------------------------------------------------------------
diff --git a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfClientCallback.java
b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfClientCallback.java
index a6f936f..b33d0b9 100644
--- a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfClientCallback.java
+++ b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfClientCallback.java
@@ -20,9 +20,8 @@ import java.util.Map;
 
 import org.apache.camel.AsyncCallback;
 import org.apache.camel.Exchange;
-import org.apache.cxf.endpoint.Client;
 import org.apache.cxf.endpoint.ClientCallback;
-import org.apache.cxf.endpoint.ClientImpl;
+import org.apache.cxf.endpoint.ConduitSelector;
 import org.apache.cxf.service.model.BindingOperationInfo;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -35,17 +34,9 @@ public class CxfClientCallback extends ClientCallback {
     private final org.apache.cxf.message.Exchange cxfExchange;
     private final BindingOperationInfo boi;
     private final CxfBinding binding;
-    private final Client client;
     
-    public CxfClientCallback(AsyncCallback callback, 
-                             Exchange camelExchange,
-                             org.apache.cxf.message.Exchange cxfExchange,
-                             BindingOperationInfo boi,
-                             CxfBinding binding) {
-        this(null, callback, camelExchange, cxfExchange, boi, binding);       
-    }
     
-    public CxfClientCallback(Client client, AsyncCallback callback, 
+    public CxfClientCallback(AsyncCallback callback, 
                              Exchange camelExchange,
                              org.apache.cxf.message.Exchange cxfExchange,
                              BindingOperationInfo boi,
@@ -53,7 +44,6 @@ public class CxfClientCallback extends ClientCallback {
         this.camelAsyncCallback = callback;
         this.camelExchange = camelExchange;
         this.cxfExchange = cxfExchange;
-        this.client = client;
         this.boi = boi;
         this.binding = binding;       
     }
@@ -82,8 +72,9 @@ public class CxfClientCallback extends ClientCallback {
         try {
             super.handleException(ctx, ex);
             // need to call the conduitSelector complete method to enable the fail over feature
-            if (client instanceof ClientImpl) {
-                ((ClientImpl)client).getConduitSelector().complete(cxfExchange);
+            ConduitSelector conduitSelector = cxfExchange.get(ConduitSelector.class);
+            if (conduitSelector != null) {
+                conduitSelector.complete(cxfExchange);
                 ex = cxfExchange.getOutMessage().getContent(Exception.class);
                 if (ex == null && cxfExchange.getInMessage() != null) {
                     ex = cxfExchange.getInMessage().getContent(Exception.class);

http://git-wip-us.apache.org/repos/asf/camel/blob/d467197a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfProducer.java
----------------------------------------------------------------------
diff --git a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfProducer.java
b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfProducer.java
index b8a803d..3f1ec4c 100644
--- a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfProducer.java
+++ b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfProducer.java
@@ -106,7 +106,7 @@ public class CxfProducer extends DefaultProducer implements AsyncProcessor
{
             invocationContext.put(Client.RESPONSE_CONTEXT, responseContext);
             invocationContext.put(Client.REQUEST_CONTEXT, prepareRequest(camelExchange, cxfExchange));
             
-            CxfClientCallback cxfClientCallback = new CxfClientCallback(client, callback,
camelExchange, cxfExchange, boi, 
+            CxfClientCallback cxfClientCallback = new CxfClientCallback(callback, camelExchange,
cxfExchange, boi, 
                                                                         endpoint.getCxfBinding());
             // send the CXF async request
             client.invoke(cxfClientCallback, boi, getParams(endpoint, camelExchange), 


Mime
View raw message