camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r775503 - in /camel/trunk: camel-core/src/main/java/org/apache/camel/model/ camel-core/src/main/java/org/apache/camel/model/loadbalancer/ camel-core/src/test/java/org/apache/camel/model/ camel-core/src/test/java/org/apache/camel/processor/ ...
Date Sat, 16 May 2009 18:15:25 GMT
Author: davsclaus
Date: Sat May 16 18:15:24 2009
New Revision: 775503

URL: http://svn.apache.org/viewvc?rev=775503&view=rev
Log:
CAMEL-1620, CAMEL-1621: Added unit test for load balancer. Added easier spring DSL for sticky load balancer.

Added:
    camel/trunk/camel-core/src/test/java/org/apache/camel/processor/CustomLoadBalanceTest.java   (with props)
    camel/trunk/camel-core/src/test/java/org/apache/camel/processor/RandomLoadBalanceTest.java   (with props)
    camel/trunk/camel-core/src/test/java/org/apache/camel/processor/RoundRobinLoadBalanceTest.java   (contents, props changed)
      - copied, changed from r775468, camel/trunk/camel-core/src/test/java/org/apache/camel/processor/LoadBalanceTest.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/processor/StickyLoadBalanceTest.java   (with props)
    camel/trunk/camel-core/src/test/java/org/apache/camel/processor/TopicLoadBalanceTest.java   (with props)
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringRandomLoadBalanceTest.java   (with props)
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringRoundRobinLoadBalanceTest.java   (contents, props changed)
      - copied, changed from r775468, camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringLoadBalanceTest.java
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringStickyLoadBalanceTest.java   (with props)
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringTopicLoadBalanceTest.java   (with props)
    camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/randomLoadBalance.xml   (with props)
    camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/roundRobinLoadBalance.xml   (contents, props changed)
      - copied, changed from r775468, camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/loadBalance.xml
    camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/stickyLoadBalance.xml   (with props)
    camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/topicLoadBalance.xml   (with props)
Removed:
    camel/trunk/camel-core/src/test/java/org/apache/camel/processor/LoadBalanceTest.java
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringLoadBalanceTest.java
    camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/loadBalance.xml
Modified:
    camel/trunk/camel-core/src/main/java/org/apache/camel/model/LoadBalanceDefinition.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/model/ProcessorDefinition.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/model/loadbalancer/FailOverLoadBalanceStrategy.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/model/loadbalancer/RandomLoadBalanceStrategy.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/model/loadbalancer/RoundRobinLoadBalanceStrategy.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/model/loadbalancer/StickyLoadBalanceStrategy.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/model/loadbalancer/TopicLoadBalanceStrategy.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/model/XmlParseTest.java
    camel/trunk/camel-core/src/test/resources/org/apache/camel/model/routeWithStickyLoadBalance.xml
    camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/failOverLoadBalance.xml

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/model/LoadBalanceDefinition.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/model/LoadBalanceDefinition.java?rev=775503&r1=775502&r2=775503&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/model/LoadBalanceDefinition.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/model/LoadBalanceDefinition.java Sat May 16 18:15:24 2009
@@ -129,13 +129,14 @@
     
     // Fluent API
     // -------------------------------------------------------------------------
+
     /**
-     * Sets the load balancer to use
+     * Uses a custom load balancer
      *
      * @param loadBalancer  the load balancer
      * @return the builder
      */
-    public LoadBalanceDefinition setLoadBalancer(LoadBalancer loadBalancer) {
+    public LoadBalanceDefinition loadBalance(LoadBalancer loadBalancer) {
         loadBalancerType = new LoadBalancerDefinition(loadBalancer);
         return this;
     }

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/model/ProcessorDefinition.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ProcessorDefinition.java?rev=775503&r1=775502&r2=775503&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/model/ProcessorDefinition.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/model/ProcessorDefinition.java Sat May 16 18:15:24 2009
@@ -49,6 +49,7 @@
 import org.apache.camel.processor.DefaultChannel;
 import org.apache.camel.processor.InterceptEndpointProcessor;
 import org.apache.camel.processor.Pipeline;
+import org.apache.camel.processor.loadbalancer.LoadBalancer;
 import org.apache.camel.processor.aggregate.AggregationCollection;
 import org.apache.camel.processor.aggregate.AggregationStrategy;
 import org.apache.camel.spi.DataFormat;
@@ -840,6 +841,18 @@
         return answer;
     }
 
+    /**
+     * <a href="http://camel.apache.org/load-balancer.html">Load Balancer EIP:</a>
+     * Creates a loadbalance
+     *
+     * @param loadBalancer a custom load balancer to use
+     * @return  the builder
+     */
+    public LoadBalanceDefinition loadBalance(LoadBalancer loadBalancer) {
+        LoadBalanceDefinition answer = new LoadBalanceDefinition();
+        addOutput(answer);
+        return answer.loadBalance(loadBalancer);
+    }
 
     /**
      * <a href="http://camel.apache.org/content-based-router.html">Content Based Router EIP:</a>

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/model/loadbalancer/FailOverLoadBalanceStrategy.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/model/loadbalancer/FailOverLoadBalanceStrategy.java?rev=775503&r1=775502&r2=775503&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/model/loadbalancer/FailOverLoadBalanceStrategy.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/model/loadbalancer/FailOverLoadBalanceStrategy.java Sat May 16 18:15:24 2009
@@ -21,7 +21,6 @@
 import javax.xml.bind.annotation.XmlAttribute;
 import javax.xml.bind.annotation.XmlRootElement;
 
-import org.apache.camel.RuntimeCamelException;
 import org.apache.camel.processor.loadbalancer.FailOverLoadBalancer;
 import org.apache.camel.processor.loadbalancer.LoadBalancer;
 import org.apache.camel.spi.RouteContext;
@@ -30,17 +29,18 @@
 @XmlRootElement(name = "failOver")
 @XmlAccessorType(XmlAccessType.FIELD)
 public class FailOverLoadBalanceStrategy extends LoadBalancerDefinition {    
-    @XmlAttribute
+
+    @XmlAttribute (name = "exception", required = false)
     private String failedException;
     
     @Override
     protected LoadBalancer createLoadBalancer(RouteContext routeContext) {
         if (ObjectHelper.isNotEmpty(failedException)) {
-            Class failExceptionClazz = ObjectHelper.loadClass(failedException);
-            if (failExceptionClazz == null) {
-                throw new RuntimeCamelException("Cannot find failException: " + failedException + " to be used with this FailOverLoadBalancer");
+            Class type = routeContext.getCamelContext().getClassResolver().resolveClass(failedException);
+            if (type == null) {
+                throw new IllegalArgumentException("Cannot find class: " + failedException + " in the classpath");
             }
-            return new FailOverLoadBalancer(failExceptionClazz);
+            return new FailOverLoadBalancer(type);
         } else {
             return new FailOverLoadBalancer();
         }
@@ -54,5 +54,8 @@
         return failedException;
     }
 
-
+    @Override
+    public String toString() {
+        return "FailOverLoadBalancer";
+    }
 }

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/model/loadbalancer/RandomLoadBalanceStrategy.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/model/loadbalancer/RandomLoadBalanceStrategy.java?rev=775503&r1=775502&r2=775503&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/model/loadbalancer/RandomLoadBalanceStrategy.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/model/loadbalancer/RandomLoadBalanceStrategy.java Sat May 16 18:15:24 2009
@@ -33,4 +33,8 @@
         return new org.apache.camel.processor.loadbalancer.RandomLoadBalancer();
     }
 
+    @Override
+    public String toString() {
+        return "RandomLoadBalancer";
+    }
 }

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/model/loadbalancer/RoundRobinLoadBalanceStrategy.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/model/loadbalancer/RoundRobinLoadBalanceStrategy.java?rev=775503&r1=775502&r2=775503&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/model/loadbalancer/RoundRobinLoadBalanceStrategy.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/model/loadbalancer/RoundRobinLoadBalanceStrategy.java Sat May 16 18:15:24 2009
@@ -32,4 +32,9 @@
         return new org.apache.camel.processor.loadbalancer.RoundRobinLoadBalancer();
     }
 
+    @Override
+    public String toString() {
+        return "RoundRobinLoadBalancer";
+    }
+
 }

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/model/loadbalancer/StickyLoadBalanceStrategy.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/model/loadbalancer/StickyLoadBalanceStrategy.java?rev=775503&r1=775502&r2=775503&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/model/loadbalancer/StickyLoadBalanceStrategy.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/model/loadbalancer/StickyLoadBalanceStrategy.java Sat May 16 18:15:24 2009
@@ -21,8 +21,10 @@
 import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlRootElement;
 
-import org.apache.camel.model.language.ExpressionDefinition;
+import org.apache.camel.model.ExpressionSubElementDefinition;
 import org.apache.camel.processor.loadbalancer.LoadBalancer;
+import org.apache.camel.processor.loadbalancer.StickyLoadBalancer;
+import org.apache.camel.spi.RouteContext;
 
 /**
  * Represents an XML &lt;sticky/&gt; element
@@ -30,56 +32,25 @@
 @XmlRootElement(name = "sticky")
 @XmlAccessorType(XmlAccessType.FIELD)
 public class StickyLoadBalanceStrategy extends LoadBalancerDefinition {
-    @XmlElement(required = true, name = "expression", type = ExpressionDefinition.class)
-    private ExpressionDefinition expressionType;
-    @XmlElement(required = false, name = "loadBalancer", type = LoadBalancerDefinition.class)
-    private LoadBalancerDefinition loadBalancerType;
 
-    public StickyLoadBalanceStrategy() {
-        super("org.apache.camel.processor.loadbalancer.StickyLoadBalancer");
-    }
-
-    public StickyLoadBalanceStrategy(ExpressionDefinition expressionType) {
-        this();
-        this.expressionType = expressionType;
-    }
+    @XmlElement(name = "correlationExpression", required = false)
+    private ExpressionSubElementDefinition correlationExpression;
 
-    public StickyLoadBalanceStrategy(ExpressionDefinition expressionType, LoadBalancerDefinition loadBalancerType) {
-        this();
-        this.expressionType = expressionType;
-        this.loadBalancerType = loadBalancerType;
-    }
-
-    public void setExpressionType(ExpressionDefinition expressionType) {
-        this.expressionType = expressionType;
-    }
-
-    public ExpressionDefinition getExpressionType() {
-        return expressionType;
-    }
-
-    public void setLoadBalancerType(LoadBalancerDefinition loadBalancerType) {
-        this.loadBalancerType = loadBalancerType;
+    @Override
+    protected LoadBalancer createLoadBalancer(RouteContext routeContext) {
+        return new StickyLoadBalancer(correlationExpression.createExpression(routeContext));
     }
 
-    public LoadBalancerDefinition getLoadBalancerType() {
-        return loadBalancerType;
+    public ExpressionSubElementDefinition getCorrelationExpression() {
+        return correlationExpression;
     }
 
-    @Override
-    protected void configureLoadBalancer(LoadBalancer loadBalancer) {
-        ExpressionDefinition expression = getExpressionType();
-        if (expression != null) {
-            setProperty(loadBalancer, "correlationExpression", expression);
-        }
-        LoadBalancerDefinition type = getLoadBalancerType();
-        if (type != null) {
-            setProperty(loadBalancer, "loadBalancer", type);
-        }
+    public void setCorrelationExpression(ExpressionSubElementDefinition correlationExpression) {
+        this.correlationExpression = correlationExpression;
     }
 
     @Override
     public String toString() {
-        return "StickyLoadBalanceStrategy[" + expressionType + ", " + loadBalancerType + "]";
+        return "StickyLoadBalancer[" + correlationExpression + "]";
     }
 }

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/model/loadbalancer/TopicLoadBalanceStrategy.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/model/loadbalancer/TopicLoadBalanceStrategy.java?rev=775503&r1=775502&r2=775503&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/model/loadbalancer/TopicLoadBalanceStrategy.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/model/loadbalancer/TopicLoadBalanceStrategy.java Sat May 16 18:15:24 2009
@@ -27,9 +27,14 @@
  */
 @XmlRootElement(name = "topic")
 public class TopicLoadBalanceStrategy extends LoadBalancerDefinition {
+
     @Override
     protected LoadBalancer createLoadBalancer(RouteContext routeContext) {
         return new org.apache.camel.processor.loadbalancer.TopicLoadBalancer();
     }
 
+    @Override
+    public String toString() {
+        return "TopicLoadBalancer";
+    }
 }

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/model/XmlParseTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/model/XmlParseTest.java?rev=775503&r1=775502&r2=775503&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/model/XmlParseTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/model/XmlParseTest.java Sat May 16 18:15:24 2009
@@ -204,7 +204,7 @@
         assertEquals("Here should have 3 output here", 3, loadBalance.getOutputs().size());
         assertTrue("The loadBalancer shoud be StickyLoadBalanceStrategy", loadBalance.getLoadBalancerType() instanceof StickyLoadBalanceStrategy);
         StickyLoadBalanceStrategy strategy = (StickyLoadBalanceStrategy)loadBalance.getLoadBalancerType();
-        assertNotNull("the expression should not be null ", strategy.getExpressionType());
+        assertNotNull("the expression should not be null ", strategy.getCorrelationExpression());
     }
 
     public void testParseBatchResequencerXml() throws Exception {

Added: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/CustomLoadBalanceTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/CustomLoadBalanceTest.java?rev=775503&view=auto
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/CustomLoadBalanceTest.java (added)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/CustomLoadBalanceTest.java Sat May 16 18:15:24 2009
@@ -0,0 +1,80 @@
+/**
+ * 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.
+ */
+package org.apache.camel.processor;
+
+import org.apache.camel.ContextTestSupport;
+import org.apache.camel.Exchange;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.processor.loadbalancer.LoadBalancerSupport;
+
+public class CustomLoadBalanceTest extends ContextTestSupport {
+    protected MockEndpoint x;
+    protected MockEndpoint y;
+    protected MockEndpoint z;
+
+    @Override
+    protected void setUp() throws Exception {
+        super.setUp();
+
+        x = getMockEndpoint("mock:x");
+        y = getMockEndpoint("mock:y");
+        z = getMockEndpoint("mock:z");
+    }
+
+    protected RouteBuilder createRouteBuilder() {
+        return new RouteBuilder() {
+            public void configure() {
+                from("direct:start")
+                    .loadBalance(new MyLoadBalancer())
+                    .to("mock:x", "mock:y", "mock:z");
+            }
+        };
+    }
+
+    public void testCustomLoadBalancer() throws Exception {
+        x.expectedBodiesReceived("x", "x", "x");
+        y.expectedBodiesReceived("y", "y");
+        z.expectedBodiesReceived("foo", "bar", "baz");
+
+        template.sendBody("direct:start", "x");
+        template.sendBody("direct:start", "y");
+        template.sendBody("direct:start", "foo");
+        template.sendBody("direct:start", "bar");
+        template.sendBody("direct:start", "y");
+        template.sendBody("direct:start", "x");
+        template.sendBody("direct:start", "x");
+        template.sendBody("direct:start", "baz");
+
+        assertMockEndpointsSatisfied();
+    }
+
+    private class MyLoadBalancer extends LoadBalancerSupport {
+
+        public void process(Exchange exchange) throws Exception {
+            String body = exchange.getIn().getBody(String.class);
+            if ("x".equals(body)) {
+                getProcessors().get(0).process(exchange);
+            } else if ("y".equals(body)) {
+                getProcessors().get(1).process(exchange);
+            } else {
+                getProcessors().get(2).process(exchange);
+            }
+        }
+    }
+
+}
\ No newline at end of file

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/CustomLoadBalanceTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/CustomLoadBalanceTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/RandomLoadBalanceTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/RandomLoadBalanceTest.java?rev=775503&view=auto
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/RandomLoadBalanceTest.java (added)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/RandomLoadBalanceTest.java Sat May 16 18:15:24 2009
@@ -0,0 +1,59 @@
+/**
+ * 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.
+ */
+package org.apache.camel.processor;
+
+import org.apache.camel.ContextTestSupport;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.mock.MockEndpoint;
+
+public class RandomLoadBalanceTest extends ContextTestSupport {
+    protected MockEndpoint x;
+    protected MockEndpoint y;
+    protected MockEndpoint z;
+
+    @Override
+    protected void setUp() throws Exception {
+        super.setUp();
+
+        x = getMockEndpoint("mock:x");
+        y = getMockEndpoint("mock:y");
+        z = getMockEndpoint("mock:z");
+    }
+
+    protected RouteBuilder createRouteBuilder() {
+        return new RouteBuilder() {
+            public void configure() {
+                from("direct:start").loadBalance().
+                random().to("mock:x", "mock:y", "mock:z");
+            }
+        };
+    }
+
+    public void testRandom() throws Exception {
+        // it should be safe to assume that they should at least each get > 10 messages
+        x.expectedMinimumMessageCount(10);
+        y.expectedMinimumMessageCount(10);
+        z.expectedMinimumMessageCount(10);
+
+        for (int i = 0; i < 100; i++) {
+            template.sendBody("direct:start", "Hello World");
+        }
+
+        assertMockEndpointsSatisfied();
+    }
+
+}
\ No newline at end of file

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/RandomLoadBalanceTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/RandomLoadBalanceTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Copied: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/RoundRobinLoadBalanceTest.java (from r775468, camel/trunk/camel-core/src/test/java/org/apache/camel/processor/LoadBalanceTest.java)
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/RoundRobinLoadBalanceTest.java?p2=camel/trunk/camel-core/src/test/java/org/apache/camel/processor/RoundRobinLoadBalanceTest.java&p1=camel/trunk/camel-core/src/test/java/org/apache/camel/processor/LoadBalanceTest.java&r1=775468&r2=775503&rev=775503&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/LoadBalanceTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/RoundRobinLoadBalanceTest.java Sat May 16 18:15:24 2009
@@ -16,13 +16,12 @@
  */
 package org.apache.camel.processor;
 
-
 import org.apache.camel.ContextTestSupport;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
 import static org.apache.camel.component.mock.MockEndpoint.expectsMessageCount;
 
-public class LoadBalanceTest extends ContextTestSupport {
+public class RoundRobinLoadBalanceTest extends ContextTestSupport {
     protected MockEndpoint x;
     protected MockEndpoint y;
     protected MockEndpoint z;
@@ -69,12 +68,10 @@
         expectsMessageCount(0, x, y);
         sendMessage("bar", body);
         assertMockEndpointsSatisfied();
-
     }
 
     protected void sendMessage(final Object headerValue, final Object body) throws Exception {
         template.sendBodyAndHeader("direct:start", body, "foo", headerValue);
     }
 
-
 }

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/RoundRobinLoadBalanceTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/RoundRobinLoadBalanceTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/StickyLoadBalanceTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/StickyLoadBalanceTest.java?rev=775503&view=auto
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/StickyLoadBalanceTest.java (added)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/StickyLoadBalanceTest.java Sat May 16 18:15:24 2009
@@ -0,0 +1,63 @@
+/**
+ * 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.
+ */
+package org.apache.camel.processor;
+
+import org.apache.camel.ContextTestSupport;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.mock.MockEndpoint;
+
+public class StickyLoadBalanceTest extends ContextTestSupport {
+    protected MockEndpoint x;
+    protected MockEndpoint y;
+    protected MockEndpoint z;
+
+    @Override
+    protected void setUp() throws Exception {
+        super.setUp();
+
+        x = getMockEndpoint("mock:x");
+        y = getMockEndpoint("mock:y");
+        z = getMockEndpoint("mock:z");
+    }
+
+    protected RouteBuilder createRouteBuilder() {
+        return new RouteBuilder() {
+            public void configure() {
+                from("direct:start").loadBalance().
+                sticky(header("foo")).to("mock:x", "mock:y", "mock:z");
+            }
+        };
+    }
+
+    public void testSticky() throws Exception {
+        x.expectedBodiesReceived("A", "D", "F");
+        y.expectedBodiesReceived("B", "C", "G", "H");
+        z.expectedBodiesReceived("E");
+
+        template.sendBodyAndHeader("direct:start", "A", "foo", 1);
+        template.sendBodyAndHeader("direct:start", "B", "foo", 2);
+        template.sendBodyAndHeader("direct:start", "C", "foo", 2);
+        template.sendBodyAndHeader("direct:start", "D", "foo", 1);
+        template.sendBodyAndHeader("direct:start", "E", "foo", 3);
+        template.sendBodyAndHeader("direct:start", "F", "foo", 1);
+        template.sendBodyAndHeader("direct:start", "G", "foo", 2);
+        template.sendBodyAndHeader("direct:start", "H", "foo", 2);
+
+        assertMockEndpointsSatisfied();
+    }
+
+}
\ No newline at end of file

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/StickyLoadBalanceTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/StickyLoadBalanceTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/TopicLoadBalanceTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/TopicLoadBalanceTest.java?rev=775503&view=auto
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/TopicLoadBalanceTest.java (added)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/TopicLoadBalanceTest.java Sat May 16 18:15:24 2009
@@ -0,0 +1,71 @@
+/**
+ * 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.
+ */
+package org.apache.camel.processor;
+
+import org.apache.camel.ContextTestSupport;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.mock.MockEndpoint;
+
+public class TopicLoadBalanceTest extends ContextTestSupport {
+    protected MockEndpoint x;
+    protected MockEndpoint y;
+    protected MockEndpoint z;
+
+    @Override
+    protected void setUp() throws Exception {
+        super.setUp();
+
+        x = getMockEndpoint("mock:x");
+        y = getMockEndpoint("mock:y");
+        z = getMockEndpoint("mock:z");
+    }
+
+    protected RouteBuilder createRouteBuilder() {
+        return new RouteBuilder() {
+            public void configure() {
+                from("direct:start").loadBalance().
+                topic().to("mock:x", "mock:y", "mock:z");
+            }
+        };
+    }
+
+    public void testTopicManyMessages() throws Exception {
+        // they should all get the message
+        x.expectedMessageCount(10);
+        y.expectedMessageCount(10);
+        z.expectedMessageCount(10);
+
+        for (int i = 0; i < 10; i++) {
+            template.sendBody("direct:start", "Hello World");
+        }
+
+        assertMockEndpointsSatisfied();
+    }
+
+    public void testTopic() throws Exception {
+
+        // they should all get the message
+        x.expectedBodiesReceived("Hello World");
+        y.expectedBodiesReceived("Hello World");
+        z.expectedBodiesReceived("Hello World");
+
+        template.sendBody("direct:start", "Hello World");
+
+        assertMockEndpointsSatisfied();
+    }
+
+}
\ No newline at end of file

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/TopicLoadBalanceTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/TopicLoadBalanceTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: camel/trunk/camel-core/src/test/resources/org/apache/camel/model/routeWithStickyLoadBalance.xml
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/resources/org/apache/camel/model/routeWithStickyLoadBalance.xml?rev=775503&r1=775502&r2=775503&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/resources/org/apache/camel/model/routeWithStickyLoadBalance.xml (original)
+++ camel/trunk/camel-core/src/test/resources/org/apache/camel/model/routeWithStickyLoadBalance.xml Sat May 16 18:15:24 2009
@@ -20,9 +20,9 @@
     <from uri="seda:a"/>
     <loadBalance>
        <sticky>
-           <expression>
+           <correlationExpression>
                <language language="juel">in.header.foo == 'bar'</language>
-           </expression>
+           </correlationExpression>
        </sticky>
        <to uri="seda:b"/>      
        <to uri="seda:c"/>      

Added: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringRandomLoadBalanceTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringRandomLoadBalanceTest.java?rev=775503&view=auto
==============================================================================
--- camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringRandomLoadBalanceTest.java (added)
+++ camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringRandomLoadBalanceTest.java Sat May 16 18:15:24 2009
@@ -0,0 +1,29 @@
+/**
+ * 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.
+ */
+package org.apache.camel.spring.processor;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.processor.RandomLoadBalanceTest;
+import static org.apache.camel.spring.processor.SpringTestHelper.createSpringCamelContext;
+
+public class SpringRandomLoadBalanceTest extends RandomLoadBalanceTest {
+
+    protected CamelContext createCamelContext() throws Exception {
+        return createSpringCamelContext(this, "org/apache/camel/spring/processor/randomLoadBalance.xml");
+    }
+
+}
\ No newline at end of file

Propchange: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringRandomLoadBalanceTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringRandomLoadBalanceTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Copied: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringRoundRobinLoadBalanceTest.java (from r775468, camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringLoadBalanceTest.java)
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringRoundRobinLoadBalanceTest.java?p2=camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringRoundRobinLoadBalanceTest.java&p1=camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringLoadBalanceTest.java&r1=775468&r2=775503&rev=775503&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringLoadBalanceTest.java (original)
+++ camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringRoundRobinLoadBalanceTest.java Sat May 16 18:15:24 2009
@@ -16,15 +16,14 @@
  */
 package org.apache.camel.spring.processor;
 
-
 import org.apache.camel.CamelContext;
-import org.apache.camel.processor.LoadBalanceTest;
-
+import org.apache.camel.processor.RoundRobinLoadBalanceTest;
 import static org.apache.camel.spring.processor.SpringTestHelper.createSpringCamelContext;
 
-public class SpringLoadBalanceTest extends LoadBalanceTest {
+public class SpringRoundRobinLoadBalanceTest extends RoundRobinLoadBalanceTest {
+
     protected CamelContext createCamelContext() throws Exception {
-        return createSpringCamelContext(this, "org/apache/camel/spring/processor/loadBalance.xml");
+        return createSpringCamelContext(this, "org/apache/camel/spring/processor/roundRobinLoadBalance.xml");
     }
 
 }

Propchange: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringRoundRobinLoadBalanceTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringRoundRobinLoadBalanceTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringStickyLoadBalanceTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringStickyLoadBalanceTest.java?rev=775503&view=auto
==============================================================================
--- camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringStickyLoadBalanceTest.java (added)
+++ camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringStickyLoadBalanceTest.java Sat May 16 18:15:24 2009
@@ -0,0 +1,29 @@
+/**
+ * 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.
+ */
+package org.apache.camel.spring.processor;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.processor.StickyLoadBalanceTest;
+import static org.apache.camel.spring.processor.SpringTestHelper.createSpringCamelContext;
+
+public class SpringStickyLoadBalanceTest extends StickyLoadBalanceTest {
+
+    protected CamelContext createCamelContext() throws Exception {
+        return createSpringCamelContext(this, "org/apache/camel/spring/processor/stickyLoadBalance.xml");
+    }
+
+}
\ No newline at end of file

Propchange: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringStickyLoadBalanceTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringStickyLoadBalanceTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringTopicLoadBalanceTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringTopicLoadBalanceTest.java?rev=775503&view=auto
==============================================================================
--- camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringTopicLoadBalanceTest.java (added)
+++ camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringTopicLoadBalanceTest.java Sat May 16 18:15:24 2009
@@ -0,0 +1,30 @@
+/**
+ * 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.
+ */
+package org.apache.camel.spring.processor;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.processor.RandomLoadBalanceTest;
+import org.apache.camel.processor.TopicLoadBalanceTest;
+import static org.apache.camel.spring.processor.SpringTestHelper.createSpringCamelContext;
+
+public class SpringTopicLoadBalanceTest extends TopicLoadBalanceTest {
+
+    protected CamelContext createCamelContext() throws Exception {
+        return createSpringCamelContext(this, "org/apache/camel/spring/processor/topicLoadBalance.xml");
+    }
+
+}
\ No newline at end of file

Propchange: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringTopicLoadBalanceTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringTopicLoadBalanceTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/failOverLoadBalance.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/failOverLoadBalance.xml?rev=775503&r1=775502&r2=775503&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/failOverLoadBalance.xml (original)
+++ camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/failOverLoadBalance.xml Sat May 16 18:15:24 2009
@@ -38,7 +38,7 @@
     <route errorHandlerRef="noErrorHandler">
       <from uri="direct:customerException"/>
       <loadBalance>
-          <failOver failedException="org.apache.camel.processor.FailOverLoadBalanceTest$MyException"/>
+          <failOver exception="org.apache.camel.processor.FailOverLoadBalanceTest$MyException"/>
           <to uri="direct:x"/>
           <to uri="direct:y"/>
           <to uri="direct:z"/>

Added: camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/randomLoadBalance.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/randomLoadBalance.xml?rev=775503&view=auto
==============================================================================
--- camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/randomLoadBalance.xml (added)
+++ camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/randomLoadBalance.xml Sat May 16 18:15:24 2009
@@ -0,0 +1,39 @@
+<?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
+    ">
+
+  <!-- START SNIPPET: example -->
+  <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
+    <route>
+      <from uri="direct:start"/>
+      <loadBalance>
+          <random/>
+          <to uri="mock:x"/>
+          <to uri="mock:y"/>
+          <to uri="mock:z"/>
+      </loadBalance>
+    </route>
+  </camelContext>
+  <!-- END SNIPPET: example -->
+
+</beans>

Propchange: camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/randomLoadBalance.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/randomLoadBalance.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/randomLoadBalance.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Copied: camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/roundRobinLoadBalance.xml (from r775468, camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/loadBalance.xml)
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/roundRobinLoadBalance.xml?p2=camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/roundRobinLoadBalance.xml&p1=camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/loadBalance.xml&r1=775468&r2=775503&rev=775503&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/loadBalance.xml (original)
+++ camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/roundRobinLoadBalance.xml Sat May 16 18:15:24 2009
@@ -22,9 +22,7 @@
        http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
     ">
 
-
   <!-- START SNIPPET: example -->
-
   <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
     <route>
       <from uri="direct:start"/>

Propchange: camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/roundRobinLoadBalance.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/roundRobinLoadBalance.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/roundRobinLoadBalance.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/stickyLoadBalance.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/stickyLoadBalance.xml?rev=775503&view=auto
==============================================================================
--- camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/stickyLoadBalance.xml (added)
+++ camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/stickyLoadBalance.xml Sat May 16 18:15:24 2009
@@ -0,0 +1,41 @@
+<?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
+    ">
+
+  <!-- START SNIPPET: example -->
+  <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
+    <route>
+      <from uri="direct:start"/>
+      <loadBalance>
+          <sticky>
+              <correlationExpression><header>foo</header></correlationExpression>
+          </sticky>
+          <to uri="mock:x"/>
+          <to uri="mock:y"/>
+          <to uri="mock:z"/>
+      </loadBalance>
+    </route>
+  </camelContext>
+  <!-- END SNIPPET: example -->
+
+</beans>

Propchange: camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/stickyLoadBalance.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/stickyLoadBalance.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/stickyLoadBalance.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/topicLoadBalance.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/topicLoadBalance.xml?rev=775503&view=auto
==============================================================================
--- camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/topicLoadBalance.xml (added)
+++ camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/topicLoadBalance.xml Sat May 16 18:15:24 2009
@@ -0,0 +1,39 @@
+<?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
+    ">
+
+  <!-- START SNIPPET: example -->
+  <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
+    <route>
+      <from uri="direct:start"/>
+      <loadBalance>
+          <topic/>
+          <to uri="mock:x"/>
+          <to uri="mock:y"/>
+          <to uri="mock:z"/>
+      </loadBalance>
+    </route>
+  </camelContext>
+  <!-- END SNIPPET: example -->
+
+</beans>

Propchange: camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/topicLoadBalance.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/topicLoadBalance.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/topicLoadBalance.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml



Mime
View raw message