camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r758743 - in /camel/branches/camel-1.x: ./ tests/camel-itest/src/test/java/org/apache/camel/itest/tx/ tests/camel-itest/src/test/resources/org/apache/camel/itest/tx/
Date Thu, 26 Mar 2009 17:01:45 GMT
Author: davsclaus
Date: Thu Mar 26 17:00:53 2009
New Revision: 758743

URL: http://svn.apache.org/viewvc?rev=758743&view=rev
Log:
Merged revisions 756939 via svnmerge from 
https://svn.apache.org/repos/asf/camel/trunk

........
  r756939 | davsclaus | 2009-03-21 14:56:00 +0100 (Sat, 21 Mar 2009) | 1 line
  
  Added jms-http with TX example using Spring Testing.
........

Added:
    camel/branches/camel-1.x/tests/camel-itest/src/test/java/org/apache/camel/itest/tx/
      - copied from r756939, camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/tx/
    camel/branches/camel-1.x/tests/camel-itest/src/test/java/org/apache/camel/itest/tx/JmsToHttpRoute.java
      - copied, changed from r756939, camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/tx/JmsToHttpRoute.java
    camel/branches/camel-1.x/tests/camel-itest/src/test/java/org/apache/camel/itest/tx/JmsToHttpTXTest.java
      - copied, changed from r756939, camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/tx/JmsToHttpTXTest.java
    camel/branches/camel-1.x/tests/camel-itest/src/test/resources/org/apache/camel/itest/tx/
      - copied from r756939, camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/tx/
    camel/branches/camel-1.x/tests/camel-itest/src/test/resources/org/apache/camel/itest/tx/JmsToHttpTXTest-context.xml
      - copied, changed from r756939, camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/tx/JmsToHttpTXTest-context.xml
Modified:
    camel/branches/camel-1.x/   (props changed)

Propchange: camel/branches/camel-1.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Mar 26 17:00:53 2009
@@ -1 +1 @@
-/camel/trunk:736980,739733,739904,740251,740295,740306,740596,740663,741848,742231,742705,742739,742854,742856,742898,742906,743613,743762,743773,743920,743959-743960,744123,745105,745367,745541,745751,745826,745978,746269,746872,746895,746962,747258,747678-747704,748392,748436,748821,749563-749564,749574,749628-749629,749936,749956,750017,750334,750396,750761,750796,752068,752117,752418,752751-752755,752764-752773,752956,753087,753101,753175,755136,755487,756313,756348,756870,757636,757693,757743,757865,758539,758563,758600,758617,758692
+/camel/trunk:736980,739733,739904,740251,740295,740306,740596,740663,741848,742231,742705,742739,742854,742856,742898,742906,743613,743762,743773,743920,743959-743960,744123,745105,745367,745541,745751,745826,745978,746269,746872,746895,746962,747258,747678-747704,748392,748436,748821,749563-749564,749574,749628-749629,749936,749956,750017,750334,750396,750761,750796,752068,752117,752418,752751-752755,752764-752773,752956,753087,753101,753175,755136,755487,756313,756348,756870,756939,757636,757693,757743,757865,758539,758563,758600,758617,758692

Propchange: camel/branches/camel-1.x/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Copied: camel/branches/camel-1.x/tests/camel-itest/src/test/java/org/apache/camel/itest/tx/JmsToHttpRoute.java
(from r756939, camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/tx/JmsToHttpRoute.java)
URL: http://svn.apache.org/viewvc/camel/branches/camel-1.x/tests/camel-itest/src/test/java/org/apache/camel/itest/tx/JmsToHttpRoute.java?p2=camel/branches/camel-1.x/tests/camel-itest/src/test/java/org/apache/camel/itest/tx/JmsToHttpRoute.java&p1=camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/tx/JmsToHttpRoute.java&r1=756939&r2=758743&rev=758743&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/tx/JmsToHttpRoute.java
(original)
+++ camel/branches/camel-1.x/tests/camel-itest/src/test/java/org/apache/camel/itest/tx/JmsToHttpRoute.java
Thu Mar 26 17:00:53 2009
@@ -36,14 +36,14 @@
  */
 public class JmsToHttpRoute extends SpringRouteBuilder {
 
+    private static int counter;
+
     @Resource(name = "PROPAGATION_REQUIRED")
     private SpringTransactionPolicy required;
 
     @EndpointInject(name = "data")
     private Endpoint data;
 
-    private static int counter;
-
     private String nok = "<?xml version=\"1.0\"?><reply><status>nok</status></reply>";
     private String ok  = "<?xml version=\"1.0\"?><reply><status>ok</status></reply>";
 

Copied: camel/branches/camel-1.x/tests/camel-itest/src/test/java/org/apache/camel/itest/tx/JmsToHttpTXTest.java
(from r756939, camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/tx/JmsToHttpTXTest.java)
URL: http://svn.apache.org/viewvc/camel/branches/camel-1.x/tests/camel-itest/src/test/java/org/apache/camel/itest/tx/JmsToHttpTXTest.java?p2=camel/branches/camel-1.x/tests/camel-itest/src/test/java/org/apache/camel/itest/tx/JmsToHttpTXTest.java&p1=camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/tx/JmsToHttpTXTest.java&r1=756939&r2=758743&rev=758743&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/tx/JmsToHttpTXTest.java
(original)
+++ camel/branches/camel-1.x/tests/camel-itest/src/test/java/org/apache/camel/itest/tx/JmsToHttpTXTest.java
Thu Mar 26 17:00:53 2009
@@ -16,6 +16,9 @@
  */
 package org.apache.camel.itest.tx;
 
+import javax.annotation.Resource;
+
+import org.apache.camel.Endpoint;
 import org.apache.camel.EndpointInject;
 import org.apache.camel.ProducerTemplate;
 import org.apache.camel.component.mock.MockEndpoint;
@@ -38,11 +41,14 @@
     @EndpointInject(uri = "mock:rollback")
     MockEndpoint mock;
 
+    @Resource(name = "template")
+    ProducerTemplate template;
+
     // use the spring id to refer to the endpoint we should send data to
     // notice using this id we can setup the actual endpoint in spring XML
     // and we can even use spring ${ } propertiy in the spring XML
     @EndpointInject(name = "data")
-    private ProducerTemplate template;
+    private Endpoint data;
 
     // the ok response to expect
     private String ok  = "<?xml version=\"1.0\"?><reply><status>ok</status></reply>";
@@ -53,7 +59,7 @@
 
         // use requestBody to force a InOut message exchange pattern ( = request/reply)
         // will send and wait for a response
-        Object out = template.requestBody("<?xml version=\"1.0\"?><request><status
id=\"123\"/></request>");
+        Object out = template.requestBody(data, "<?xml version=\"1.0\"?><request><status
id=\"123\"/></request>");
 
         // compare response
         assertEquals(ok, out);

Copied: camel/branches/camel-1.x/tests/camel-itest/src/test/resources/org/apache/camel/itest/tx/JmsToHttpTXTest-context.xml
(from r756939, camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/tx/JmsToHttpTXTest-context.xml)
URL: http://svn.apache.org/viewvc/camel/branches/camel-1.x/tests/camel-itest/src/test/resources/org/apache/camel/itest/tx/JmsToHttpTXTest-context.xml?p2=camel/branches/camel-1.x/tests/camel-itest/src/test/resources/org/apache/camel/itest/tx/JmsToHttpTXTest-context.xml&p1=camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/tx/JmsToHttpTXTest-context.xml&r1=756939&r2=758743&rev=758743&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest/src/test/resources/org/apache/camel/itest/tx/JmsToHttpTXTest-context.xml
(original)
+++ camel/branches/camel-1.x/tests/camel-itest/src/test/resources/org/apache/camel/itest/tx/JmsToHttpTXTest-context.xml
Thu Mar 26 17:00:53 2009
@@ -20,7 +20,7 @@
        xmlns:broker="http://activemq.apache.org/schema/core"
        xsi:schemaLocation="
        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
-       http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
+       http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd
        http://activemq.apache.org/schema/core http://activemq.org/config/1.0/1.0.xsd">
 
     <!-- ActiveMQ broker -->
@@ -60,10 +60,13 @@
     </bean>
 
     <!-- Camel context -->
-    <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
+    <camelContext id="camel" xmlns="http://activemq.apache.org/camel/schema/spring">
         <!-- find our router in this package -->
         <package>org.apache.camel.itest.tx</package>
 
+        <!-- define a producer template with this id we can use -->
+        <template id="template"/>
+
         <!-- define our data endpoint as the activemq queue we send a message to -->
         <endpoint id="data" uri="activemq:queue:data"/>
     </camelContext>



Mime
View raw message