servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ge...@apache.org
Subject svn commit: r780618 - in /servicemix/smx3/branches/servicemix-3.2/deployables/serviceengines/servicemix-camel/src: main/java/org/apache/servicemix/camel/JbiExchange.java test/java/org/apache/servicemix/camel/JbiInOnlyTest.java
Date Mon, 01 Jun 2009 11:26:40 GMT
Author: gertv
Date: Mon Jun  1 11:26:40 2009
New Revision: 780618

URL: http://svn.apache.org/viewvc?rev=780618&view=rev
Log:
SMXCOMP-495: Avoid copying the MessageExchange into multiple JbiExchanges

Modified:
    servicemix/smx3/branches/servicemix-3.2/deployables/serviceengines/servicemix-camel/src/main/java/org/apache/servicemix/camel/JbiExchange.java
    servicemix/smx3/branches/servicemix-3.2/deployables/serviceengines/servicemix-camel/src/test/java/org/apache/servicemix/camel/JbiInOnlyTest.java

Modified: servicemix/smx3/branches/servicemix-3.2/deployables/serviceengines/servicemix-camel/src/main/java/org/apache/servicemix/camel/JbiExchange.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/branches/servicemix-3.2/deployables/serviceengines/servicemix-camel/src/main/java/org/apache/servicemix/camel/JbiExchange.java?rev=780618&r1=780617&r2=780618&view=diff
==============================================================================
--- servicemix/smx3/branches/servicemix-3.2/deployables/serviceengines/servicemix-camel/src/main/java/org/apache/servicemix/camel/JbiExchange.java
(original)
+++ servicemix/smx3/branches/servicemix-3.2/deployables/serviceengines/servicemix-camel/src/main/java/org/apache/servicemix/camel/JbiExchange.java
Mon Jun  1 11:26:40 2009
@@ -80,11 +80,7 @@
 
     @Override
     public org.apache.camel.Exchange newInstance() {    
-        if (messageExchange == null) {
-            return new JbiExchange(this.getContext(), this.getBinding());
-        } else {
-            return new JbiExchange(this.getContext(), this.getBinding(), this.getMessageExchange());
-        }
+        return new JbiExchange(this.getContext(), this.getBinding());
     }
     
     @Override
@@ -199,11 +195,14 @@
         }
     }
 
+    /**
+     * Detach from the underlying JBI {@link MessageExchange}
+     * 
+     * @return the underlying {@link MessageExchange}
+     */
     public MessageExchange detach() {
-        try {
-            return messageExchange;
-        } finally {
-            messageExchange = null;
-        }
+        MessageExchange result = messageExchange;
+        messageExchange = null;
+        return result;
     }
 }

Modified: servicemix/smx3/branches/servicemix-3.2/deployables/serviceengines/servicemix-camel/src/test/java/org/apache/servicemix/camel/JbiInOnlyTest.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/branches/servicemix-3.2/deployables/serviceengines/servicemix-camel/src/test/java/org/apache/servicemix/camel/JbiInOnlyTest.java?rev=780618&r1=780617&r2=780618&view=diff
==============================================================================
--- servicemix/smx3/branches/servicemix-3.2/deployables/serviceengines/servicemix-camel/src/test/java/org/apache/servicemix/camel/JbiInOnlyTest.java
(original)
+++ servicemix/smx3/branches/servicemix-3.2/deployables/serviceengines/servicemix-camel/src/test/java/org/apache/servicemix/camel/JbiInOnlyTest.java
Mon Jun  1 11:26:40 2009
@@ -92,6 +92,7 @@
                 from("jbi:service:urn:test:in-only-aggregator")
                     .aggregator(header("key"))
                     .setHeader("aggregated").constant(true)
+                    .to("log:info")
                     .to("mock:aggregated");
             }
             



Mime
View raw message