servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject svn commit: r663908 - in /servicemix/smx3/branches/servicemix-3.2: ./ deployables/serviceengines/servicemix-camel/src/main/java/org/apache/servicemix/camel/ deployables/serviceengines/servicemix-camel/src/test/java/org/apache/servicemix/camel/
Date Fri, 06 Jun 2008 12:20:45 GMT
Author: jstrachan
Date: Fri Jun  6 05:20:44 2008
New Revision: 663908

URL: http://svn.apache.org/viewvc?rev=663908&view=rev
Log:
Migrated servicemix-camel over to 1.4-SNAPSHOT ready for the 1.4 release of Camel

Modified:
    servicemix/smx3/branches/servicemix-3.2/deployables/serviceengines/servicemix-camel/src/main/java/org/apache/servicemix/camel/CamelJbiEndpoint.java
    servicemix/smx3/branches/servicemix-3.2/deployables/serviceengines/servicemix-camel/src/main/java/org/apache/servicemix/camel/JbiEndpoint.java
    servicemix/smx3/branches/servicemix-3.2/deployables/serviceengines/servicemix-camel/src/main/java/org/apache/servicemix/camel/JbiMessage.java
    servicemix/smx3/branches/servicemix-3.2/deployables/serviceengines/servicemix-camel/src/test/java/org/apache/servicemix/camel/JbiTestSupport.java
    servicemix/smx3/branches/servicemix-3.2/pom.xml

Modified: servicemix/smx3/branches/servicemix-3.2/deployables/serviceengines/servicemix-camel/src/main/java/org/apache/servicemix/camel/CamelJbiEndpoint.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/branches/servicemix-3.2/deployables/serviceengines/servicemix-camel/src/main/java/org/apache/servicemix/camel/CamelJbiEndpoint.java?rev=663908&r1=663907&r2=663908&view=diff
==============================================================================
--- servicemix/smx3/branches/servicemix-3.2/deployables/serviceengines/servicemix-camel/src/main/java/org/apache/servicemix/camel/CamelJbiEndpoint.java
(original)
+++ servicemix/smx3/branches/servicemix-3.2/deployables/serviceengines/servicemix-camel/src/main/java/org/apache/servicemix/camel/CamelJbiEndpoint.java
Fri Jun  6 05:20:44 2008
@@ -90,14 +90,14 @@
                 if (LOG.isDebugEnabled()) {
                     LOG.debug("Received exchange: " + exchange);
                 }
-                JbiExchange camelExchange = new JbiExchange(camelEndpoint.getContext(), binding,
exchange);
+                JbiExchange camelExchange = new JbiExchange(camelEndpoint.getCamelContext(),
binding, exchange);
                 camelProcessor.process(camelExchange);
                 done(exchange);
             } else {
                 if (LOG.isDebugEnabled()) {
                     LOG.debug("Received exchange: " + exchange);
                 }
-                JbiExchange camelExchange = new JbiExchange(camelEndpoint.getContext(), binding,
exchange);
+                JbiExchange camelExchange = new JbiExchange(camelEndpoint.getCamelContext(),
binding, exchange);
                 camelProcessor.process(camelExchange);
                 boolean txSync = exchange.isTransacted() && Boolean.TRUE.equals(exchange.getProperty(JbiConstants.SEND_SYNC));
                 if (txSync) {

Modified: servicemix/smx3/branches/servicemix-3.2/deployables/serviceengines/servicemix-camel/src/main/java/org/apache/servicemix/camel/JbiEndpoint.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/branches/servicemix-3.2/deployables/serviceengines/servicemix-camel/src/main/java/org/apache/servicemix/camel/JbiEndpoint.java?rev=663908&r1=663907&r2=663908&view=diff
==============================================================================
--- servicemix/smx3/branches/servicemix-3.2/deployables/serviceengines/servicemix-camel/src/main/java/org/apache/servicemix/camel/JbiEndpoint.java
(original)
+++ servicemix/smx3/branches/servicemix-3.2/deployables/serviceengines/servicemix-camel/src/main/java/org/apache/servicemix/camel/JbiEndpoint.java
Fri Jun  6 05:20:44 2008
@@ -122,7 +122,7 @@
     }
 
     public JbiExchange createExchange() {
-        return new JbiExchange(getContext(), getBinding());
+        return new JbiExchange(getCamelContext(), getBinding());
     }
 
     public JbiBinding getBinding() {

Modified: servicemix/smx3/branches/servicemix-3.2/deployables/serviceengines/servicemix-camel/src/main/java/org/apache/servicemix/camel/JbiMessage.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/branches/servicemix-3.2/deployables/serviceengines/servicemix-camel/src/main/java/org/apache/servicemix/camel/JbiMessage.java?rev=663908&r1=663907&r2=663908&view=diff
==============================================================================
--- servicemix/smx3/branches/servicemix-3.2/deployables/serviceengines/servicemix-camel/src/main/java/org/apache/servicemix/camel/JbiMessage.java
(original)
+++ servicemix/smx3/branches/servicemix-3.2/deployables/serviceengines/servicemix-camel/src/main/java/org/apache/servicemix/camel/JbiMessage.java
Fri Jun  6 05:20:44 2008
@@ -50,8 +50,7 @@
         }
     }
 
-    @Override
-    public JbiExchange getExchange() {
+    public JbiExchange getJbiExchange() {
         return (JbiExchange) super.getExchange();
     }
 
@@ -97,7 +96,10 @@
     @Override
     protected Object createBody() {
         if (normalizedMessage != null) {
-            return getExchange().getBinding().extractBodyFromJbi(getExchange(), normalizedMessage);
+            JbiExchange jbiExchange = getJbiExchange();
+            if (jbiExchange != null) {
+                return jbiExchange.getBinding().extractBodyFromJbi(jbiExchange, normalizedMessage);
+            }
         }
         return null;
     }
@@ -118,7 +120,10 @@
     public void setBody(Object body) {
         if (normalizedMessage != null) {
             if (!(body instanceof Source)) {
-                body = getExchange().getBinding().convertBodyToJbi(getExchange(), body);
+                JbiExchange jbiExchange = getJbiExchange();
+                if (jbiExchange != null) {
+                    body = jbiExchange.getBinding().convertBodyToJbi(jbiExchange, body);
+                }
             }
             try {
                 normalizedMessage.setContent((Source) body);

Modified: servicemix/smx3/branches/servicemix-3.2/deployables/serviceengines/servicemix-camel/src/test/java/org/apache/servicemix/camel/JbiTestSupport.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/branches/servicemix-3.2/deployables/serviceengines/servicemix-camel/src/test/java/org/apache/servicemix/camel/JbiTestSupport.java?rev=663908&r1=663907&r2=663908&view=diff
==============================================================================
--- servicemix/smx3/branches/servicemix-3.2/deployables/serviceengines/servicemix-camel/src/test/java/org/apache/servicemix/camel/JbiTestSupport.java
(original)
+++ servicemix/smx3/branches/servicemix-3.2/deployables/serviceengines/servicemix-camel/src/test/java/org/apache/servicemix/camel/JbiTestSupport.java
Fri Jun  6 05:20:44 2008
@@ -28,10 +28,10 @@
 import org.apache.camel.Exchange;
 import org.apache.camel.Message;
 import org.apache.camel.Processor;
+import org.apache.camel.ProducerTemplate;
 import org.apache.camel.TestSupport;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.impl.DefaultCamelContext;
-import org.apache.camel.util.ProducerCache;
 import org.apache.servicemix.jbi.container.ActivationSpec;
 import org.apache.servicemix.jbi.container.SpringJBIContainer;
 
@@ -51,7 +51,7 @@
 
     protected String startEndpointUri = "jbi:endpoint:serviceNamespace:serviceA:endpointA";
 
-    protected ProducerCache<Exchange> client = new ProducerCache<Exchange>();
+    protected ProducerTemplate<Exchange> client = camelContext.createProducerTemplate();
 
     /**
      * Sends an exchange to the endpoint

Modified: servicemix/smx3/branches/servicemix-3.2/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/smx3/branches/servicemix-3.2/pom.xml?rev=663908&r1=663907&r2=663908&view=diff
==============================================================================
--- servicemix/smx3/branches/servicemix-3.2/pom.xml (original)
+++ servicemix/smx3/branches/servicemix-3.2/pom.xml Fri Jun  6 05:20:44 2008
@@ -207,7 +207,7 @@
         <activemq-version>4.1.1</activemq-version>
         <activeio-version>3.0.0-incubator</activeio-version>
         <backport-util-concurrent-version>2.2</backport-util-concurrent-version>
-        <camel-version>1.3.0</camel-version>
+        <camel-version>1.4-SNAPSHOT</camel-version>
         <jencks-version>2.1</jencks-version>
         <jetty-version>6.1.6</jetty-version>
         <geronimo-version>2.0.1</geronimo-version>



Mime
View raw message