activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtu...@apache.org
Subject svn commit: r801559 - in /activemq/trunk: ./ activemq-camel/src/main/java/org/apache/activemq/camel/ activemq-camel/src/test/java/org/apache/activemq/camel/component/
Date Thu, 06 Aug 2009 09:25:41 GMT
Author: gtully
Date: Thu Aug  6 09:25:41 2009
New Revision: 801559

URL: http://svn.apache.org/viewvc?rev=801559&view=rev
Log:
apply patch from https://issues.apache.org/activemq/browse/AMQ-2348 - update to camel-2.0-M3
- with thanks

Modified:
    activemq/trunk/activemq-camel/src/main/java/org/apache/activemq/camel/CamelMessageProducer.java
    activemq/trunk/activemq-camel/src/test/java/org/apache/activemq/camel/component/ActiveMQJmsHeaderRouteTest.java
    activemq/trunk/activemq-camel/src/test/java/org/apache/activemq/camel/component/JournalRouteTest.java
    activemq/trunk/pom.xml

Modified: activemq/trunk/activemq-camel/src/main/java/org/apache/activemq/camel/CamelMessageProducer.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-camel/src/main/java/org/apache/activemq/camel/CamelMessageProducer.java?rev=801559&r1=801558&r2=801559&view=diff
==============================================================================
--- activemq/trunk/activemq-camel/src/main/java/org/apache/activemq/camel/CamelMessageProducer.java
(original)
+++ activemq/trunk/activemq-camel/src/main/java/org/apache/activemq/camel/CamelMessageProducer.java
Thu Aug  6 09:25:41 2009
@@ -25,9 +25,10 @@
 import org.apache.activemq.ActiveMQSession;
 import org.apache.activemq.util.JMSExceptionSupport;
 import org.apache.camel.Endpoint;
+import org.apache.camel.Exchange;
 import org.apache.camel.ExchangePattern;
 import org.apache.camel.Producer;
-import org.apache.camel.component.jms.JmsExchange;
+import org.apache.camel.component.jms.JmsMessage;
 import org.apache.camel.util.ObjectHelper;
 
 /**
@@ -87,7 +88,8 @@
             throw new IllegalArgumentException("Invalid destination setting: " + destination
+ " when expected: " + this.destination);
         }
         try {
-            JmsExchange exchange = new JmsExchange(endpoint, ExchangePattern.InOnly, camelDestination.getBinding(),
message);
+			Exchange exchange = endpoint.createExchange(ExchangePattern.InOnly);
+			exchange.setIn(new JmsMessage(message, camelDestination.getBinding()));
             producer.process(exchange);
         } catch (JMSException e) {
             throw e;

Modified: activemq/trunk/activemq-camel/src/test/java/org/apache/activemq/camel/component/ActiveMQJmsHeaderRouteTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-camel/src/test/java/org/apache/activemq/camel/component/ActiveMQJmsHeaderRouteTest.java?rev=801559&r1=801558&r2=801559&view=diff
==============================================================================
--- activemq/trunk/activemq-camel/src/test/java/org/apache/activemq/camel/component/ActiveMQJmsHeaderRouteTest.java
(original)
+++ activemq/trunk/activemq-camel/src/test/java/org/apache/activemq/camel/component/ActiveMQJmsHeaderRouteTest.java
Thu Aug  6 09:25:41 2009
@@ -30,7 +30,7 @@
 import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
 import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.component.jms.JmsExchange;
+import org.apache.camel.component.jms.JmsMessage;
 import org.apache.camel.component.mock.AssertionClause;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.commons.logging.Log;
@@ -85,12 +85,11 @@
                 from("activemq:test.a").process(new Processor() {
                     public void process(Exchange exchange) throws Exception {
                         // lets set the custom JMS headers using the JMS API
-                        JmsExchange jmsExchange = assertIsInstanceOf(JmsExchange.class, exchange);
-                        
-                        Message inMessage = jmsExchange.getInMessage();
-                        inMessage.setJMSReplyTo(replyQueue);
-                        inMessage.setJMSCorrelationID(correlationID);
-                        inMessage.setJMSType(messageType);
+						JmsMessage jmsMessage = assertIsInstanceOf(JmsMessage.class, exchange.getIn());
+						
+                        jmsMessage.getJmsMessage().setJMSReplyTo(replyQueue);
+                        jmsMessage.getJmsMessage().setJMSCorrelationID(correlationID);
+                        jmsMessage.getJmsMessage().setJMSType(messageType);
                     }
                 }).to("activemq:test.b?preserveMessageQos=true");
 

Modified: activemq/trunk/activemq-camel/src/test/java/org/apache/activemq/camel/component/JournalRouteTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-camel/src/test/java/org/apache/activemq/camel/component/JournalRouteTest.java?rev=801559&r1=801558&r2=801559&view=diff
==============================================================================
--- activemq/trunk/activemq-camel/src/test/java/org/apache/activemq/camel/component/JournalRouteTest.java
(original)
+++ activemq/trunk/activemq-camel/src/test/java/org/apache/activemq/camel/component/JournalRouteTest.java
Thu Aug  6 09:25:41 2009
@@ -19,11 +19,13 @@
 import java.util.List;
 
 import org.apache.activemq.util.ByteSequence;
+import org.apache.camel.CamelContext;
 import org.apache.camel.ContextTestSupport;
 import org.apache.camel.Exchange;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.AssertionClause;
 import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.impl.DefaultCamelContext;
 
 /**
  * @version $Revision$
@@ -39,7 +41,7 @@
         resultEndpoint.expectedMessageCount(1);
         
         AssertionClause firstMessageExpectations = resultEndpoint.message(0);
-        firstMessageExpectations.header("journal").isEqualTo("activemq.journal:target/test.a");
+        firstMessageExpectations.header("journal").isEqualTo("activemq.journal://target/test.a");
         firstMessageExpectations.header("location").isNotNull();
         firstMessageExpectations.body().isInstanceOf(ByteSequence.class);
 

Modified: activemq/trunk/pom.xml
URL: http://svn.apache.org/viewvc/activemq/trunk/pom.xml?rev=801559&r1=801558&r2=801559&view=diff
==============================================================================
--- activemq/trunk/pom.xml (original)
+++ activemq/trunk/pom.xml Thu Aug  6 09:25:41 2009
@@ -43,7 +43,7 @@
     <aopalliance-version>1.0</aopalliance-version>
     <axion-version>1.0-M3-dev</axion-version>
     <axis-version>1.2-RC1</axis-version>
-    <camel-version>2.0-M2</camel-version>
+    <camel-version>2.0-M3</camel-version>
     <cglib-version>2.0</cglib-version>
     <commons-beanutils-version>1.6.1</commons-beanutils-version>
     <commons-collections-version>3.2.1</commons-collections-version>



Mime
View raw message