You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2009/10/22 09:00:48 UTC

svn commit: r828332 - in /camel/trunk: camel-core/src/main/java/org/apache/camel/impl/ camel-core/src/test/java/org/apache/camel/impl/ components/camel-spring/src/main/java/org/apache/camel/spring/ components/camel-spring/src/test/java/org/apache/camel...

Author: davsclaus
Date: Thu Oct 22 07:00:47 2009
New Revision: 828332

URL: http://svn.apache.org/viewvc?rev=828332&view=rev
Log:
CAMEL-2094: Removed shouldStartContext which is replaced with autoStartup on the CamelContext.

Added:
    camel/trunk/camel-core/src/test/java/org/apache/camel/impl/DefaultCamelContextAutoStartupTest.java   (with props)
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/CamelContextAutoStartupTest.java   (with props)
    camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/config/CamelContextAutoStartupTestFalse.xml   (contents, props changed)
      - copied, changed from r828301, camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/config/ErrorHandlerConfigTest-context.xml
    camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/config/CamelContextAutoStartupTestTrue.xml   (with props)
Modified:
    camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java
    camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/CamelContextFactoryBean.java
    camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/SpringCamelContext.java
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/CamelContextFactoryBeanTest.java
    camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/camelContextFactoryBean.xml

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=828332&r1=828331&r2=828332&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 Thu Oct 22 07:00:47 2009
@@ -23,9 +23,7 @@
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
-import java.util.Set;
 import java.util.TreeMap;
-import java.util.TreeSet;
 import java.util.concurrent.Callable;
 import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.concurrent.atomic.AtomicInteger;
@@ -81,7 +79,6 @@
 import org.apache.camel.spi.ServicePool;
 import org.apache.camel.spi.TypeConverterRegistry;
 import org.apache.camel.util.EventHelper;
-import org.apache.camel.util.KeyValueHolder;
 import org.apache.camel.util.LRUCache;
 import org.apache.camel.util.ObjectHelper;
 import org.apache.camel.util.ReflectionInjector;
@@ -121,6 +118,8 @@
     private AtomicBoolean managementStrategyInitialized = new AtomicBoolean(false);
     private final List<RouteDefinition> routeDefinitions = new ArrayList<RouteDefinition>();
     private List<InterceptStrategy> interceptStrategies = new ArrayList<InterceptStrategy>();
+    private boolean firstStartDone;
+    private Boolean autoStartup = Boolean.TRUE;
     private Boolean trace = Boolean.FALSE;
     private Boolean streamCache = Boolean.FALSE;
     private Boolean handleFault = Boolean.FALSE;
@@ -847,6 +846,14 @@
     }
 
     public void start() throws Exception {
+        boolean doNotStart = !firstStartDone && !isAutoStartup();
+        firstStartDone = true;
+
+        if (doNotStart) {
+            LOG.info("Cannot start Apache Camel " + getVersion() + " (CamelContext:" + getName() + ") as it has been configured to not auto start");
+            return;
+        }
+
         super.start();
 
         LOG.debug("Starting routes...");
@@ -1318,12 +1325,11 @@
     }
 
     public void setAutoStartup(Boolean autoStartup) {
-        // noop as Camel always starts up
+        this.autoStartup = autoStartup;
     }
 
     public boolean isAutoStartup() {
-        // Camel always starts up
-        return true;
+        return autoStartup != null && autoStartup;
     }
 
     protected String getEndpointKey(String uri, Endpoint endpoint) {

Added: camel/trunk/camel-core/src/test/java/org/apache/camel/impl/DefaultCamelContextAutoStartupTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/impl/DefaultCamelContextAutoStartupTest.java?rev=828332&view=auto
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/impl/DefaultCamelContextAutoStartupTest.java (added)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/impl/DefaultCamelContextAutoStartupTest.java Thu Oct 22 07:00:47 2009
@@ -0,0 +1,81 @@
+/**
+ * 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.impl;
+
+import junit.framework.TestCase;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.mock.MockEndpoint;
+
+/**
+ * @version $Revision$
+ */
+public class DefaultCamelContextAutoStartupTest extends TestCase {
+
+    public void testAutoStartupFalse() throws Exception {
+        DefaultCamelContext camel = new DefaultCamelContext(new SimpleRegistry());
+        camel.setAutoStartup(false);
+
+        camel.addRoutes(new RouteBuilder() {
+            @Override
+            public void configure() throws Exception {
+                from("direct:start").to("mock:result");
+            }
+        });
+        camel.start();
+
+        assertEquals(false, camel.isStarted());
+        assertEquals(0, camel.getRoutes().size());
+
+        // now start it again as auto startup prevented it from starting first time
+        camel.start();
+
+        assertEquals(true, camel.isStarted());
+        assertEquals(1, camel.getRoutes().size());
+
+        // and now its started we can test that it works by sending in a message to the route
+        MockEndpoint mock = camel.getEndpoint("mock:result", MockEndpoint.class);
+        mock.expectedMessageCount(1);
+
+        camel.createProducerTemplate().sendBody("direct:start", "Hello World");
+
+        mock.assertIsSatisfied();
+    }
+
+    public void testAutoStartupTrue() throws Exception {
+        DefaultCamelContext camel = new DefaultCamelContext(new SimpleRegistry());
+        camel.setAutoStartup(true);
+
+        camel.addRoutes(new RouteBuilder() {
+            @Override
+            public void configure() throws Exception {
+                from("direct:start").to("mock:result");
+            }
+        });
+        camel.start();
+
+        assertEquals(true, camel.isStarted());
+        assertEquals(1, camel.getRoutes().size());
+
+        MockEndpoint mock = camel.getEndpoint("mock:result", MockEndpoint.class);
+        mock.expectedMessageCount(1);
+
+        camel.createProducerTemplate().sendBody("direct:start", "Hello World");
+
+        mock.assertIsSatisfied();
+    }
+
+}

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

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

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=828332&r1=828331&r2=828332&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 Thu Oct 22 07:00:47 2009
@@ -108,7 +108,7 @@
     @XmlAttribute(required = false)
     private String errorHandlerRef;
     @XmlAttribute(required = false)
-    private Boolean shouldStartContext = Boolean.TRUE;
+    private Boolean autoStartup = Boolean.TRUE;
     @XmlElement(name = "properties", required = false)
     private PropertiesDefinition properties;
     @XmlElement(name = "package", required = false)
@@ -696,14 +696,6 @@
         this.errorHandlerRef = errorHandlerRef;
     }
 
-    public Boolean getShouldStartContext() {
-        return shouldStartContext;
-    }
-
-    public void setShouldStartContext(Boolean shouldStartContext) {
-        this.shouldStartContext = shouldStartContext;
-    }
-
     public void setDataFormats(DataFormatsDefinition dataFormats) {
         this.dataFormats = dataFormats;
     }
@@ -728,6 +720,14 @@
         this.onCompletions = onCompletions;
     }
 
+    public Boolean isAutoStartup() {
+        return autoStartup;
+    }
+
+    public void setAutoStartup(Boolean autoStartup) {
+        this.autoStartup = autoStartup;
+    }
+
     // Implementation methods
     // -------------------------------------------------------------------------
 
@@ -752,11 +752,9 @@
         if (errorHandlerRef != null) {
             ctx.setErrorHandlerBuilder(new ErrorHandlerBuilderRef(errorHandlerRef));
         }
-
-        if (shouldStartContext != null) {
-            ctx.setShouldStartContext(shouldStartContext);
+        if (autoStartup != null) {
+            ctx.setAutoStartup(autoStartup);
         }
-
         return ctx;
     }
 

Modified: camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/SpringCamelContext.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/SpringCamelContext.java?rev=828332&r1=828331&r2=828332&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/SpringCamelContext.java (original)
+++ camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/SpringCamelContext.java Thu Oct 22 07:00:47 2009
@@ -26,7 +26,6 @@
 import org.apache.camel.spi.Registry;
 import org.apache.camel.spring.spi.ApplicationContextRegistry;
 import org.apache.camel.spring.spi.SpringInjector;
-import org.apache.camel.util.ObjectHelper;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.springframework.beans.BeansException;
@@ -58,7 +57,6 @@
     private static final transient Log LOG = LogFactory.getLog(SpringCamelContext.class);
     private ApplicationContext applicationContext;
     private EventEndpoint eventEndpoint;
-    private boolean shouldStartContext = ObjectHelper.getSystemProperty("shouldStartContext", Boolean.TRUE);
 
     public SpringCamelContext() {
     }
@@ -87,22 +85,6 @@
         maybeStart();
     }
 
-    private void maybeStart() throws Exception {
-        if (!getShouldStartContext()) {
-            LOG.info("Not starting Apache Camel as property ShouldStartContext is false");
-            return;
-        }
-
-        if (!isStarted() && !isStarting()) {
-            // Make sure we will not get into the endless loop of calling star
-            LOG.info("Starting Apache Camel as property ShouldStartContext is true");
-            start();
-        } else {
-            // ignore as Camel is already started
-            LOG.trace("Ignoring maybeStart() as Apache Camel is already started");
-        }
-    }
-
     public void destroy() throws Exception {
         stop();
     }
@@ -138,18 +120,17 @@
 
     public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
         this.applicationContext = applicationContext;
-        ClassLoader cl = null;
+        ClassLoader cl;
+
         // set the application context classloader
         if (applicationContext != null && applicationContext.getClassLoader() != null) {
             cl = applicationContext.getClassLoader();
         } else {
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("Canot find the class loader from application context, so us the thread context class loader");
-            }
-            cl = Thread.currentThread().getContextClassLoader();   
+            LOG.warn("Cannot find the class loader from application context, so using the thread context class loader instead");
+            cl = Thread.currentThread().getContextClassLoader();
         }
         if (LOG.isDebugEnabled()) {
-            LOG.debug("Set the application context classloader with " + cl);
+            LOG.debug("Set the application context classloader to: " + cl);
         }
         this.setApplicationContextClassLoader(cl);
 
@@ -174,15 +155,9 @@
 
     @Override
     protected void doStart() throws Exception {
-        maybeDoStart();
-    }
-
-    protected void maybeDoStart() throws Exception {
-        if (getShouldStartContext()) {
-            super.doStart();
-            if (eventEndpoint == null) {
-                eventEndpoint = createEventEndpoint();
-            }
+        super.doStart();
+        if (eventEndpoint == null) {
+            eventEndpoint = createEventEndpoint();
         }
     }
 
@@ -217,12 +192,13 @@
         return new ApplicationContextRegistry(getApplicationContext());
     }
 
-    public void setShouldStartContext(boolean shouldStartContext) {
-        this.shouldStartContext = shouldStartContext;
-    }
-
-    public boolean getShouldStartContext() {
-        return shouldStartContext;
+    private void maybeStart() throws Exception {
+        if (!isStarted() && !isStarting()) {
+            start();
+        } else {
+            // ignore as Camel is already started
+            LOG.trace("Ignoring maybeStart() as Apache Camel is already started");
+        }
     }
 
     @Override

Added: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/CamelContextAutoStartupTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/CamelContextAutoStartupTest.java?rev=828332&view=auto
==============================================================================
--- camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/CamelContextAutoStartupTest.java (added)
+++ camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/CamelContextAutoStartupTest.java Thu Oct 22 07:00:47 2009
@@ -0,0 +1,81 @@
+/**
+ * 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.config;
+
+import junit.framework.TestCase;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.spring.SpringCamelContext;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+/**
+ * @version $Revision$
+ */
+public class CamelContextAutoStartupTest extends TestCase {
+
+    private static final transient Log LOG = LogFactory.getLog(CamelContextAutoStartupTest.class);
+
+    public void testAutoStartupFalse() throws Exception {
+        ApplicationContext ac = new ClassPathXmlApplicationContext("org/apache/camel/spring/config/CamelContextAutoStartupTestFalse.xml");
+
+        SpringCamelContext camel = (SpringCamelContext) ac.getBean("myCamel");
+        assertEquals("myCamel", camel.getName());
+        assertEquals(false, camel.isStarted());
+        assertEquals(false, camel.isAutoStartup());
+        assertEquals(0, camel.getRoutes().size());
+
+        // now start Camel
+        LOG.info("******** now starting Camel manually *********");
+        camel.start();
+
+        // now its started
+        assertEquals(true, camel.isStarted());
+        // but auto startup is still fasle
+        assertEquals(false, camel.isAutoStartup());
+        // but now we have one route
+        assertEquals(1, camel.getRoutes().size());
+
+        // and now we can send a message to the route and see that it works
+        MockEndpoint mock = camel.getEndpoint("mock:result", MockEndpoint.class);
+        mock.expectedMessageCount(1);
+
+        camel.createProducerTemplate().sendBody("direct:start", "Hello World");
+
+        mock.assertIsSatisfied();
+    }
+
+    public void testAutoStartupTrue() throws Exception {
+        ApplicationContext ac = new ClassPathXmlApplicationContext("org/apache/camel/spring/config/CamelContextAutoStartupTestTrue.xml");
+
+        SpringCamelContext camel = (SpringCamelContext) ac.getBean("myCamel");
+        assertEquals("myCamel", camel.getName());
+        assertEquals(true, camel.isStarted());
+        assertEquals(true, camel.isAutoStartup());
+        assertEquals(1, camel.getRoutes().size());
+
+        // send a message to the route and see that it works
+        MockEndpoint mock = camel.getEndpoint("mock:result", MockEndpoint.class);
+        mock.expectedMessageCount(1);
+
+        camel.createProducerTemplate().sendBody("direct:start", "Hello World");
+
+        mock.assertIsSatisfied();
+    }
+
+}

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

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

Modified: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/CamelContextFactoryBeanTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/CamelContextFactoryBeanTest.java?rev=828332&r1=828331&r2=828332&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/CamelContextFactoryBeanTest.java (original)
+++ camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/config/CamelContextFactoryBeanTest.java Thu Oct 22 07:00:47 2009
@@ -91,15 +91,15 @@
         assertValidContext(context);
     }
 
-    public void testShouldStartContext() throws Exception {
+    public void testAutoStartup() throws Exception {
         ApplicationContext applicationContext = new ClassPathXmlApplicationContext("org/apache/camel/spring/camelContextFactoryBean.xml");
 
         SpringCamelContext context = (SpringCamelContext) applicationContext.getBean("camel4");
         assertNotNull("No context found!", context);        
-        assertFalse("The context should not start yet", context.getShouldStartContext());
+        assertFalse("The context should not start yet", context.isAutoStartup());
         assertEquals("There should have not route", context.getRoutes().size(), 0);
         context = (SpringCamelContext) applicationContext.getBean("camel3");
-        assertTrue("The context should started",  context.getShouldStartContext());
+        assertTrue("The context should started",  context.isAutoStartup());
         assertEquals("There should have one route", context.getRoutes().size(), 1);
     }
 

Modified: camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/camelContextFactoryBean.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/camelContextFactoryBean.xml?rev=828332&r1=828331&r2=828332&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/camelContextFactoryBean.xml (original)
+++ camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/camelContextFactoryBean.xml Thu Oct 22 07:00:47 2009
@@ -46,7 +46,7 @@
   <!-- END SNIPPET: example3 -->
   
   <!-- START SNIPPET: example4 -->
-  <camelContext id="camel4" xmlns="http://camel.apache.org/schema/spring" shouldStartContext="false">
+  <camelContext id="camel4" xmlns="http://camel.apache.org/schema/spring" autoStartup="false">
     <package>org.apache.camel.spring.example</package>
   </camelContext>
   <!-- END SNIPPET: example4 --> 

Copied: camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/config/CamelContextAutoStartupTestFalse.xml (from r828301, camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/config/ErrorHandlerConfigTest-context.xml)
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/config/CamelContextAutoStartupTestFalse.xml?p2=camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/config/CamelContextAutoStartupTestFalse.xml&p1=camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/config/ErrorHandlerConfigTest-context.xml&r1=828301&r2=828332&rev=828332&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/config/ErrorHandlerConfigTest-context.xml (original)
+++ camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/config/CamelContextAutoStartupTestFalse.xml Thu Oct 22 07:00:47 2009
@@ -22,19 +22,11 @@
        http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
     ">
 
-  <camelContext xmlns="http://camel.apache.org/schema/spring" errorHandlerRef="defaultErrorHandler">
-    <template id="myTemplate"/>
+    <camelContext id="myCamel" xmlns="http://camel.apache.org/schema/spring" autoStartup="false">
+        <route>
+            <from uri="direct:start"/>
+            <to uri="mock:result"/>
+        </route>
+    </camelContext>
 
-    <route>
-      <from uri="direct:defaultErrorHandler"/>
-      <to uri="mock:defaultErrorHandler"/>
-    </route>
-    <route errorHandlerRef="customErrorHandler">
-      <from uri="direct:customErrorHandler"/>
-      <to uri="mock:customErrorHandler"/>
-    </route>
-  </camelContext>
-
-  <bean id="defaultErrorHandler" class="org.apache.camel.spring.config.DummyErrorHandlerBuilder"/>
-  <bean id="customErrorHandler" class="org.apache.camel.spring.config.DummyErrorHandlerBuilder"/>
 </beans>

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

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

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

Added: camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/config/CamelContextAutoStartupTestTrue.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/config/CamelContextAutoStartupTestTrue.xml?rev=828332&view=auto
==============================================================================
--- camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/config/CamelContextAutoStartupTestTrue.xml (added)
+++ camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/config/CamelContextAutoStartupTestTrue.xml Thu Oct 22 07:00:47 2009
@@ -0,0 +1,32 @@
+<?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
+    ">
+
+    <camelContext id="myCamel" xmlns="http://camel.apache.org/schema/spring" autoStartup="true">
+        <route>
+            <from uri="direct:start"/>
+            <to uri="mock:result"/>
+        </route>
+    </camelContext>
+
+</beans>

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

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

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