camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r791215 - in /camel/trunk: camel-core/src/main/java/org/apache/camel/impl/ camel-core/src/main/java/org/apache/camel/model/ camel-core/src/test/java/org/apache/camel/ camel-core/src/test/java/org/apache/camel/processor/ camel-core/src/test/...
Date Sun, 05 Jul 2009 10:17:38 GMT
Author: davsclaus
Date: Sun Jul  5 10:17:38 2009
New Revision: 791215

URL: http://svn.apache.org/viewvc?rev=791215&view=rev
Log:
CAMEL-1797: Fixed tracer in Spring DSL.

Added:
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringDefaultErrorHandlerOnExceptionTraceTest.java
  (with props)
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringInterceptSimpleRouteTraceTest.java
      - copied, changed from r791059, camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringInterceptSimpleRouteTest.java
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringOnCompletionGlobalTraceTest.java
  (with props)
    camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/SpringDefaultErrorHandlerOnExceptionTraceTest.xml
  (with props)
    camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/SpringInterceptSimpleRouteTraceTest.xml
  (with props)
    camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/SpringOnCompletionGlobalTraceTest.xml
  (with props)
Modified:
    camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/model/ProcessDefinition.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/ContextTestSupport.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/processor/DefaultErrorHandlerOnExceptionTraceTest.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/processor/OnCompletionGlobalTraceTest.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/processor/interceptor/TraceInterceptorDestinationTest.java
    camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/CamelContextFactoryBean.java
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringInterceptSimpleRouteTest.java
    camel/trunk/components/camel-test/src/main/java/org/apache/camel/test/CamelTestSupport.java

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java?rev=791215&r1=791214&r2=791215&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java Sun
Jul  5 10:17:38 2009
@@ -873,8 +873,10 @@
 
     public void start() throws Exception {
         super.start();
-        
-        LOG.debug("Starting routes");
+
+        if (LOG.isDebugEnabled()) {
+            LOG.debug("Starting routes");
+        }
         // the context is now considered started (i.e. isStarted() == true))
         // starting routes is done after, not during context startup
         synchronized (this) {
@@ -882,7 +884,12 @@
                 routeService.start();
             }
         }
-        LOG.debug("Started routes");
+        if (LOG.isDebugEnabled()) {
+            for (int i = 0; i < getRoutes().size(); i++) {
+                LOG.debug("Route " + i + ": " + getRoutes().get(i));
+            }
+            LOG.debug("Started routes");
+        }
 
         LOG.info("Apache Camel " + getVersion() + " (CamelContext:" + getName() + ") started");
     }

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/model/ProcessDefinition.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ProcessDefinition.java?rev=791215&r1=791214&r2=791215&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/model/ProcessDefinition.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/model/ProcessDefinition.java Sun
Jul  5 10:17:38 2009
@@ -61,7 +61,7 @@
     @Override
     public String getLabel() {
         if (ref != null) {
-            return "ref: " + ref;
+            return "ref:" + ref;
         } else if (processor != null) {
             return processor.toString();
         } else {

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/ContextTestSupport.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/ContextTestSupport.java?rev=791215&r1=791214&r2=791215&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/ContextTestSupport.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/ContextTestSupport.java Sun Jul
 5 10:17:38 2009
@@ -82,7 +82,6 @@
                 context.addRoutes(builder);
             }
             startCamelContext();
-            log.debug("Routing Rules are: " + context.getRoutes());
         } else {
             log.debug("isUseRouteBuilder() is false");
         }

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/DefaultErrorHandlerOnExceptionTraceTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/DefaultErrorHandlerOnExceptionTraceTest.java?rev=791215&r1=791214&r2=791215&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/DefaultErrorHandlerOnExceptionTraceTest.java
(original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/DefaultErrorHandlerOnExceptionTraceTest.java
Sun Jul  5 10:17:38 2009
@@ -21,6 +21,7 @@
 import org.apache.camel.Processor;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.impl.JndiRegistry;
 import org.apache.camel.processor.interceptor.TraceEventMessage;
 import org.apache.camel.processor.interceptor.Tracer;
 
@@ -31,6 +32,13 @@
  */
 public class DefaultErrorHandlerOnExceptionTraceTest extends ContextTestSupport {
 
+    @Override
+    protected JndiRegistry createRegistry() throws Exception {
+        JndiRegistry jndi = super.createRegistry();
+        jndi.bind("myProcessor", new MyProcessor());
+        return jndi;
+    }
+
     public void testOk() throws Exception {
         MockEndpoint mock = getMockEndpoint("mock:result");
         mock.expectedBodiesReceived("Bye World");
@@ -44,9 +52,9 @@
         TraceEventMessage msg2 = getMockEndpoint("mock:trace").getReceivedExchanges().get(1).getIn().getBody(TraceEventMessage.class);
 
         assertEquals("direct:start", msg1.getFromEndpointUri());
-        assertTrue(msg1.getToNode().startsWith("org.apache.camel.processor.DefaultErrorHandlerOnExceptionTraceTest"));
+        assertEquals("ref:myProcessor", msg1.getToNode());
 
-        assertTrue(msg2.getPreviousNode().startsWith("org.apache.camel.processor.DefaultErrorHandlerOnExceptionTraceTest"));
+        assertEquals("ref:myProcessor", msg2.getPreviousNode());
         assertEquals("mock:result", msg2.getToNode());
     }
 
@@ -65,9 +73,9 @@
         TraceEventMessage msg4 = getMockEndpoint("mock:trace").getReceivedExchanges().get(3).getIn().getBody(TraceEventMessage.class);
 
         assertEquals("direct:start", msg1.getFromEndpointUri());
-        assertTrue(msg1.getToNode().startsWith("org.apache.camel.processor.DefaultErrorHandlerOnExceptionTraceTest"));
+        assertEquals("ref:myProcessor", msg1.getToNode());
 
-        assertTrue(msg2.getPreviousNode().startsWith("org.apache.camel.processor.DefaultErrorHandlerOnExceptionTraceTest"));
+        assertEquals("ref:myProcessor", msg2.getPreviousNode());
         assertEquals("OnException[IllegalArgumentException]", msg2.getToNode());
 
         assertEquals("OnException[IllegalArgumentException]", msg3.getPreviousNode());
@@ -88,16 +96,19 @@
 
                 onException(IllegalArgumentException.class).handled(true).to("log:boom").to("mock:boom");
 
-                from("direct:start").process(new Processor() {
-                    public void process(Exchange exchange) throws Exception {
-                        String body = exchange.getIn().getBody(String.class);
-                        if ("Kabom".equals(body)) {
-                            throw new IllegalArgumentException("Boom");
-                        }
-                        exchange.getIn().setBody("Bye World");
-                    }
-                }).to("mock:result");
+                from("direct:start").processRef("myProcessor").to("mock:result");
             }
         };
     }
+
+    public static class MyProcessor implements Processor {
+
+        public void process(Exchange exchange) throws Exception {
+            String body = exchange.getIn().getBody(String.class);
+            if ("Kabom".equals(body)) {
+                throw new IllegalArgumentException("Boom");
+            }
+            exchange.getIn().setBody("Bye World");
+        }
+    }
 }
\ No newline at end of file

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/OnCompletionGlobalTraceTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/OnCompletionGlobalTraceTest.java?rev=791215&r1=791214&r2=791215&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/OnCompletionGlobalTraceTest.java
(original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/OnCompletionGlobalTraceTest.java
Sun Jul  5 10:17:38 2009
@@ -22,6 +22,7 @@
 import org.apache.camel.Processor;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.impl.JndiRegistry;
 import org.apache.camel.processor.interceptor.TraceEventMessage;
 import org.apache.camel.processor.interceptor.Tracer;
 
@@ -30,6 +31,13 @@
  */
 public class OnCompletionGlobalTraceTest extends ContextTestSupport {
 
+    @Override
+    protected JndiRegistry createRegistry() throws Exception {
+        JndiRegistry jndi = super.createRegistry();
+        jndi.bind("myProcessor", new MyProcessor());
+        return jndi;
+    }
+
     public void testSynchronizeComplete() throws Exception {
         getMockEndpoint("mock:sync").expectedBodiesReceived("Bye World");
         getMockEndpoint("mock:sync").expectedPropertyReceived(Exchange.ON_COMPLETION, true);
@@ -48,9 +56,9 @@
         TraceEventMessage msg4 = getMockEndpoint("mock:trace").getReceivedExchanges().get(3).getIn().getBody(TraceEventMessage.class);
 
         assertEquals("direct:start", msg1.getFromEndpointUri());
-        assertTrue(msg1.getToNode().startsWith("org.apache.camel.processor.OnCompletionGlobalTraceTest"));
+        assertEquals("ref:myProcessor", msg1.getToNode());
 
-        assertTrue(msg2.getPreviousNode().startsWith("org.apache.camel.processor.OnCompletionGlobalTraceTest"));
+        assertEquals("ref:myProcessor", msg2.getPreviousNode());
         assertEquals("mock:result", msg2.getToNode());
 
         assertTrue(msg3.getPreviousNode().startsWith("OnCompletion"));
@@ -82,7 +90,7 @@
         TraceEventMessage msg3 = getMockEndpoint("mock:trace").getReceivedExchanges().get(2).getIn().getBody(TraceEventMessage.class);
 
         assertEquals("direct:start", msg1.getFromEndpointUri());
-        assertTrue(msg1.getToNode().startsWith("org.apache.camel.processor.OnCompletionGlobalTraceTest"));
+        assertEquals("ref:myProcessor", msg1.getToNode());
 
         assertTrue(msg2.getPreviousNode().startsWith("OnCompletion"));
         assertEquals("log:global", msg2.getToNode());
@@ -105,7 +113,7 @@
                 onCompletion().to("log:global").to("mock:sync");
 
                 from("direct:start")
-                    .process(new MyProcessor())
+                    .processRef("myProcessor")
                     .to("mock:result");
                 // END SNIPPET: e1
             }

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/interceptor/TraceInterceptorDestinationTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/interceptor/TraceInterceptorDestinationTest.java?rev=791215&r1=791214&r2=791215&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/interceptor/TraceInterceptorDestinationTest.java
(original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/interceptor/TraceInterceptorDestinationTest.java
Sun Jul  5 10:17:38 2009
@@ -130,8 +130,8 @@
     class MyTraveAssertProcessor implements Processor {
 
         public void process(Exchange exchange) throws Exception {
-            String nodeId = exchange.getProperty("CamelTraceEventNodeId", String.class);
-            Date timestamp = exchange.getProperty("CamelTraceEventTimestamp", Date.class);
+            String nodeId = exchange.getProperty(Exchange.TRACE_EVENT_NODE_ID, String.class);
+            Date timestamp = exchange.getProperty(Exchange.TRACE_EVENT_TIMESTAMP, Date.class);
             assertNotNull(nodeId);
             assertNotNull(timestamp);
 

Modified: camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/CamelContextFactoryBean.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/CamelContextFactoryBean.java?rev=791215&r1=791214&r2=791215&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/CamelContextFactoryBean.java
(original)
+++ camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/CamelContextFactoryBean.java
Sun Jul  5 10:17:38 2009
@@ -243,8 +243,11 @@
         if (strategies != null && !strategies.isEmpty()) {
             for (String id : strategies.keySet()) {
                 InterceptStrategy strategy = strategies.get(id);
-                LOG.info("Using custom intercept strategy with id: " + id + " and implementation:
" + strategy);
-                getContext().addInterceptStrategy(strategy);
+                // do not add if already added, for instance a tracer that is also an InterceptStrategy
class
+                if (!getContext().getInterceptStrategies().contains(strategy)) {
+                    LOG.info("Using custom intercept strategy with id: " + id + " and implementation:
" + strategy);
+                    getContext().addInterceptStrategy(strategy);
+                }
             }
         }
 

Added: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringDefaultErrorHandlerOnExceptionTraceTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringDefaultErrorHandlerOnExceptionTraceTest.java?rev=791215&view=auto
==============================================================================
--- camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringDefaultErrorHandlerOnExceptionTraceTest.java
(added)
+++ camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringDefaultErrorHandlerOnExceptionTraceTest.java
Sun Jul  5 10:17:38 2009
@@ -0,0 +1,34 @@
+/**
+ * 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.DefaultErrorHandlerOnExceptionTraceTest;
+import static org.apache.camel.spring.processor.SpringTestHelper.createSpringCamelContext;
+
+public class SpringDefaultErrorHandlerOnExceptionTraceTest extends DefaultErrorHandlerOnExceptionTraceTest
{
+
+    @Override
+    public boolean isUseRouteBuilder() {
+        return false;
+    }
+
+    protected CamelContext createCamelContext() throws Exception {
+        return createSpringCamelContext(this, "org/apache/camel/spring/processor/SpringDefaultErrorHandlerOnExceptionTraceTest.xml");
+    }
+
+}
\ No newline at end of file

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

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

Modified: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringInterceptSimpleRouteTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringInterceptSimpleRouteTest.java?rev=791215&r1=791214&r2=791215&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringInterceptSimpleRouteTest.java
(original)
+++ camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringInterceptSimpleRouteTest.java
Sun Jul  5 10:17:38 2009
@@ -16,9 +16,7 @@
  */
 package org.apache.camel.spring.processor;
 
-
 import org.apache.camel.CamelContext;
-import org.apache.camel.processor.intercept.InterceptFromUriSimpleLogTest;
 import org.apache.camel.processor.intercept.InterceptSimpleRouteTest;
 import static org.apache.camel.spring.processor.SpringTestHelper.createSpringCamelContext;
 

Copied: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringInterceptSimpleRouteTraceTest.java
(from r791059, camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringInterceptSimpleRouteTest.java)
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringInterceptSimpleRouteTraceTest.java?p2=camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringInterceptSimpleRouteTraceTest.java&p1=camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringInterceptSimpleRouteTest.java&r1=791059&r2=791215&rev=791215&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringInterceptSimpleRouteTest.java
(original)
+++ camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringInterceptSimpleRouteTraceTest.java
Sun Jul  5 10:17:38 2009
@@ -16,13 +16,11 @@
  */
 package org.apache.camel.spring.processor;
 
-
 import org.apache.camel.CamelContext;
-import org.apache.camel.processor.intercept.InterceptFromUriSimpleLogTest;
-import org.apache.camel.processor.intercept.InterceptSimpleRouteTest;
+import org.apache.camel.processor.intercept.InterceptSimpleRouteTraceTest;
 import static org.apache.camel.spring.processor.SpringTestHelper.createSpringCamelContext;
 
-public class SpringInterceptSimpleRouteTest extends InterceptSimpleRouteTest {
+public class SpringInterceptSimpleRouteTraceTest extends InterceptSimpleRouteTraceTest {
 
     @Override
     public boolean isUseRouteBuilder() {
@@ -30,7 +28,7 @@
     }
 
     protected CamelContext createCamelContext() throws Exception {
-        return createSpringCamelContext(this, "org/apache/camel/spring/processor/SpringInterceptSimpleRouteTest.xml");
+        return createSpringCamelContext(this, "org/apache/camel/spring/processor/SpringInterceptSimpleRouteTraceTest.xml");
     }
 
 }
\ No newline at end of file

Added: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringOnCompletionGlobalTraceTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringOnCompletionGlobalTraceTest.java?rev=791215&view=auto
==============================================================================
--- camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringOnCompletionGlobalTraceTest.java
(added)
+++ camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringOnCompletionGlobalTraceTest.java
Sun Jul  5 10:17:38 2009
@@ -0,0 +1,34 @@
+/**
+ * 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.OnCompletionGlobalTraceTest;
+import static org.apache.camel.spring.processor.SpringTestHelper.createSpringCamelContext;
+
+public class SpringOnCompletionGlobalTraceTest extends OnCompletionGlobalTraceTest {
+
+    @Override
+    public boolean isUseRouteBuilder() {
+        return false;
+    }
+
+    protected CamelContext createCamelContext() throws Exception {
+        return createSpringCamelContext(this, "org/apache/camel/spring/processor/SpringOnCompletionGlobalTraceTest.xml");
+    }
+
+}
\ No newline at end of file

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

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

Added: camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/SpringDefaultErrorHandlerOnExceptionTraceTest.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/SpringDefaultErrorHandlerOnExceptionTraceTest.xml?rev=791215&view=auto
==============================================================================
--- camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/SpringDefaultErrorHandlerOnExceptionTraceTest.xml
(added)
+++ camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/SpringDefaultErrorHandlerOnExceptionTraceTest.xml
Sun Jul  5 10:17:38 2009
@@ -0,0 +1,46 @@
+<?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
+    ">
+
+    <bean id="tracer" class="org.apache.camel.processor.interceptor.Tracer">
+        <property name="destinationUri" value="mock:trace"/>
+    </bean>
+
+    <bean id="myProcessor" class="org.apache.camel.processor.DefaultErrorHandlerOnExceptionTraceTest$MyProcessor"/>
+
+    <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
+
+        <onException>
+            <exception>java.lang.IllegalArgumentException</exception>
+            <handled><constant>true</constant></handled>
+            <to uri="log:boom"/>
+            <to uri="mock:boom"/>
+        </onException>
+
+        <route>
+            <from uri="direct:start"/>
+            <process ref="myProcessor"/>
+            <to uri="mock:result"/>
+        </route>
+    </camelContext>
+</beans>

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

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

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

Added: camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/SpringInterceptSimpleRouteTraceTest.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/SpringInterceptSimpleRouteTraceTest.xml?rev=791215&view=auto
==============================================================================
--- camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/SpringInterceptSimpleRouteTraceTest.xml
(added)
+++ camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/SpringInterceptSimpleRouteTraceTest.xml
Sun Jul  5 10:17:38 2009
@@ -0,0 +1,42 @@
+<?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
+    ">
+
+    <bean id="tracer" class="org.apache.camel.processor.interceptor.Tracer">
+        <property name="destinationUri" value="mock:trace"/>
+    </bean>
+
+    <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
+        <intercept>
+            <to uri="mock:intercepted"/>
+        </intercept>
+
+        <route>
+            <from uri="direct:start"/>
+            <to uri="mock:foo"/>
+            <to uri="mock:bar"/>
+            <to uri="mock:result"/>
+        </route>
+    </camelContext>
+
+</beans>

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

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

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

Added: camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/SpringOnCompletionGlobalTraceTest.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/SpringOnCompletionGlobalTraceTest.xml?rev=791215&view=auto
==============================================================================
--- camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/SpringOnCompletionGlobalTraceTest.xml
(added)
+++ camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/SpringOnCompletionGlobalTraceTest.xml
Sun Jul  5 10:17:38 2009
@@ -0,0 +1,43 @@
+<?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
+    ">
+
+    <bean id="tracer" class="org.apache.camel.processor.interceptor.Tracer">
+        <property name="destinationUri" value="mock:trace"/>
+    </bean>
+
+    <bean id="myProcessor" class="org.apache.camel.processor.OnCompletionTest$MyProcessor"/>
+
+    <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
+        <onCompletion>
+            <to uri="log:global"/>
+            <to uri="mock:sync"/>
+        </onCompletion>
+
+        <route>
+            <from uri="direct:start"/>
+            <process ref="myProcessor"/>
+            <to uri="mock:result"/>
+        </route>
+    </camelContext>
+</beans>

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

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

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

Modified: camel/trunk/components/camel-test/src/main/java/org/apache/camel/test/CamelTestSupport.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-test/src/main/java/org/apache/camel/test/CamelTestSupport.java?rev=791215&r1=791214&r2=791215&view=diff
==============================================================================
--- camel/trunk/components/camel-test/src/main/java/org/apache/camel/test/CamelTestSupport.java
(original)
+++ camel/trunk/components/camel-test/src/main/java/org/apache/camel/test/CamelTestSupport.java
Sun Jul  5 10:17:38 2009
@@ -96,11 +96,9 @@
                 context.addRoutes(builder);
             }
             startCamelContext();
-            log.debug("Routing Rules are: " + context.getRoutes());
         } else {
             log.debug("Using route builder from the created context: " + context);
         }
-        log.debug("Routing Rules are: " + context.getRoutes());
     }
 
     @Override



Mime
View raw message