activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r532790 [2/2] - in /activemq/camel/trunk: camel-core/src/main/java/org/apache/camel/ camel-core/src/main/java/org/apache/camel/builder/ camel-core/src/main/java/org/apache/camel/component/direct/ camel-core/src/main/java/org/apache/camel/co...
Date Thu, 26 Apr 2007 16:13:54 GMT
Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/FilterTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/FilterTest.java?view=diff&rev=532790&r1=532789&r2=532790
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/FilterTest.java (original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/FilterTest.java Thu Apr 26 09:13:49 2007
@@ -17,17 +17,13 @@
  */
 package org.apache.camel.processor;
 
-import org.apache.camel.CamelContext;
+import org.apache.camel.ContextTestSupport;
 import org.apache.camel.Endpoint;
 import org.apache.camel.Exchange;
 import org.apache.camel.Message;
 import org.apache.camel.Processor;
-import org.apache.camel.TestSupport;
-import org.apache.camel.ContextTestSupport;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
-import org.apache.camel.impl.DefaultCamelContext;
-import org.apache.camel.util.ProducerCache;
 
 /**
  * @version $Revision: 1.1 $
@@ -61,7 +57,7 @@
     }
 
     protected RouteBuilder createRouteBuilder() {
-        return new RouteBuilder<Exchange>() {
+        return new RouteBuilder() {
             public void configure() {
                 from("direct:a").filter(header("foo").isEqualTo("bar")).to("mock:result");
             }

Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/IdempotentConsumerTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/IdempotentConsumerTest.java?view=diff&rev=532790&r1=532789&r2=532790
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/IdempotentConsumerTest.java (original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/IdempotentConsumerTest.java Thu Apr 26 09:13:49 2007
@@ -17,24 +17,15 @@
  */
 package org.apache.camel.processor;
 
-import org.apache.camel.CamelContext;
+import static org.apache.camel.processor.idempotent.MemoryMessageIdRepository.memoryMessageIdRepository;
+
+import org.apache.camel.ContextTestSupport;
 import org.apache.camel.Endpoint;
 import org.apache.camel.Exchange;
 import org.apache.camel.Message;
 import org.apache.camel.Processor;
-import org.apache.camel.TestSupport;
-import org.apache.camel.ContextTestSupport;
-import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.impl.DefaultCamelContext;
-import static org.apache.camel.processor.idempotent.MemoryMessageIdRepository.memoryMessageIdRepository;
-import org.apache.camel.util.ProducerCache;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.concurrent.CountDownLatch;
+import org.apache.camel.component.mock.MockEndpoint;
 
 /**
  * @version $Revision: 1.1 $

Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/JoinRoutesTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/JoinRoutesTest.java?view=diff&rev=532790&r1=532789&r2=532790
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/JoinRoutesTest.java (original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/JoinRoutesTest.java Thu Apr 26 09:13:49 2007
@@ -16,17 +16,13 @@
  */
 package org.apache.camel.processor;
 
-import org.apache.camel.CamelContext;
+import org.apache.camel.ContextTestSupport;
 import org.apache.camel.Endpoint;
 import org.apache.camel.Exchange;
 import org.apache.camel.Message;
 import org.apache.camel.Processor;
-import org.apache.camel.TestSupport;
-import org.apache.camel.ContextTestSupport;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
-import org.apache.camel.impl.DefaultCamelContext;
-import org.apache.camel.util.ProducerCache;
 
 /**
  * @version $Revision: 1.1 $
@@ -65,7 +61,7 @@
     }
 
     protected RouteBuilder createRouteBuilder() {
-        return new RouteBuilder<Exchange>() {
+        return new RouteBuilder() {
             public void configure() {
                 from("direct:a").choice()
                         .when(header("foo").isEqualTo("bar")).to("direct:b")

Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/MulticastTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/MulticastTest.java?view=diff&rev=532790&r1=532789&r2=532790
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/MulticastTest.java (original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/MulticastTest.java Thu Apr 26 09:13:49 2007
@@ -68,7 +68,7 @@
             }
         };
 
-        return new RouteBuilder<Exchange>() {
+        return new RouteBuilder() {
             public void configure() {
                 // START SNIPPET: example
                 from("direct:a").to("direct:x", "direct:y", "direct:z");

Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/PipelineTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/PipelineTest.java?view=diff&rev=532790&r1=532789&r2=532790
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/PipelineTest.java (original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/PipelineTest.java Thu Apr 26 09:13:49 2007
@@ -19,9 +19,8 @@
 
 import org.apache.camel.ContextTestSupport;
 import org.apache.camel.Exchange;
-import org.apache.camel.Endpoint;
-import org.apache.camel.Processor;
 import org.apache.camel.Message;
+import org.apache.camel.Processor;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
 
@@ -67,7 +66,7 @@
             }
         };
 
-        return new RouteBuilder<Exchange>() {
+        return new RouteBuilder() {
             public void configure() {
                 // START SNIPPET: example
                 from("direct:a").pipeline("direct:x", "direct:y", "direct:z", "mock:result");

Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/RecipientListTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/RecipientListTest.java?view=diff&rev=532790&r1=532789&r2=532790
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/RecipientListTest.java (original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/RecipientListTest.java Thu Apr 26 09:13:49 2007
@@ -19,9 +19,8 @@
 
 import org.apache.camel.ContextTestSupport;
 import org.apache.camel.Exchange;
-import org.apache.camel.Endpoint;
-import org.apache.camel.Processor;
 import org.apache.camel.Message;
+import org.apache.camel.Processor;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
 
@@ -57,7 +56,7 @@
     }
 
     protected RouteBuilder createRouteBuilder() {
-        return new RouteBuilder<Exchange>() {
+        return new RouteBuilder() {
             public void configure() {
                 // START SNIPPET: example
                 from("direct:a").recipientList(header("recipientListHeader").tokenize(","));

Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/SplitterTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/SplitterTest.java?view=diff&rev=532790&r1=532789&r2=532790
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/SplitterTest.java (original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/SplitterTest.java Thu Apr 26 09:13:49 2007
@@ -54,7 +54,7 @@
     }
 
     protected RouteBuilder createRouteBuilder() {
-        return new RouteBuilder<Exchange>() {
+        return new RouteBuilder() {
             public void configure() {
                 from("direct:a").splitter(body().tokenize(",")).to("mock:result");
             }

Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/TransformTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/TransformTest.java?view=diff&rev=532790&r1=532789&r2=532790
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/TransformTest.java (original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/TransformTest.java Thu Apr 26 09:13:49 2007
@@ -19,9 +19,8 @@
 
 import org.apache.camel.ContextTestSupport;
 import org.apache.camel.Exchange;
-import org.apache.camel.Endpoint;
-import org.apache.camel.Processor;
 import org.apache.camel.Message;
+import org.apache.camel.Processor;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
 
@@ -47,7 +46,7 @@
     }
 
     protected RouteBuilder createRouteBuilder() {
-        return new RouteBuilder<Exchange>() {
+        return new RouteBuilder() {
             public void configure() {
                 // START SNIPPET: example
                 from("direct:start").process(new Processor<Exchange>() {

Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/TransformViaDSLTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/TransformViaDSLTest.java?view=diff&rev=532790&r1=532789&r2=532790
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/TransformViaDSLTest.java (original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/TransformViaDSLTest.java Thu Apr 26 09:13:49 2007
@@ -18,7 +18,6 @@
 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;
 
@@ -44,7 +43,7 @@
     }
 
     protected RouteBuilder createRouteBuilder() {
-        return new RouteBuilder<Exchange>() {
+        return new RouteBuilder() {
             public void configure() {
                 // START SNIPPET: example
                 from("direct:start").setBody(body().append(" World!")).to("mock:result");

Modified: activemq/camel/trunk/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfEndpoint.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfEndpoint.java?view=diff&rev=532790&r1=532789&r2=532790
==============================================================================
--- activemq/camel/trunk/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfEndpoint.java (original)
+++ activemq/camel/trunk/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfEndpoint.java Thu Apr 26 09:13:49 2007
@@ -89,4 +89,9 @@
     public CxfComponent getComponent() {
         return component;
     }
+    
+	public boolean isSingleton() {
+		return true;
+	}
+
 }

Modified: activemq/camel/trunk/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfInvokeEndpoint.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfInvokeEndpoint.java?view=diff&rev=532790&r1=532789&r2=532790
==============================================================================
--- activemq/camel/trunk/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfInvokeEndpoint.java (original)
+++ activemq/camel/trunk/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfInvokeEndpoint.java Thu Apr 26 09:13:49 2007
@@ -89,4 +89,9 @@
     public Bus getBus() {
         return component.getBus();
     }
+    
+	public boolean isSingleton() {
+		return true;
+	}
+
 }

Modified: activemq/camel/trunk/camel-cxf/src/main/java/org/apache/camel/component/cxf/transport/CamelDestination.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-cxf/src/main/java/org/apache/camel/component/cxf/transport/CamelDestination.java?view=diff&rev=532790&r1=532789&r2=532790
==============================================================================
--- activemq/camel/trunk/camel-cxf/src/main/java/org/apache/camel/component/cxf/transport/CamelDestination.java (original)
+++ activemq/camel/trunk/camel-cxf/src/main/java/org/apache/camel/component/cxf/transport/CamelDestination.java Thu Apr 26 09:13:49 2007
@@ -87,7 +87,7 @@
 
         try {
             getLogger().log(Level.FINE, "establishing Camel connection");
-            endpoint = camelContext.resolveEndpoint(camelUri);
+            endpoint = camelContext.getEndpoint(camelUri);
         }
         catch (Exception ex) {
             getLogger().log(Level.SEVERE, "Camel connect failed with EException : ", ex);

Modified: activemq/camel/trunk/camel-file/src/main/java/org/apache/camel/component/file/FileEndpoint.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-file/src/main/java/org/apache/camel/component/file/FileEndpoint.java?view=diff&rev=532790&r1=532789&r2=532790
==============================================================================
--- activemq/camel/trunk/camel-file/src/main/java/org/apache/camel/component/file/FileEndpoint.java (original)
+++ activemq/camel/trunk/camel-file/src/main/java/org/apache/camel/component/file/FileEndpoint.java Thu Apr 26 09:13:49 2007
@@ -99,7 +99,8 @@
         return file;
     }
 
+	public boolean isSingleton() {
+		return true;
+	}
   
-    
-
 }

Modified: activemq/camel/trunk/camel-http/src/main/java/org/apache/camel/component/http/HttpEndpoint.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-http/src/main/java/org/apache/camel/component/http/HttpEndpoint.java?view=diff&rev=532790&r1=532789&r2=532790
==============================================================================
--- activemq/camel/trunk/camel-http/src/main/java/org/apache/camel/component/http/HttpEndpoint.java (original)
+++ activemq/camel/trunk/camel-http/src/main/java/org/apache/camel/component/http/HttpEndpoint.java Thu Apr 26 09:13:49 2007
@@ -71,4 +71,9 @@
     public void setBinding(HttpBinding binding) {
         this.binding = binding;
     }
+    
+	public boolean isSingleton() {
+		return true;
+	}
+
 }

Modified: activemq/camel/trunk/camel-itest/src/main/java/org/apache/camel/itest/jms/JmsIntegrationTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-itest/src/main/java/org/apache/camel/itest/jms/JmsIntegrationTest.java?view=diff&rev=532790&r1=532789&r2=532790
==============================================================================
--- activemq/camel/trunk/camel-itest/src/main/java/org/apache/camel/itest/jms/JmsIntegrationTest.java (original)
+++ activemq/camel/trunk/camel-itest/src/main/java/org/apache/camel/itest/jms/JmsIntegrationTest.java Thu Apr 26 09:13:49 2007
@@ -78,7 +78,7 @@
         container.start();
         
         // Send a message to the JMS endpoint
-        JmsEndpoint endpoint = (JmsEndpoint) container.resolveEndpoint("jms:test");        
+        JmsEndpoint endpoint = (JmsEndpoint) container.getEndpoint("jms:test");        
         Producer<JmsExchange> producer = endpoint.createProducer();
         JmsExchange exchange = producer.createExchange();
         JmsMessage in = exchange.getIn();

Modified: activemq/camel/trunk/camel-jbi/src/main/java/org/apache/camel/component/jbi/CamelJbiComponent.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-jbi/src/main/java/org/apache/camel/component/jbi/CamelJbiComponent.java?view=diff&rev=532790&r1=532789&r2=532790
==============================================================================
--- activemq/camel/trunk/camel-jbi/src/main/java/org/apache/camel/component/jbi/CamelJbiComponent.java (original)
+++ activemq/camel/trunk/camel-jbi/src/main/java/org/apache/camel/component/jbi/CamelJbiComponent.java Thu Apr 26 09:13:49 2007
@@ -100,7 +100,7 @@
         URI uri = new URI(ep.getEndpointName());
         Map map = URISupport.parseQuery(uri.getQuery());
         String camelUri = uri.getSchemeSpecificPart();
-        Endpoint camelEndpoint = getCamelContext().resolveEndpoint(camelUri);
+        Endpoint camelEndpoint = getCamelContext().getEndpoint(camelUri);
         Processor<Exchange> processor = null;
         try {
             processor = camelEndpoint.createProducer();

Modified: activemq/camel/trunk/camel-jbi/src/main/java/org/apache/camel/component/jbi/JbiEndpoint.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-jbi/src/main/java/org/apache/camel/component/jbi/JbiEndpoint.java?view=diff&rev=532790&r1=532789&r2=532790
==============================================================================
--- activemq/camel/trunk/camel-jbi/src/main/java/org/apache/camel/component/jbi/JbiEndpoint.java (original)
+++ activemq/camel/trunk/camel-jbi/src/main/java/org/apache/camel/component/jbi/JbiEndpoint.java Thu Apr 26 09:13:49 2007
@@ -79,4 +79,9 @@
     public JbiBinding getBinding() {
         return jbiComponent.getBinding();
     }
+    
+	public boolean isSingleton() {
+		return true;
+	}
+
 }

Modified: activemq/camel/trunk/camel-jbi/src/test/java/org/apache/camel/component/jbi/JbiTestSupport.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-jbi/src/test/java/org/apache/camel/component/jbi/JbiTestSupport.java?view=diff&rev=532790&r1=532789&r2=532790
==============================================================================
--- activemq/camel/trunk/camel-jbi/src/test/java/org/apache/camel/component/jbi/JbiTestSupport.java (original)
+++ activemq/camel/trunk/camel-jbi/src/test/java/org/apache/camel/component/jbi/JbiTestSupport.java Thu Apr 26 09:13:49 2007
@@ -101,7 +101,7 @@
 
         // lets add some routes
         camelContext.addRoutes(createRoutes());
-        endpoint = camelContext.resolveEndpoint(startEndpointUri);
+        endpoint = camelContext.getEndpoint(startEndpointUri);
         assertNotNull("No endpoint found!", endpoint);
 
         camelContext.start();

Modified: activemq/camel/trunk/camel-jbi/src/test/java/org/apache/camel/component/jbi/SendFromCamelToJbiAndBackToCamelTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-jbi/src/test/java/org/apache/camel/component/jbi/SendFromCamelToJbiAndBackToCamelTest.java?view=diff&rev=532790&r1=532789&r2=532790
==============================================================================
--- activemq/camel/trunk/camel-jbi/src/test/java/org/apache/camel/component/jbi/SendFromCamelToJbiAndBackToCamelTest.java (original)
+++ activemq/camel/trunk/camel-jbi/src/test/java/org/apache/camel/component/jbi/SendFromCamelToJbiAndBackToCamelTest.java Thu Apr 26 09:13:49 2007
@@ -38,7 +38,7 @@
     public void testCamelInvokingJbi() throws Exception {
         senderComponent.sendMessages(1);
 
-        QueueEndpoint receiverEndpoint = (QueueEndpoint) camelContext.resolveEndpoint("queue:receiver");
+        QueueEndpoint receiverEndpoint = (QueueEndpoint) camelContext.getEndpoint("queue:receiver");
 
         BlockingQueue<Exchange> queue = receiverEndpoint.getQueue();
         Exchange exchange = queue.poll(5, TimeUnit.SECONDS);

Modified: activemq/camel/trunk/camel-jms/src/main/java/org/apache/camel/component/jms/JmsComponent.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-jms/src/main/java/org/apache/camel/component/jms/JmsComponent.java?view=diff&rev=532790&r1=532789&r2=532790
==============================================================================
--- activemq/camel/trunk/camel-jms/src/main/java/org/apache/camel/component/jms/JmsComponent.java (original)
+++ activemq/camel/trunk/camel-jms/src/main/java/org/apache/camel/component/jms/JmsComponent.java Thu Apr 26 09:13:49 2007
@@ -18,17 +18,18 @@
 package org.apache.camel.component.jms;
 
 import static org.apache.camel.util.ObjectHelper.removeStartingCharacters;
+
+import java.util.Map;
+
+import javax.jms.ConnectionFactory;
+import javax.jms.Session;
+
 import org.apache.camel.CamelContext;
-import org.apache.camel.Component;
 import org.apache.camel.Endpoint;
 import org.apache.camel.impl.DefaultComponent;
 import org.apache.camel.util.IntrospectionSupport;
-import org.apache.camel.util.ObjectHelper;
 import org.springframework.transaction.PlatformTransactionManager;
 
-import javax.jms.ConnectionFactory;
-import java.util.Map;
-
 /**
  * @version $Revision:520964 $
  */
@@ -63,23 +64,20 @@
      */
     public static JmsComponent jmsComponentClientAcknowledge(ConnectionFactory connectionFactory) {
         JmsConfiguration template = new JmsConfiguration(connectionFactory);
-        template.setProducerAcknowledgementMode(JmsConfiguration.CLIENT_ACKNOWLEDGE);
-        template.setConsumerAcknowledgementMode(JmsConfiguration.CLIENT_ACKNOWLEDGE);
+        template.setAcknowledgementMode(Session.AUTO_ACKNOWLEDGE);
         return jmsComponent(template);
     }
 
     public static JmsComponent jmsComponentTransacted(ConnectionFactory connectionFactory) {
         JmsConfiguration template = new JmsConfiguration(connectionFactory);
-        template.setProducerAcknowledgementMode(JmsConfiguration.TRANSACTED);
-        template.setConsumerAcknowledgementMode(JmsConfiguration.TRANSACTED);
+        template.setTransacted(true);
         return jmsComponent(template);
     }
 
 	public static JmsComponent jmsComponentTransacted(ConnectionFactory connectionFactory, PlatformTransactionManager transactionManager) {
         JmsConfiguration template = new JmsConfiguration(connectionFactory);
-        template.setProducerAcknowledgementMode(JmsConfiguration.TRANSACTED);
-        template.setConsumerAcknowledgementMode(JmsConfiguration.TRANSACTED);
         template.setTransactionManager(transactionManager);
+        template.setTransacted(true);
         return jmsComponent(template);
 	}
 

Modified: activemq/camel/trunk/camel-jms/src/main/java/org/apache/camel/component/jms/JmsConfiguration.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-jms/src/main/java/org/apache/camel/component/jms/JmsConfiguration.java?view=diff&rev=532790&r1=532789&r2=532790
==============================================================================
--- activemq/camel/trunk/camel-jms/src/main/java/org/apache/camel/component/jms/JmsConfiguration.java (original)
+++ activemq/camel/trunk/camel-jms/src/main/java/org/apache/camel/component/jms/JmsConfiguration.java Thu Apr 26 09:13:49 2007
@@ -42,48 +42,48 @@
 public class JmsConfiguration implements Cloneable {
     protected static final String TRANSACTED = "TRANSACTED";
     protected static final String CLIENT_ACKNOWLEDGE = "CLIENT_ACKNOWLEDGE";
-    
+
+    // General Setting used for both the JmsTemplate and JMS Container
     private ConnectionFactory connectionFactory;
-    private ConnectionFactory producerConnectionFactory;
+	private int acknowledgementMode=-1;
+    private String acknowledgementModeName;
+    
+    // Used to configure the spring Container
+    private ExceptionListener exceptionListener;
     private ConsumerType consumerType = ConsumerType.Default;
-    private boolean useVersion102;
     private boolean autoStartup;
     private boolean acceptMessagesWhileStopping;
-    private String consumerClientId;
+    private String clientId;
     private String durableSubscriptionName;
-    private ExceptionListener exceptionListener;
-    private String producerAcknowledgementMode = TRANSACTED;
     private boolean subscriptionDurable;
-    private String consumerAcknowledgementMode = TRANSACTED;
     private boolean exposeListenerSession;
-    // not used for ServerSessionMessageListenerContainer 
     private TaskExecutor taskExecutor;
-    // SimpleMessageListenerContainer only
     private boolean pubSubNoLocal;
-    // not used for ServerSessionMessageListenerContainer
     private int concurrentConsumers = -1;
-    // not used for SimpleMessageListenerContainer
     private int maxMessagesPerTask = -1;
-    // ServerSessionMessageListenerContainer only
     private ServerSessionFactory serverSessionFactory;
-    //  DefaultMessageListenerContainer only
     private int cacheLevel = -1;
-    private String cacheName;
+    private String cacheLevelName;
     private long recoveryInterval = -1;
     private long receiveTimeout = -1;
-    private PlatformTransactionManager transactionManager;
-    private String transactionName;
-    private int transactionTimeout = -1;
     private int idleTaskExecutionLimit = -1;
     private int maxConcurrentConsumers = -1;
+    
     // JmsTemplate only
+    private boolean useVersion102;
     private boolean explicitQosEnabled;
     private boolean deliveryPersistent = true;
     private long timeToLive = -1;
     private MessageConverter messageConverter;
     private boolean messageIdEnabled = true;
     private boolean messageTimestampEnabled;
-    private int priority = -1;
+    private int priority = -1;     
+	
+	// Transaction related configuration
+	private boolean transacted;
+    private PlatformTransactionManager transactionManager;
+    private String transactionName;
+    private int transactionTimeout = -1;
 
     public JmsConfiguration() {
     }
@@ -106,8 +106,8 @@
 
     public JmsOperations createJmsOperations(boolean pubSubDomain, String destination) {
         JmsTemplate template = useVersion102
-                ? new JmsTemplate102(getProducerConnectionFactory(), pubSubDomain)
-                : new JmsTemplate(getProducerConnectionFactory());
+                ? new JmsTemplate102(getConnectionFactory(), pubSubDomain)
+                : new JmsTemplate(getConnectionFactory());
         template.setPubSubDomain(pubSubDomain);
         template.setDefaultDestinationName(destination);
 
@@ -129,11 +129,13 @@
             template.setTimeToLive(timeToLive);
         }
 
-        boolean transacted = TRANSACTED.equals(producerAcknowledgementMode);
-        template.setSessionTransacted(transacted);
-        if (!transacted) {
-            // TODO not sure if Spring can handle TRANSACTED as an ack mode
-            template.setSessionAcknowledgeModeName(producerAcknowledgementMode);
+        template.setSessionTransacted( transacted );
+        
+        // This is here for completeness, but the template should not get used for receiving messages.
+        if( acknowledgementMode >= 0 ) {
+        	template.setSessionAcknowledgeMode(acknowledgementMode);
+        } else if( acknowledgementModeName!= null ) {
+        	template.setSessionAcknowledgeModeName(acknowledgementModeName);
         }
         return template;
     }
@@ -149,8 +151,8 @@
         if (autoStartup) {
             container.setAutoStartup(true);
         }
-        if (consumerClientId != null) {
-            container.setClientId(consumerClientId);
+        if (clientId != null) {
+            container.setClientId(clientId);
         }
         if (durableSubscriptionName != null) {
             container.setDurableSubscriptionName(durableSubscriptionName);
@@ -158,14 +160,17 @@
         if (exceptionListener != null) {
             container.setExceptionListener(exceptionListener);
         }
+
         container.setAcceptMessagesWhileStopping(acceptMessagesWhileStopping);
         container.setExposeListenerSession(exposeListenerSession);
-        boolean transacted = TRANSACTED.equals(consumerAcknowledgementMode);
         container.setSessionTransacted(transacted);
-        if (!transacted) {
-            // TODO not sure if Spring can handle TRANSACTED as an ack mode
-            container.setSessionAcknowledgeModeName(consumerAcknowledgementMode);
+        
+        if( acknowledgementMode >= 0 ) {
+            container.setSessionAcknowledgeMode(acknowledgementMode);
+        } else if( acknowledgementModeName!= null ) {
+            container.setSessionAcknowledgeModeName(acknowledgementModeName);
         }
+
         container.setSubscriptionDurable(subscriptionDurable);
 
         if (container instanceof DefaultMessageListenerContainer) {
@@ -177,8 +182,8 @@
             
             if (cacheLevel >= 0) {
                 listenerContainer.setCacheLevel(cacheLevel);
-            } else if (cacheName != null) {
-                listenerContainer.setCacheLevelName(cacheName);
+            } else if (cacheLevelName != null) {
+                listenerContainer.setCacheLevelName(cacheLevelName);
             } else {
             	// Default to CACHE_CONSUMER unless specified.  This works best with most JMS providers.
             	listenerContainer.setCacheLevel(DefaultMessageListenerContainer.CACHE_CONSUMER);
@@ -246,23 +251,6 @@
         this.connectionFactory = connectionFactory;
     }
 
-    public ConnectionFactory getProducerConnectionFactory() {
-        if (producerConnectionFactory == null) {
-            return getConnectionFactory();
-        }
-        return producerConnectionFactory;
-    }
-
-    /**
-     * Allows the connection factory for the producer side (sending) to be different from the connection factory used for consuming.
-     * By default the {@link #getConnectionFactory()} will be used for both.
-     *
-     * @param producerConnectionFactory the connection factory to be used for sending.
-     */
-    public void setProducerConnectionFactory(ConnectionFactory producerConnectionFactory) {
-        this.producerConnectionFactory = producerConnectionFactory;
-    }
-
     public boolean isUseVersion102() {
         return useVersion102;
     }
@@ -287,12 +275,12 @@
         this.acceptMessagesWhileStopping = acceptMessagesWhileStopping;
     }
 
-    public String getConsumerClientId() {
-        return consumerClientId;
+    public String getClientId() {
+        return clientId;
     }
 
-    public void setConsumerClientId(String consumerClientId) {
-        this.consumerClientId = consumerClientId;
+    public void setClientId(String consumerClientId) {
+        this.clientId = consumerClientId;
     }
 
     public String getDurableSubscriptionName() {
@@ -311,14 +299,6 @@
         this.exceptionListener = exceptionListener;
     }
 
-    public String getProducerAcknowledgementMode() {
-        return producerAcknowledgementMode;
-    }
-
-    public void setProducerAcknowledgementMode(String producerAcknowledgementMode) {
-        this.producerAcknowledgementMode = producerAcknowledgementMode;
-    }
-
     public boolean isSubscriptionDurable() {
         return subscriptionDurable;
     }
@@ -327,12 +307,13 @@
         this.subscriptionDurable = subscriptionDurable;
     }
 
-    public String getConsumerAcknowledgementMode() {
-        return consumerAcknowledgementMode;
+    public String getAcknowledgementModeName() {
+        return acknowledgementModeName;        
     }
 
-    public void setConsumerAcknowledgementMode(String consumerAcknowledgementMode) {
-        this.consumerAcknowledgementMode = consumerAcknowledgementMode;
+    public void setAcknowledgementModeName(String consumerAcknowledgementMode) {
+        this.acknowledgementModeName = consumerAcknowledgementMode;
+        this.acknowledgementMode=-1;
     }
 
     public boolean isExposeListenerSession() {
@@ -391,12 +372,12 @@
         this.cacheLevel = cacheLevel;
     }
 
-    public String getCacheName() {
-        return cacheName;
+    public String getCacheLevelName() {
+        return cacheLevelName;
     }
 
-    public void setCacheName(String cacheName) {
-        this.cacheName = cacheName;
+    public void setCacheLevelName(String cacheName) {
+        this.cacheLevelName = cacheName;
     }
 
     public long getRecoveryInterval() {
@@ -534,4 +515,22 @@
                 throw new IllegalArgumentException("Unknown consumer type: " + consumerType);
         }
     }
+
+	public int getAcknowledgementMode() {
+		return acknowledgementMode;
+	}
+
+	public void setAcknowledgementMode(int consumerAcknowledgementMode) {
+		this.acknowledgementMode = consumerAcknowledgementMode;
+		this.acknowledgementModeName=null;
+	}
+
+	public boolean isTransacted() {
+		return transacted;
+	}
+
+	public void setTransacted(boolean consumerTransacted) {
+		this.transacted = consumerTransacted;
+	}
+
 }

Modified: activemq/camel/trunk/camel-jms/src/main/java/org/apache/camel/component/jms/JmsEndpoint.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-jms/src/main/java/org/apache/camel/component/jms/JmsEndpoint.java?view=diff&rev=532790&r1=532789&r2=532790
==============================================================================
--- activemq/camel/trunk/camel-jms/src/main/java/org/apache/camel/component/jms/JmsEndpoint.java (original)
+++ activemq/camel/trunk/camel-jms/src/main/java/org/apache/camel/component/jms/JmsEndpoint.java Thu Apr 26 09:13:49 2007
@@ -132,4 +132,8 @@
         this.selector = selector;
     }
 
+	public boolean isSingleton() {
+		return true;
+	}
+
 }

Modified: activemq/camel/trunk/camel-jms/src/test/java/org/apache/camel/component/jms/JmsRouteTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-jms/src/test/java/org/apache/camel/component/jms/JmsRouteTest.java?view=diff&rev=532790&r1=532789&r2=532790
==============================================================================
--- activemq/camel/trunk/camel-jms/src/test/java/org/apache/camel/component/jms/JmsRouteTest.java (original)
+++ activemq/camel/trunk/camel-jms/src/test/java/org/apache/camel/component/jms/JmsRouteTest.java Thu Apr 26 09:13:49 2007
@@ -110,9 +110,17 @@
                         latch.countDown();
                     }
                 });
+                
+                JmsEndpoint endpoint1 = (JmsEndpoint) endpoint("activemq:topic:quote.IONA");
+                endpoint1.getConfiguration().setTransacted(true);
+                from(endpoint1).to("mock:transactedClient");
+                
+                JmsEndpoint endpoint2 = (JmsEndpoint) endpoint("activemq:topic:quote.IONA");
+                endpoint1.getConfiguration().setTransacted(true);
+                from(endpoint2).to("mock:nonTrasnactedClient");
             }
         });
-        endpoint = container.resolveEndpoint("activemq:queue:test.a");
+        endpoint = container.getEndpoint("activemq:queue:test.a");
         assertNotNull("No endpoint found!", endpoint);
 
         container.start();

Modified: activemq/camel/trunk/camel-jms/src/test/java/org/apache/camel/component/jms/TransactedJmsRouteTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-jms/src/test/java/org/apache/camel/component/jms/TransactedJmsRouteTest.java?view=diff&rev=532790&r1=532789&r2=532790
==============================================================================
--- activemq/camel/trunk/camel-jms/src/test/java/org/apache/camel/component/jms/TransactedJmsRouteTest.java (original)
+++ activemq/camel/trunk/camel-jms/src/test/java/org/apache/camel/component/jms/TransactedJmsRouteTest.java Thu Apr 26 09:13:49 2007
@@ -23,13 +23,12 @@
 import java.util.concurrent.TimeUnit;
 
 import javax.jms.ConnectionFactory;
+import javax.jms.Session;
 
 import org.apache.camel.CamelContext;
 import org.apache.camel.ContextTestSupport;
-import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
 import org.apache.camel.Route;
-import org.apache.camel.builder.ProcessorFactory;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.processor.DelegateProcessor;
@@ -52,10 +51,12 @@
 	private MockEndpoint mockEndpointA;
 	private MockEndpoint mockEndpointB;
 	private ClassPathXmlApplicationContext spring;
+	private MockEndpoint mockEndpointC;
+	private MockEndpoint mockEndpointD;
 
 	@Override
 	protected RouteBuilder createRouteBuilder() {
-		return new SpringRouteBuilder<Exchange>() {
+		return new SpringRouteBuilder() {
 			public void configure() {
 				
 		        Policy requried = new SpringTransactionPolicy(bean(TransactionTemplate.class, "PROPAGATION_REQUIRED"));
@@ -121,9 +122,27 @@
 				// Also, expect the message to be successfully consumed since the rollback error is not propagated.
 		        from("activemq:queue:d").policy(catchRollback).policy(notsupported).policy(rollback).to("activemq:queue:mock.a"); 
 
-//		        JmsEndpoint endpoint = (JmsEndpoint)endpoint("activemq:queue:e");
-//		        from(endpoint).policy(catchRollback).policy(notsupported).policy(rollback).to("activemq:queue:mock.a"); 
-				
+		        // Receive message on a non transacted JMS endpoint, start a transaction, send and then rollback.
+		        // mock:a should never get the message (due to rollback) but mock:b should get only 1 since the 
+		        // inbound was not transacted.
+		        JmsEndpoint endpoint = (JmsEndpoint)endpoint("activemq:queue:e");
+		        endpoint.getConfiguration().setTransacted(false);
+		        endpoint.getConfiguration().setAcknowledgementMode(Session.AUTO_ACKNOWLEDGE);
+		        from(endpoint).policy(requried).policy(rollback).to("activemq:queue:mock.a", "mock:b");
+		        
+		        
+		        //
+		        // Sets up 2 consumers on single topic, one being transacted the other not.  Used to verify 
+		        // That each consumer can have independently configured transaction settings. 
+		        // Do a rollback, should cause the transacted consumer to re-deliver but not the un-trasacted one.
+                JmsEndpoint endpoint1 = (JmsEndpoint) endpoint("activemq:topic:f");
+                endpoint1.getConfiguration().setTransacted(true);
+                from(endpoint1).policy(requried).policy(rollback).to("activemq:queue:mock.a", "mock:b"); 
+                
+                JmsEndpoint endpoint2 = (JmsEndpoint) endpoint("activemq:topic:f");
+                endpoint1.getConfiguration().setTransacted(false);
+                from(endpoint2).policy(requried).policy(rollback).to("activemq:queue:mock.c", "mock:d");
+
 			}
 		};
 	}
@@ -149,6 +168,8 @@
         
         mockEndpointA = (MockEndpoint) resolveMandatoryEndpoint("mock:a");
         mockEndpointB = (MockEndpoint) resolveMandatoryEndpoint("mock:b");
+        mockEndpointC = (MockEndpoint) resolveMandatoryEndpoint("mock:c");
+        mockEndpointD = (MockEndpoint) resolveMandatoryEndpoint("mock:d");
     }
     
     @Override
@@ -200,4 +221,37 @@
         
         assertIsSatisfied(mockEndpointA);
 	}
+	
+	public void testSenarioE() throws Exception {
+		String expected = getName()+": "+System.currentTimeMillis();
+		mockEndpointA.expectedMessageCount(0);
+		mockEndpointB.expectedMessageCount(1);		
+        send("activemq:queue:e", expected);
+
+        // Wait till the endpoints get their messages.
+        assertWait(5, TimeUnit.SECONDS, mockEndpointA,mockEndpointB);
+
+        // Wait a little more to make sure extra messages are not received.
+        Thread.sleep(1000);
+        
+        assertIsSatisfied(mockEndpointA, mockEndpointB);
+	}
+	
+	public void disabletestSenarioF() throws Exception {
+		String expected = getName()+": "+System.currentTimeMillis();
+		mockEndpointA.expectedMessageCount(0);
+		mockEndpointB.expectedMinimumMessageCount(2);		
+		mockEndpointC.expectedMessageCount(0);
+		mockEndpointD.expectedMessageCount(1);
+        send("activemq:queue:e", expected);
+
+        // Wait till the endpoints get their messages.
+        assertWait(5, TimeUnit.SECONDS, mockEndpointA,mockEndpointB);
+
+        // Wait a little more to make sure extra messages are not received.
+        Thread.sleep(1000);
+        
+        assertIsSatisfied(mockEndpointA, mockEndpointB);
+	}
+	
 }

Modified: activemq/camel/trunk/camel-jpa/src/main/java/org/apache/camel/component/jpa/JpaEndpoint.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-jpa/src/main/java/org/apache/camel/component/jpa/JpaEndpoint.java?view=diff&rev=532790&r1=532789&r2=532790
==============================================================================
--- activemq/camel/trunk/camel-jpa/src/main/java/org/apache/camel/component/jpa/JpaEndpoint.java (original)
+++ activemq/camel/trunk/camel-jpa/src/main/java/org/apache/camel/component/jpa/JpaEndpoint.java Thu Apr 26 09:13:49 2007
@@ -190,4 +190,9 @@
             };
         }
     }
+    
+	public boolean isSingleton() {
+		return true;
+	}
+
 }

Modified: activemq/camel/trunk/camel-jpa/src/test/java/org/apache/camel/component/jpa/JpaTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-jpa/src/test/java/org/apache/camel/component/jpa/JpaTest.java?view=diff&rev=532790&r1=532789&r2=532790
==============================================================================
--- activemq/camel/trunk/camel-jpa/src/test/java/org/apache/camel/component/jpa/JpaTest.java (original)
+++ activemq/camel/trunk/camel-jpa/src/test/java/org/apache/camel/component/jpa/JpaTest.java Thu Apr 26 09:13:49 2007
@@ -104,7 +104,7 @@
 
         startServices(client, camelContext);
 
-        Endpoint value = camelContext.resolveEndpoint(getEndpointUri());
+        Endpoint value = camelContext.getEndpoint(getEndpointUri());
         assertNotNull("Could not find endpoint!", value);
         assertTrue("Should be a JPA endpoint but was: " + value, value instanceof JpaEndpoint);
         endpoint = (JpaEndpoint) value;

Modified: activemq/camel/trunk/camel-jpa/src/test/java/org/apache/camel/component/jpa/JpaWithNamedQueryTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-jpa/src/test/java/org/apache/camel/component/jpa/JpaWithNamedQueryTest.java?view=diff&rev=532790&r1=532789&r2=532790
==============================================================================
--- activemq/camel/trunk/camel-jpa/src/test/java/org/apache/camel/component/jpa/JpaWithNamedQueryTest.java (original)
+++ activemq/camel/trunk/camel-jpa/src/test/java/org/apache/camel/component/jpa/JpaWithNamedQueryTest.java Thu Apr 26 09:13:49 2007
@@ -137,7 +137,7 @@
 
         ServiceHelper.startServices(client, camelContext);
 
-        Endpoint value = camelContext.resolveEndpoint(getEndpointUri());
+        Endpoint value = camelContext.getEndpoint(getEndpointUri());
         assertNotNull("Could not find endpoint!", value);
         assertTrue("Should be a JPA endpoint but was: " + value, value instanceof JpaEndpoint);
         endpoint = (JpaEndpoint) value;

Modified: activemq/camel/trunk/camel-jpa/src/test/java/org/apache/camel/processor/jpa/JpaIdempotentConsumerTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-jpa/src/test/java/org/apache/camel/processor/jpa/JpaIdempotentConsumerTest.java?view=diff&rev=532790&r1=532789&r2=532790
==============================================================================
--- activemq/camel/trunk/camel-jpa/src/test/java/org/apache/camel/processor/jpa/JpaIdempotentConsumerTest.java (original)
+++ activemq/camel/trunk/camel-jpa/src/test/java/org/apache/camel/processor/jpa/JpaIdempotentConsumerTest.java Thu Apr 26 09:13:49 2007
@@ -17,16 +17,15 @@
  */
 package org.apache.camel.processor.jpa;
 
-import org.apache.camel.Exchange;
-import org.apache.camel.Processor;
+import static org.apache.camel.processor.idempotent.jpa.JpaMessageIdRepository.jpaMessageIdRepository;
+
 import org.apache.camel.CamelContext;
-import org.apache.camel.spring.SpringCamelContext;
-import org.apache.camel.spring.SpringRouteBuilder;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.processor.IdempotentConsumerTest;
-import static org.apache.camel.processor.idempotent.jpa.JpaMessageIdRepository.jpaMessageIdRepository;
-import org.springframework.context.support.ClassPathXmlApplicationContext;
+import org.apache.camel.spring.SpringCamelContext;
+import org.apache.camel.spring.SpringRouteBuilder;
 import org.springframework.context.ApplicationContext;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
 import org.springframework.orm.jpa.JpaTemplate;
 
 /**
@@ -44,7 +43,7 @@
     @Override
     protected RouteBuilder createRouteBuilder() {
         // START SNIPPET: idempotent
-        return new SpringRouteBuilder<Exchange>() {
+        return new SpringRouteBuilder() {
             public void configure() {
                 from("direct:start").idempotentConsumer(
                         header("messageId"),

Modified: activemq/camel/trunk/camel-mina/src/main/java/org/apache/camel/component/mina/MinaEndpoint.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-mina/src/main/java/org/apache/camel/component/mina/MinaEndpoint.java?view=diff&rev=532790&r1=532789&r2=532790
==============================================================================
--- activemq/camel/trunk/camel-mina/src/main/java/org/apache/camel/component/mina/MinaEndpoint.java (original)
+++ activemq/camel/trunk/camel-mina/src/main/java/org/apache/camel/component/mina/MinaEndpoint.java Thu Apr 26 09:13:49 2007
@@ -86,4 +86,8 @@
         return config;
     }
 
+	public boolean isSingleton() {
+		return true;
+	}
+
 }

Modified: activemq/camel/trunk/camel-mina/src/test/java/org/apache/camel/component/mina/MinaVmTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-mina/src/test/java/org/apache/camel/component/mina/MinaVmTest.java?view=diff&rev=532790&r1=532789&r2=532790
==============================================================================
--- activemq/camel/trunk/camel-mina/src/test/java/org/apache/camel/component/mina/MinaVmTest.java (original)
+++ activemq/camel/trunk/camel-mina/src/test/java/org/apache/camel/component/mina/MinaVmTest.java Thu Apr 26 09:13:49 2007
@@ -42,7 +42,7 @@
     public void testMinaRoute() throws Exception {
 
         // now lets fire in a message
-        Endpoint<MinaExchange> endpoint = container.resolveEndpoint(uri);
+        Endpoint<MinaExchange> endpoint = container.getEndpoint(uri);
         MinaExchange exchange = endpoint.createExchange();
         Message message = exchange.getIn();
         message.setBody("Hello there!");

Modified: activemq/camel/trunk/camel-spring/src/main/java/org/apache/camel/spring/SpringRouteBuilder.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-spring/src/main/java/org/apache/camel/spring/SpringRouteBuilder.java?view=diff&rev=532790&r1=532789&r2=532790
==============================================================================
--- activemq/camel/trunk/camel-spring/src/main/java/org/apache/camel/spring/SpringRouteBuilder.java (original)
+++ activemq/camel/trunk/camel-spring/src/main/java/org/apache/camel/spring/SpringRouteBuilder.java Thu Apr 26 09:13:49 2007
@@ -27,7 +27,7 @@
  *
  * @version $Revision: 1.1 $
  */
-public abstract class SpringRouteBuilder<E extends Exchange> extends RouteBuilder<E> {
+public abstract class SpringRouteBuilder extends RouteBuilder {
     private ApplicationContext applicationContext;
 
     /**

Modified: activemq/camel/trunk/camel-spring/src/test/java/org/apache/camel/spring/xml/XmlRouteBuilderTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-spring/src/test/java/org/apache/camel/spring/xml/XmlRouteBuilderTest.java?view=diff&rev=532790&r1=532789&r2=532790
==============================================================================
--- activemq/camel/trunk/camel-spring/src/test/java/org/apache/camel/spring/xml/XmlRouteBuilderTest.java (original)
+++ activemq/camel/trunk/camel-spring/src/test/java/org/apache/camel/spring/xml/XmlRouteBuilderTest.java Thu Apr 26 09:13:49 2007
@@ -46,83 +46,83 @@
 
 	@Override
 	@SuppressWarnings("unchecked")
-	protected RouteBuilder<Exchange> buildSimpleRoute() {
-		RouteBuilder<Exchange> builder = (RouteBuilder<Exchange>) ctx.getBean("buildSimpleRoute");
+	protected RouteBuilder buildSimpleRoute() {
+		RouteBuilder builder = (RouteBuilder) ctx.getBean("buildSimpleRoute");
 		assertNotNull(builder);
 		return builder;
 	}
 	
 	@Override
-	protected RouteBuilder<Exchange> buildCustomProcessor() {
+	protected RouteBuilder buildCustomProcessor() {
 		myProcessor = (Processor<Exchange>) ctx.getBean("myProcessor");
-		RouteBuilder<Exchange> builder = (RouteBuilder<Exchange>) ctx.getBean("buildCustomProcessor");
+		RouteBuilder builder = (RouteBuilder) ctx.getBean("buildCustomProcessor");
 		assertNotNull(builder);
 		return builder;
 	}
 	
 	@Override
-	protected RouteBuilder<Exchange> buildCustomProcessorWithFilter() {
+	protected RouteBuilder buildCustomProcessorWithFilter() {
 		myProcessor = (Processor<Exchange>) ctx.getBean("myProcessor");
-		RouteBuilder<Exchange> builder = (RouteBuilder<Exchange>) ctx.getBean("buildCustomProcessorWithFilter");
+		RouteBuilder builder = (RouteBuilder) ctx.getBean("buildCustomProcessorWithFilter");
 		assertNotNull(builder);
 		return builder;
 	}
 	
 	@Override
-	protected RouteBuilder<Exchange> buildRouteWithInterceptor() {
+	protected RouteBuilder buildRouteWithInterceptor() {
 		interceptor1 = (DelegateProcessor<Exchange>) ctx.getBean("interceptor1");
 		interceptor2 = (DelegateProcessor<Exchange>) ctx.getBean("interceptor2");
-		RouteBuilder<Exchange> builder = (RouteBuilder<Exchange>) ctx.getBean("buildRouteWithInterceptor");
+		RouteBuilder builder = (RouteBuilder) ctx.getBean("buildRouteWithInterceptor");
 		assertNotNull(builder);
 		return builder;
 	}
 	
 	@Override
-	protected RouteBuilder<Exchange> buildSimpleRouteWithHeaderPredicate() {
-		RouteBuilder<Exchange> builder = (RouteBuilder<Exchange>) ctx.getBean("buildSimpleRouteWithHeaderPredicate");
+	protected RouteBuilder buildSimpleRouteWithHeaderPredicate() {
+		RouteBuilder builder = (RouteBuilder) ctx.getBean("buildSimpleRouteWithHeaderPredicate");
 		assertNotNull(builder);
 		return builder;
 	}
 
 	@Override
-	protected RouteBuilder<Exchange> buildSimpleRouteWithChoice() {
-		RouteBuilder<Exchange> builder = (RouteBuilder<Exchange>) ctx.getBean("buildSimpleRouteWithChoice");
+	protected RouteBuilder buildSimpleRouteWithChoice() {
+		RouteBuilder builder = (RouteBuilder) ctx.getBean("buildSimpleRouteWithChoice");
 		assertNotNull(builder);
 		return builder;
 	}
 	
 	
 	@Override
-	protected RouteBuilder<Exchange> buildWireTap() {
-		RouteBuilder<Exchange> builder = (RouteBuilder<Exchange>) ctx.getBean("buildWireTap");
+	protected RouteBuilder buildWireTap() {
+		RouteBuilder builder = (RouteBuilder) ctx.getBean("buildWireTap");
 		assertNotNull(builder);
 		return builder;
 	}
 	
 	@Override
-	protected RouteBuilder<Exchange> buildDynamicRecipientList() {
-		RouteBuilder<Exchange> builder = (RouteBuilder<Exchange>) ctx.getBean("buildDynamicRecipientList");
+	protected RouteBuilder buildDynamicRecipientList() {
+		RouteBuilder builder = (RouteBuilder) ctx.getBean("buildDynamicRecipientList");
 		assertNotNull(builder);
 		return builder;
 	}
 	
 	@Override
-	protected RouteBuilder<Exchange> buildStaticRecipientList() {
-		RouteBuilder<Exchange> builder = (RouteBuilder<Exchange>) ctx.getBean("buildStaticRecipientList");
+	protected RouteBuilder buildStaticRecipientList() {
+		RouteBuilder builder = (RouteBuilder) ctx.getBean("buildStaticRecipientList");
 		assertNotNull(builder);
 		return builder;
 	}
 	
 	@Override
-	protected RouteBuilder<Exchange> buildSplitter() {
-		RouteBuilder<Exchange> builder = (RouteBuilder<Exchange>) ctx.getBean("buildSplitter");
+	protected RouteBuilder buildSplitter() {
+		RouteBuilder builder = (RouteBuilder) ctx.getBean("buildSplitter");
 		assertNotNull(builder);
 		return builder;
 	}
 
     @Override
-    protected RouteBuilder<Exchange> buildIdempotentConsumer() {
-        RouteBuilder<Exchange> builder = (RouteBuilder<Exchange>) ctx.getBean("buildIdempotentConsumer");
+    protected RouteBuilder buildIdempotentConsumer() {
+        RouteBuilder builder = (RouteBuilder) ctx.getBean("buildIdempotentConsumer");
         assertNotNull(builder);
         return builder;
     }

Modified: activemq/camel/trunk/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/XmppEndpoint.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/XmppEndpoint.java?view=diff&rev=532790&r1=532789&r2=532790
==============================================================================
--- activemq/camel/trunk/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/XmppEndpoint.java (original)
+++ activemq/camel/trunk/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/XmppEndpoint.java Thu Apr 26 09:13:49 2007
@@ -234,4 +234,9 @@
         }
         return connection;
     }
+    
+	public boolean isSingleton() {
+		return true;
+	}
+
 }

Modified: activemq/camel/trunk/camel-xmpp/src/test/java/org/apache/camel/component/xmpp/UriConfigurationTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-xmpp/src/test/java/org/apache/camel/component/xmpp/UriConfigurationTest.java?view=diff&rev=532790&r1=532789&r2=532790
==============================================================================
--- activemq/camel/trunk/camel-xmpp/src/test/java/org/apache/camel/component/xmpp/UriConfigurationTest.java (original)
+++ activemq/camel/trunk/camel-xmpp/src/test/java/org/apache/camel/component/xmpp/UriConfigurationTest.java Thu Apr 26 09:13:49 2007
@@ -27,13 +27,13 @@
 import org.apache.camel.impl.DefaultCamelContext;
 
 /**
- * @version $Revision: $
+ * @version $Revision$
  */
 public class UriConfigurationTest extends TestCase {
     protected CamelContext context = new DefaultCamelContext();
 
     public void testPrivateChatConfiguration() throws Exception {
-        Endpoint endpoint = context.resolveEndpoint("xmpp://camel-user@localhost:123/test-user@localhost");
+        Endpoint endpoint = context.getEndpoint("xmpp://camel-user@localhost:123/test-user@localhost");
         assertTrue("Endpoint not an XmppEndpoint: " + endpoint, endpoint instanceof XmppEndpoint);
         XmppEndpoint xmppEndpoint = (XmppEndpoint) endpoint;
 
@@ -45,7 +45,7 @@
     }
 
     public void testGroupChatConfiguration() throws Exception {
-        Endpoint endpoint = context.resolveEndpoint("xmpp://camel-user@im.google.com:123?room=cheese");
+        Endpoint endpoint = context.getEndpoint("xmpp://camel-user@im.google.com:123?room=cheese");
         assertTrue("Endpoint not an XmppEndpoint: " + endpoint, endpoint instanceof XmppEndpoint);
         XmppEndpoint xmppEndpoint = (XmppEndpoint) endpoint;
 

Modified: activemq/camel/trunk/camel-xmpp/src/test/java/org/apache/camel/component/xmpp/XmppRouteTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-xmpp/src/test/java/org/apache/camel/component/xmpp/XmppRouteTest.java?view=diff&rev=532790&r1=532789&r2=532790
==============================================================================
--- activemq/camel/trunk/camel-xmpp/src/test/java/org/apache/camel/component/xmpp/XmppRouteTest.java (original)
+++ activemq/camel/trunk/camel-xmpp/src/test/java/org/apache/camel/component/xmpp/XmppRouteTest.java Thu Apr 26 09:13:49 2007
@@ -129,7 +129,7 @@
                     });
                 }
             });
-            endpoint = container.resolveEndpoint(uri1);
+            endpoint = container.getEndpoint(uri1);
             assertNotNull("No endpoint found!", endpoint);
         }
 



Mime
View raw message