You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ni...@apache.org on 2010/03/16 12:02:56 UTC

svn commit: r923689 - in /camel/trunk/examples/camel-example-cafe/src: main/resources/META-INF/camel-routes.xml main/resources/META-INF/spring/camel-context.xml test/java/org/apache/camel/example/cafe/CafeRouteSpringTest.java

Author: ningjiang
Date: Tue Mar 16 11:02:56 2010
New Revision: 923689

URL: http://svn.apache.org/viewvc?rev=923689&view=rev
Log:
Fixed the build faile on camel-example-cafe

Added:
    camel/trunk/examples/camel-example-cafe/src/main/resources/META-INF/camel-routes.xml   (with props)
Modified:
    camel/trunk/examples/camel-example-cafe/src/main/resources/META-INF/spring/camel-context.xml
    camel/trunk/examples/camel-example-cafe/src/test/java/org/apache/camel/example/cafe/CafeRouteSpringTest.java

Added: camel/trunk/examples/camel-example-cafe/src/main/resources/META-INF/camel-routes.xml
URL: http://svn.apache.org/viewvc/camel/trunk/examples/camel-example-cafe/src/main/resources/META-INF/camel-routes.xml?rev=923689&view=auto
==============================================================================
--- camel/trunk/examples/camel-example-cafe/src/main/resources/META-INF/camel-routes.xml (added)
+++ camel/trunk/examples/camel-example-cafe/src/main/resources/META-INF/camel-routes.xml Tue Mar 16 11:02:56 2010
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       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">
+ 
+  <import resource="classpath:META-INF/beans.xml"/>
+  
+  <!-- START SNIPPET: e1 --> 
+  <camelContext id="camel"
+                xmlns="http://camel.apache.org/schema/spring">
+     <route>
+         <from uri="direct:cafe"/>
+         <split>
+            <method bean="orderSplitter"/>
+            <to uri="direct:drink"/>
+        </split>
+     </route>
+     <route>
+         <from uri="direct:drink" />
+         <recipientList>
+            <method bean="drinkRouter"/>
+         </recipientList>
+     </route>
+     <route>
+         <from uri="seda:coldDrinks?concurrentConsumers=2"/>
+         <to uri="bean:barista?method=prepareColdDrink"/>
+         <to uri="direct:deliveries"/>
+     </route>
+     <route>
+         <from uri="seda:hotDrinks?concurrentConsumers=3"/>
+         <to uri="bean:barista?method=prepareHotDrink"/>
+         <to uri="direct:deliveries"/>
+     </route>
+     <route>
+         <from uri="direct:deliveries"/>
+         <aggregate strategyRef="aggregatorStrategy" completionTimeout="5000">
+             <correlationExpression>  
+                 <method bean="waiter" method="checkOrder" />
+             </correlationExpression>  
+      	     <to uri="bean:waiter?method=prepareDelivery"/>
+      	     <to uri="bean:waiter?method=deliverCafes"/>
+         </aggregate>
+     </route>
+  </camelContext>
+  <!-- END SNIPPET: e1 -->
+
+</beans>

Propchange: camel/trunk/examples/camel-example-cafe/src/main/resources/META-INF/camel-routes.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/examples/camel-example-cafe/src/main/resources/META-INF/camel-routes.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: camel/trunk/examples/camel-example-cafe/src/main/resources/META-INF/camel-routes.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: camel/trunk/examples/camel-example-cafe/src/main/resources/META-INF/spring/camel-context.xml
URL: http://svn.apache.org/viewvc/camel/trunk/examples/camel-example-cafe/src/main/resources/META-INF/spring/camel-context.xml?rev=923689&r1=923688&r2=923689&view=diff
==============================================================================
--- camel/trunk/examples/camel-example-cafe/src/main/resources/META-INF/spring/camel-context.xml (original)
+++ camel/trunk/examples/camel-example-cafe/src/main/resources/META-INF/spring/camel-context.xml Tue Mar 16 11:02:56 2010
@@ -22,45 +22,9 @@
        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">
  
-  <import resource="classpath:META-INF/beans.xml"/>
+  <import resource="classpath:META-INF/camel-routes.xml"/>
   
+  <!-- The customer beans which send the cafe order every 60 seconds -->
   <bean id="customer" class="org.apache.camel.example.cafe.Customer"/>
- 
-  <camelContext id="camel"
-                xmlns="http://camel.apache.org/schema/spring">
-     <route>
-         <from uri="direct:cafe"/>
-         <split>
-            <method bean="orderSplitter"/>
-            <to uri="direct:drink"/>
-        </split>
-     </route>
-     <route>
-         <from uri="direct:drink" />
-         <recipientList>
-            <method bean="drinkRouter"/>
-         </recipientList>
-     </route>
-     <route>
-         <from uri="seda:coldDrinks?concurrentConsumers=2"/>
-         <to uri="bean:barista?method=prepareColdDrink"/>
-         <to uri="direct:deliveries"/>
-     </route>
-     <route>
-         <from uri="seda:hotDrinks?concurrentConsumers=3"/>
-         <to uri="bean:barista?method=prepareHotDrink"/>
-         <to uri="direct:deliveries"/>
-     </route>
-     <route>
-         <from uri="direct:deliveries"/>
-         <aggregate strategyRef="aggregatorStrategy" completionTimeout="5000">
-             <correlationExpression>  
-                 <method bean="waiter" method="checkOrder" />
-             </correlationExpression>  
-      	     <to uri="bean:waiter?method=prepareDelivery"/>
-      	     <to uri="bean:waiter?method=deliverCafes"/>
-         </aggregate>
-     </route>
-  </camelContext>
-
+  
 </beans>

Modified: camel/trunk/examples/camel-example-cafe/src/test/java/org/apache/camel/example/cafe/CafeRouteSpringTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/examples/camel-example-cafe/src/test/java/org/apache/camel/example/cafe/CafeRouteSpringTest.java?rev=923689&r1=923688&r2=923689&view=diff
==============================================================================
--- camel/trunk/examples/camel-example-cafe/src/test/java/org/apache/camel/example/cafe/CafeRouteSpringTest.java (original)
+++ camel/trunk/examples/camel-example-cafe/src/test/java/org/apache/camel/example/cafe/CafeRouteSpringTest.java Tue Mar 16 11:02:56 2010
@@ -32,7 +32,7 @@ public class CafeRouteSpringTest extends
     
     @Before
     public void setUp() throws Exception {
-        applicationContext = new ClassPathXmlApplicationContext("META-INF/spring/camel-context.xml");
+        applicationContext = new ClassPathXmlApplicationContext("META-INF/camel-routes.xml");
         setUseRouteBuilder(false);
         super.setUp();
         waiter = (TestWaiter) applicationContext.getBean("waiter");