camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject svn commit: r800392 - in /camel/trunk: camel-core/src/main/java/org/apache/camel/impl/ components/camel-spring/src/main/java/org/apache/camel/spring/handler/ components/camel-spring/src/test/java/org/apache/camel/spring/ components/camel-spring/src/tes...
Date Mon, 03 Aug 2009 14:09:22 GMT
Author: ningjiang
Date: Mon Aug  3 14:09:22 2009
New Revision: 800392

URL: http://svn.apache.org/viewvc?rev=800392&view=rev
Log:
CAMEL-1873 fixed the typo that Clause found, also update the unit test for it

Modified:
    camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultConsumerTemplate.java
    camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/handler/CamelNamespaceHandler.java
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/CamelContextAwareTest.java
    camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/camelContextAwareBean.xml

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultConsumerTemplate.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultConsumerTemplate.java?rev=800392&r1=800391&r2=800392&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultConsumerTemplate.java
(original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultConsumerTemplate.java
Mon Aug  3 14:09:22 2009
@@ -43,6 +43,10 @@
     public void stop() throws Exception {
         consumerCache.stop();
     }
+    
+    public CamelContext getCamelContext() {
+        return context;
+    }
 
     public Exchange receive(String endpointUri) {
         Endpoint endpoint = resolveMandatoryEndpoint(endpointUri);

Modified: camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/handler/CamelNamespaceHandler.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/handler/CamelNamespaceHandler.java?rev=800392&r1=800391&r2=800392&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/handler/CamelNamespaceHandler.java
(original)
+++ camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/handler/CamelNamespaceHandler.java
Mon Aug  3 14:09:22 2009
@@ -247,7 +247,7 @@
                                     builder.addPropertyReference("camelJMXAgent", id);
                                 }
                                 // set the templates with the camel context 
-                                if (localName.equals("template") || localName.equals("consumerTemplat")
+                                if (localName.equals("template") || localName.equals("consumerTemplate")
                                     || localName.equals("proxy") || localName.equals("export"))
{
                                     // set the camel context 
                                     definition.getPropertyValues().addPropertyValue("camelContext",
new RuntimeBeanReference(contextId));

Modified: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/CamelContextAwareTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/CamelContextAwareTest.java?rev=800392&r1=800391&r2=800392&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/CamelContextAwareTest.java
(original)
+++ camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/CamelContextAwareTest.java
Mon Aug  3 14:09:22 2009
@@ -20,6 +20,7 @@
 import java.util.Map;
 
 import org.apache.camel.ProducerTemplate;
+import org.apache.camel.impl.DefaultConsumerTemplate;
 import org.apache.camel.impl.DefaultProducerTemplate;
 import org.springframework.context.support.AbstractXmlApplicationContext;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
@@ -31,7 +32,7 @@
     protected CamelContextAwareBean bean1;
 
 
-    public void xtestInjectionPoints() throws Exception {
+    public void testInjectionPoints() throws Exception {
         assertNotNull("No CamelContext injected!", bean1.getCamelContext());
         Map<String, String> properties  = bean1.getCamelContext().getProperties();
         assertNotNull("the properties should not been null", properties);
@@ -45,6 +46,9 @@
         
         DefaultProducerTemplate producer2 = getMandatoryBean(DefaultProducerTemplate.class,
"producer2");
         assertEquals("Inject a wrong camel context", producer2.getContext().getName(), "camel2");
+        
+        DefaultConsumerTemplate consumer = getMandatoryBean(DefaultConsumerTemplate.class,
"consumer");
+        assertEquals("Inject a wrong camel context", consumer.getCamelContext().getName(),
"camel2");
     }
 
     @Override

Modified: camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/camelContextAwareBean.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/camelContextAwareBean.xml?rev=800392&r1=800391&r2=800392&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/camelContextAwareBean.xml
(original)
+++ camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/camelContextAwareBean.xml
Mon Aug  3 14:09:22 2009
@@ -32,6 +32,7 @@
   
   <camel:camelContext id="camel2">
     <camel:template id="producer2"/>
+    <camel:consumerTemplate id="consumer"/>
   </camel:camelContext>
 
   <bean id="bean1" class="org.apache.camel.spring.CamelContextAwareBean">



Mime
View raw message