servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r468039 - /incubator/servicemix/branches/servicemix-3.0/servicemix-core/src/main/java/org/apache/servicemix/client/ServiceMixClientFacade.java
Date Thu, 26 Oct 2006 15:36:32 GMT
Author: gnodet
Date: Thu Oct 26 08:36:31 2006
New Revision: 468039

URL: http://svn.apache.org/viewvc?view=rev&rev=468039
Log:
SM-723: ServiceMixClientFacade should not call done method in send()

Modified:
    incubator/servicemix/branches/servicemix-3.0/servicemix-core/src/main/java/org/apache/servicemix/client/ServiceMixClientFacade.java

Modified: incubator/servicemix/branches/servicemix-3.0/servicemix-core/src/main/java/org/apache/servicemix/client/ServiceMixClientFacade.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/branches/servicemix-3.0/servicemix-core/src/main/java/org/apache/servicemix/client/ServiceMixClientFacade.java?view=diff&rev=468039&r1=468038&r2=468039
==============================================================================
--- incubator/servicemix/branches/servicemix-3.0/servicemix-core/src/main/java/org/apache/servicemix/client/ServiceMixClientFacade.java
(original)
+++ incubator/servicemix/branches/servicemix-3.0/servicemix-core/src/main/java/org/apache/servicemix/client/ServiceMixClientFacade.java
Thu Oct 26 08:36:31 2006
@@ -143,7 +143,6 @@
 
     public void send(MessageExchange exchange) throws MessagingException {
         getDeliveryChannel().send(exchange);
-        done(exchange);
     }
         
     public void send(Message message) throws MessagingException {
@@ -204,7 +203,6 @@
      */
     public void fail(MessageExchange exchange, Fault fault) throws MessagingException {
         exchange.setFault(fault);
-        exchange.setStatus(ExchangeStatus.ERROR);
         getDeliveryChannel().send(exchange);
     }
 
@@ -212,10 +210,11 @@
      * A helper method which fails and completes the given exchange with the specified error
      */
     public void fail(MessageExchange exchange, Exception error) throws MessagingException
{
-        exchange.setError(error);
         if (error instanceof FaultException) {
             FaultException faultException = (FaultException) error;
             exchange.setFault(faultException.getFault());
+        } else {
+            exchange.setError(error);
         }
         getDeliveryChannel().send(exchange);
     }
@@ -267,7 +266,9 @@
         if (outMessage == null) {
             throw new NoOutMessageAvailableException(exchange);
         }
-        return getMarshaler().unmarshal(exchange, outMessage);
+        Object result = getMarshaler().unmarshal(exchange, outMessage);
+        done(exchange);
+        return result;
     }
 
     public EndpointResolver createResolverForService(QName service) {



Mime
View raw message