You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ni...@apache.org on 2009/08/07 14:59:00 UTC
svn commit: r801982 - in /camel/trunk/components/camel-spring/src:
main/java/org/apache/camel/spring/CamelContextFactoryBean.java
test/java/org/apache/camel/spring/DefaultStreamCachingTest.java
test/resources/org/apache/camel/spring/streamCaching.xml
Author: ningjiang
Date: Fri Aug 7 12:59:00 2009
New Revision: 801982
URL: http://svn.apache.org/viewvc?rev=801982&view=rev
Log:
CAMEL-1885 Applied patch with thanks to Jens
Added:
camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/DefaultStreamCachingTest.java (with props)
camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/streamCaching.xml (with props)
Modified:
camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/CamelContextFactoryBean.java
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=801982&r1=801981&r2=801982&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 Fri Aug 7 12:59:00 2009
@@ -93,7 +93,7 @@
@XmlAttribute(required = false)
private Boolean trace;
@XmlAttribute(required = false)
- private Boolean streamCache = Boolean.TRUE;
+ private Boolean streamCache = Boolean.FALSE;
@XmlAttribute(required = false)
private Long delayer;
@XmlAttribute(required = false)
Added: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/DefaultStreamCachingTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/DefaultStreamCachingTest.java?rev=801982&view=auto
==============================================================================
--- camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/DefaultStreamCachingTest.java (added)
+++ camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/DefaultStreamCachingTest.java Fri Aug 7 12:59:00 2009
@@ -0,0 +1,33 @@
+/**
+ * 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;
+
+import junit.framework.TestCase;
+import org.apache.camel.impl.DefaultCamelContext;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+public class DefaultStreamCachingTest extends TestCase {
+
+
+ public void testStreamCaching() throws Exception {
+ ApplicationContext appContext = new ClassPathXmlApplicationContext(new String[] {"org/apache/camel/spring/streamCaching.xml"});
+ DefaultCamelContext camelContext = (DefaultCamelContext) appContext.getBean("camelContext");
+ assertFalse("StreamCaching should not be enabled", camelContext.isStreamCaching());
+ }
+
+}
Propchange: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/DefaultStreamCachingTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/DefaultStreamCachingTest.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/streamCaching.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/streamCaching.xml?rev=801982&view=auto
==============================================================================
--- camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/streamCaching.xml (added)
+++ camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/streamCaching.xml Fri Aug 7 12:59:00 2009
@@ -0,0 +1,28 @@
+<?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"
+ xmlns:camel="http://camel.apache.org/schema/spring"
+ 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
+ ">
+
+ <camel:camelContext id="camelContext" />
+
+</beans>
Propchange: camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/streamCaching.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/streamCaching.xml
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/streamCaching.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml