camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject svn commit: r580933 - in /activemq/camel/trunk/components/camel-jms/src: main/java/org/apache/camel/component/jms/JmsConfiguration.java test/java/org/apache/camel/component/jms/JmsTransactedRouteTest.java
Date Mon, 01 Oct 2007 12:37:26 GMT
Author: jstrachan
Date: Mon Oct  1 05:37:24 2007
New Revision: 580933

URL: http://svn.apache.org/viewvc?rev=580933&view=rev
Log:
switched to CACHE_CONNECTION until Spring fixes their support for CACHE_LISTENER with transactions.
See CAMEL-163 for details

Modified:
    activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsConfiguration.java
    activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsTransactedRouteTest.java

Modified: activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsConfiguration.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsConfiguration.java?rev=580933&r1=580932&r2=580933&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsConfiguration.java
(original)
+++ activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsConfiguration.java
Mon Oct  1 05:37:24 2007
@@ -71,7 +71,7 @@
     private int maxMessagesPerTask = 1;
     private ServerSessionFactory serverSessionFactory;
     private int cacheLevel = -1;
-    private String cacheLevelName = "CACHE_CONSUMER";
+    private String cacheLevelName = "CACHE_CONNECTION";
     private long recoveryInterval = -1;
     private long receiveTimeout = -1;
     private int idleTaskExecutionLimit = 1;

Modified: activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsTransactedRouteTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsTransactedRouteTest.java?rev=580933&r1=580932&r2=580933&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsTransactedRouteTest.java
(original)
+++ activemq/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsTransactedRouteTest.java
Mon Oct  1 05:37:24 2007
@@ -24,6 +24,7 @@
 import org.apache.camel.builder.RouteBuilder;
 import static org.apache.camel.component.jms.JmsComponent.jmsComponentTransacted;
 import org.apache.camel.component.mock.MockEndpoint;
+import org.springframework.jms.listener.DefaultMessageListenerContainer;
 
 /**
  * @version $Revision$
@@ -32,11 +33,14 @@
     public void testJmsRouteWithTextMessage() throws Exception {
         MockEndpoint resultEndpoint = getMockEndpoint("mock:result");
         String expectedBody = "Hello there!";
+        String expectedBody2 = "Goodbye!";
 
-        resultEndpoint.expectedBodiesReceived(expectedBody);
+
+        resultEndpoint.expectedBodiesReceived(expectedBody, expectedBody2);
         resultEndpoint.message(0).header("cheese").isEqualTo(123);
 
         template.sendBodyAndHeader("activemq:test.a", expectedBody, "cheese", 123);
+        template.sendBodyAndHeader("activemq:test.a", expectedBody2, "cheese", 124);
 
         resultEndpoint.assertIsSatisfied();
     }
@@ -45,7 +49,10 @@
         CamelContext camelContext = super.createCamelContext();
 
         ConnectionFactory connectionFactory = new ActiveMQConnectionFactory("vm://localhost?broker.persistent=false&broker.useJmx=false");
-        camelContext.addComponent("activemq", jmsComponentTransacted(connectionFactory));
+        JmsComponent component = jmsComponentTransacted(connectionFactory);
+        //component.getConfiguration().setCacheLevelName("CACHE_CONNECTION");
+        //component.getConfiguration().setCacheLevel(DefaultMessageListenerContainer.CACHE_CONNECTION);
+        camelContext.addComponent("activemq", component);
         return camelContext;
     }
 



Mime
View raw message